Best Practices for Validation in a Spring Boot Application
In my Spring Boot application, I have encountered a scenario where multiple services interact with each other, and objects passed between them need to be validated. Currently, I am using @Valid
in the controller to validate incoming requests. However, I am concerned about redundancy and overhead when the same objects need to be validated again in the service layer.
How to validate a string input passing to float type dto
How to validate a string input passing to float type dto?
Disable DTO Validations in Spring Boot 3.0
I have a DTO which is used as request DTO for an API. I want to use the same as response DTO for another API. However, the DTO has validation annotations (to be validated on request) on it and I don’t need these validations when I would use this DTO as response DTO.