We use spring-doc to validate the request parameters. The example is for creating the user. The validation is done by the annotation in the UserDTO class. The validation message is stored in the message.properties file. The GlobalExceptionHandler class is used to handle the validation exception. The MessageSourceUtil class is used to get the message from the message.properties file.
We use spring-doc to validate the request parameters. The example is for creating the user. The validation is done by the annotation in the
UserDTO
class. The validation message is stored in themessage.properties
file. TheGlobalExceptionHandler
class is used to handle the validation exception. TheMessageSourceUtil
class is used to get the message from themessage.properties
file.