Size Annotation in Spring Boot is returning 400 Bad Request

后端 未结 2 1961
余生分开走
余生分开走 2021-01-24 05:06

I am not getting message error while executing @Size annotation in spring boot bean class

below are my files pom.xml



        
相关标签:
2条回答
  • 2021-01-24 05:35

    Spring Boot 2.3.2 has issues with validation messages, or behaviour changed. Try to downgrade to Spring Boot 2.2.9

    0 讨论(0)
  • 2021-01-24 05:46

    Yes, There is issue with Spring 2.3.2 version that Size annotation will not provide proper restful response. After downgrading it to version 2.2.9 it worked as expected. It is returning proper Json with custom error message.

    0 讨论(0)
提交回复
热议问题