Deniss M. Deniss M. - 1 year ago 290
Java Question

spring-boot: ResourceBundle with external file

public class MessageSourceConfig {

public static MessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("file: c:/temp/messages");

return messageSource;

I am trying to make spring-boot to use my external, files. Unfortunately I get this error:

ResourceBundle [file: c:/temp/messages] not found for MessageSource: Can't find bundle for base name file: c:/temp/messages, locale en_US

Files are there and I have studied such cases and it is stated that this should work in spring-boot, but it doesn't. I have also tried
and failed the same way. What am I doing wrong here?

Answer Source

Try that :

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download