use of org.springframework.context.support.ReloadableResourceBundleMessageSource in project lavagna by digitalfondue.
the class PersistenceAndServiceConfig method messageSource.
@Bean
public MessageSource messageSource() {
ReloadableResourceBundleMessageSource source = new ReloadableResourceBundleMessageSource();
source.setBasename("classpath:/io/lavagna/i18n/messages");
source.setUseCodeAsDefaultMessage(true);
source.setFallbackToSystemLocale(false);
return source;
}
use of org.springframework.context.support.ReloadableResourceBundleMessageSource in project Flare-event-calendar by PollubCafe.
the class MessagesConfig method messageSource.
@Bean
public ReloadableResourceBundleMessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasename("classpath:/messages");
return messageSource;
}
use of org.springframework.context.support.ReloadableResourceBundleMessageSource in project mica2 by obiba.
the class LocaleConfiguration method messageSource.
@Bean
public MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasename("classpath:/i18n/messages");
messageSource.setDefaultEncoding("UTF-8");
messageSource.setCacheSeconds(propertyResolver.getProperty("cacheSeconds", Integer.class, 1));
return messageSource;
}
use of org.springframework.context.support.ReloadableResourceBundleMessageSource in project tutorials by eugenp.
the class MvcConfig method messageSource.
@Bean
public MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasename("classpath:messages");
messageSource.setUseCodeAsDefaultMessage(true);
messageSource.setDefaultEncoding("UTF-8");
messageSource.setCacheSeconds(0);
return messageSource;
}
use of org.springframework.context.support.ReloadableResourceBundleMessageSource in project irida by phac-nml.
the class IridaApiServicesConfig method messageSource.
@Bean
public MessageSource messageSource() {
logger.info("Configuring ReloadableResourceBundleMessageSource.");
final Properties properties = new Properties();
properties.setProperty("help.page.title", helpPageTitle);
properties.setProperty("help.page.url", helpPageUrl);
properties.setProperty("help.contact.email", helpEmail);
properties.setProperty("irida.version", iridaVersion);
final ReloadableResourceBundleMessageSource source = new ReloadableResourceBundleMessageSource();
source.setBasenames(RESOURCE_LOCATIONS);
source.setFallbackToSystemLocale(false);
source.setDefaultEncoding(DEFAULT_ENCODING);
source.setCommonMessages(properties);
// Don't cache at all if in development
if (!env.acceptsProfiles("prod")) {
source.setCacheSeconds(0);
}
return source;
}
Aggregations