Spring Boot Kotlin: Handling Controller Binding Errors
I am having trouble catching and handling binding errors in my Spring Boot Kotlin application. Not sure if it's a Kotlin issue (I haven't had this problem in Java before), a form-urlencoded issue (I usually use JSON) or a me issue.
Here's my controller code:
@PostMapping(
path = ["/"],
consumes = [MediaType.APPLICATION_FORM_URLENCODED_VALUE],
produces = [MediaType.APPLICATION_FORM_URLENCODED_VALUE, MediaType.TEXT_PLAIN_VALUE, MediaType.APPLICATION_JSON_VALUE]
)...