Spring Boot validation message is not being resolved

后端 未结 4 1044
青春惊慌失措
青春惊慌失措 2020-12-25 13:16

I am having trouble getting my validation message to be resolved.

I have been searching and reading through the web and SO for some hours now, I want to relate the q

4条回答
  •  臣服心动
    2020-12-25 13:56

    Not sure which version of spring boot you are using. I am using Spring boot 2.0.1.RELEASE. A clearer solution would be move all your validation messages to ValidationMessages.properties. This way you don't have to override the auto-configured Validator() and setting the MessageSource.

提交回复
热议问题