When I was first starting out my career as a developer, I often saw annotations @Validated
and @Valid
applied on the method parameters in controllers. Some people used @Validated
, while others preferred @Valid
. I was often confused which annotation to use and when. In this article I hope to explain the difference between them once and for all, as best as I can.
#spring #spring-framework #spring-boot #validation