I18n Springboot from an external library

3

Gentlemen, on my system I have an external component containing the messagesource bean configured as follows:

@Bean
public ReloadableResourceBundleMessageSource messageSource() {
    final ReloadableResourceBundleMessageSource source = new ReloadableResourceBundleMessageSource();
    source.setBasename("classpath:i18n/core/messages");
    source.setDefaultEncoding("UTF-8");
    source.setUseCodeAsDefaultMessage(true);
    return source;
}

However, I need exception messages to appear in the application that is importing it, something that is not happening:

br.com.mv.liberty.editor3core.exception.vo.StudioException: group.length.max.description

How do I configure my application to display the messages for this embedded component?

    
asked by anonymous 12.06.2018 / 15:23

1 answer

0

As the baseName is source.setBasename("classpath:i18n/core/messages"); , you need to place the file messages.properties into the following directory:

 src/main/resources/i18n/core/message.properties
    
12.09.2018 / 14:24