Rejected
Details
Assignee
UnassignedUnassignedReporter
Christian PlätzingerChristian PlätzingerBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Christian PlätzingerHardy FerentschikAffects versions
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Christian Plätzinger
Christian PlätzingerBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Christian Plätzinger
Hardy Ferentschik
Affects versions
Priority
Created May 27, 2015 at 6:22 AM
Updated May 28, 2015 at 8:52 AM
Resolved May 28, 2015 at 8:52 AM
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:
@NotEmpty(message="myMessageKey")
My idea was to use plain
@NotEmpty
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 isorg.hibernate.validator.constraints.NotEmpty.message
and I expected that the text gets resolved by my spring message source the same way asmyMessageKey
. But unfortunatley this does not work.org.hibernate.validator.constraints.NotEmpty.message
key is resolved by Hibernate Validator message bundles.