Open Dolph111 opened 1 year ago
Your way is acceptable, but please, implement the validation using ConstraintValidator
for custom logic, and @ControllerAdvice
with ResponseEntityExceptionHandler
as general exception handling.
If you need to add dozens of validations, your approach will become too bulky.
https://mkyong.com/spring-boot/spring-rest-validation-example/
@axelrodvl done
@axelrodvl