Closed
Description
Configuring the following messageSource breaks hibernate validation messages
@Bean
public MessageSource messageSource() {
var resourceBundleMessageSource = new ResourceBundleMessageSource();
resourceBundleMessageSource.setUseCodeAsDefaultMessage(true);
return resourceBundleMessageSource;
}
attached is a simple test case where the defaultMessage is the key, not the expected translation.
If that test is run against spring boot 2.5.7 it is fine, against 2.6.1 it is broken
demo.zip
.