I was writing a Spring Boot Application. I wanted to know does Spring Boot automatically resolve message keys in javax and hibernate validation annotations. For example:
@NotEmpty(message = "${message.key}")
String name;
I have provided @PropertySource
in my application with message properties file and file is also in my classpath. The keys are resolving with @Value
but they are not being resolved in validation annotations.
What could be the reason for this?
Do I need configure a message source bean? Because I have seen examples working without configuring the message source bean.