CMIPT / gcs-back-end

The back-end for git center server.
MIT License
2 stars 0 forks source link

Add an example for validation #34

Closed Kaiser-Yang closed 2 months ago

Kaiser-Yang commented 2 months ago

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.