Doc: ReloadableResourceBundleMessageSource's setUseCodeAsDefaultMessage causes the ValidationMessages.properties to not be found and used correctly [SPR-15986] #20536
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: task
A general task
Milestone
Happy opened SPR-15986 and commented
There are a few issues with using ```java
ReloadableResourceBundleMessageSource
then the messages from teh hibernate ValidationMessages.properties are picked and displayed accurately.
When I use ```java
ReloadableResourceBundleMessageSource
the ValidationMessages.properties file is never scanned.
However, when I set the following to false, comment from the above
// messageSource.setUseCodeAsDefaultMessage(true);
The ValidationMessages.properties from hibernate is correctly loaded.
I wouldn't have thought UseCodeAsDefaultMessage would cause this problem. But it does.
I have also faced problems as discussed in https://stackoverflow.com/q/23448360/1083581 and commenting out useCodeAsDefaultMessage has fixed errors. It however exposes my app to show errors when message codes aren't found.
I am using 4.3.4-RELEASE of spring-context.
Affects: 4.3.5
Referenced from: commits 37ab8a7, ce94026
Backported to: 4.3.15
The text was updated successfully, but these errors were encountered: