1
Well the error happens in the second message from the file "properties" the first ok message when I try to put the second the message in the file happens this error
Caused by: javax.servlet.jsp.Jsptagexception: No message found under code 'field.add' for locale 'pt_br'.
message file.properties
campo.obrigatorio= Este campo é Obrigatório
campo.add= Add
campo.update= Editar
@Bean
public static MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasename("classpath:mensagem");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}
Try renaming the file to message_pt_BR.properties
– dougg0k
Do
messageSource.setFallbackToSystemLocale(false)
, should work. This is good even when it supports multiple languages, keep in a standard all, to avoid errors :)– Bruno César
sorry for the delay today I will test.
– David Cortez
continues the same error No message found under code 'field.add' for locale 'pt_br'. that <spring:message code="required field"/></span> <spring:message code="field.add"/> in OK
– David Cortez