Search in sources :

Example 1 with CasReloadableMessageBundle

use of org.apereo.cas.web.view.CasReloadableMessageBundle in project cas by apereo.

the class CasCoreWebConfiguration method messageSource.

@RefreshScope
@Bean
public AbstractResourceBasedMessageSource messageSource() {
    final CasReloadableMessageBundle bean = new CasReloadableMessageBundle();
    bean.setDefaultEncoding(casProperties.getMessageBundle().getEncoding());
    bean.setCacheSeconds(casProperties.getMessageBundle().getCacheSeconds());
    bean.setFallbackToSystemLocale(casProperties.getMessageBundle().isFallbackSystemLocale());
    bean.setUseCodeAsDefaultMessage(casProperties.getMessageBundle().isUseCodeMessage());
    bean.setBasenames(casProperties.getMessageBundle().getBaseNames());
    return bean;
}
Also used : CasReloadableMessageBundle(org.apereo.cas.web.view.CasReloadableMessageBundle) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Bean(org.springframework.context.annotation.Bean)

Aggregations

CasReloadableMessageBundle (org.apereo.cas.web.view.CasReloadableMessageBundle)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1