Spring Boot JSR-303/349 configuration

前端 未结 3 1202
北海茫月
北海茫月 2021-02-06 06:22

In my Spring Boot 1.5.1 application I\'m trying to configure support of JSR-303 / JSR-349 validation.

I have added a following annotations @NotNull @S

3条回答
  •  余生分开走
    2021-02-06 07:06

    You need @Valid annotation

    Marks a property, method parameter or method return type for validation cascading. Constraints defined on the object and its properties are be validated when the property, method parameter or method return type is validated.

提交回复
热议问题