use of org.apereo.cas.configuration.model.core.web.MessageBundleProperties in project cas by apereo.
the class CasCoreWebConfiguration method messageSource.
@RefreshScope
@Bean
public HierarchicalMessageSource messageSource(@Qualifier("casCommonMessages") final Properties casCommonMessages) {
final CasReloadableMessageBundle bean = new CasReloadableMessageBundle();
final MessageBundleProperties mb = casProperties.getMessageBundle();
bean.setDefaultEncoding(mb.getEncoding());
bean.setCacheSeconds(mb.getCacheSeconds());
bean.setFallbackToSystemLocale(mb.isFallbackSystemLocale());
bean.setUseCodeAsDefaultMessage(mb.isUseCodeMessage());
bean.setBasenames(mb.getBaseNames().toArray(new String[] {}));
bean.setCommonMessages(casCommonMessages);
return bean;
}
Aggregations