|
|
|
I'm using hibernate-validator in a Spring MVC based application. The validation annotations like @NotEmpty are used in the entity objects. I want to override the default message used for the @NotEmpty annotation.
This is working and the message key is resolved by the spring message source: {code}@NotEmpty(message="myMessageKey"){code}
My idea was to use plain @NotEmpty annoation annotation (without specifying a message key) and to override/set the default message key in my spring message source. I assume the default message key is {{org.hibernate.validator.constraints.NotEmpty.message}} and I expected that the text gets resolved by my spring message source the same way as {{myMessageKey}}. But unfortunatley this does not work. {{org.hibernate.validator.constraints.NotEmpty.message}} key is resolved by Hibernate Validator message bundles.
|
|
|
|