当前位置: 首页>>代码示例>>Java>>正文


Java ReloadableResourceBundleMessageSource.addBasenames方法代码示例

本文整理汇总了Java中org.springframework.context.support.ReloadableResourceBundleMessageSource.addBasenames方法的典型用法代码示例。如果您正苦于以下问题:Java ReloadableResourceBundleMessageSource.addBasenames方法的具体用法?Java ReloadableResourceBundleMessageSource.addBasenames怎么用?Java ReloadableResourceBundleMessageSource.addBasenames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.context.support.ReloadableResourceBundleMessageSource的用法示例。


在下文中一共展示了ReloadableResourceBundleMessageSource.addBasenames方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMessageSource

import org.springframework.context.support.ReloadableResourceBundleMessageSource; //导入方法依赖的package包/类
@Bean(name = "messageSource")
public MessageSource getMessageSource() {
    ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
    messageSource.addBasenames("classpath:/messages/alert-triggers");
    messageSource.addBasenames("classpath:/messages/applications");
    messageSource.addBasenames("classpath:/messages/device-model");
    messageSource.addBasenames("classpath:/messages/devices");
    messageSource.addBasenames("classpath:/messages/devices-config");
    messageSource.addBasenames("classpath:/messages/gateways");
    messageSource.addBasenames("classpath:/messages/locations");
    messageSource.addBasenames("classpath:/messages/rest-destination");
    messageSource.addBasenames("classpath:/messages/routes");
    messageSource.addBasenames("classpath:/messages/transformations");
    messageSource.addBasenames("classpath:/messages/users");
    messageSource.addBasenames("classpath:/messages/tenants");
    messageSource.addBasenames("classpath:/messages/health-alert");
    messageSource.addBasenames("classpath:/mail/MailMessages");
    messageSource.setDefaultEncoding("UTF-8");

    return messageSource;
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:22,代码来源:WebMvcConfig.java

示例2: getMessageSource

import org.springframework.context.support.ReloadableResourceBundleMessageSource; //导入方法依赖的package包/类
@Bean(name = "messageSource")
public MessageSource getMessageSource() {
    ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
    messageSource.addBasenames(
            "/WEB-INF/i18n/dateformats",
            "/WEB-INF/i18n/destinations",
            "/WEB-INF/i18n/devices",
            "/WEB-INF/i18n/email",
            "/WEB-INF/i18n/error",
            "/WEB-INF/i18n/global",
            "/WEB-INF/i18n/languages",
            "/WEB-INF/i18n/loglevels",
            "/WEB-INF/i18n/menu",
            "/WEB-INF/i18n/routes",
            "/WEB-INF/i18n/timezones",
            "/WEB-INF/i18n/tokens",
            "/WEB-INF/i18n/transformations",
            "/WEB-INF/i18n/usernotifications",
            "/WEB-INF/i18n/users",
            "/WEB-INF/i18n/visualization",
            "classpath:/messages/alert-triggers",
            "classpath:/messages/applications",
            "classpath:/messages/device-model",
            "classpath:/messages/devices",
            "classpath:/messages/rest-destination",
            "classpath:/messages/routes",
            "classpath:/messages/transformations",
            "classpath:/messages/rest-destination",
            "classpath:/messages/users",
            "classpath:/messages/tenants",
            "classpath:/messages/applications",
            "classpath:/messages/device-model",
            "classpath:/messages/health-alert",
            "classpath:/mail/MailMessages");
    messageSource.setDefaultEncoding("UTF-8");
    return messageSource;
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:38,代码来源:MessageSourceConfig.java

示例3: getMessageSource

import org.springframework.context.support.ReloadableResourceBundleMessageSource; //导入方法依赖的package包/类
@Bean(name = "messageSource")
public MessageSource getMessageSource() {
    ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
    messageSource.addBasenames(
            "classpath:/messages/devices",
            "classpath:/messages/routes",
            "classpath:/messages/integration",
            "classpath:/messages/transformations",
            "classpath:/messages/devices-config",
            "classpath:/messages/applications");
    
    messageSource.setDefaultEncoding("UTF-8");
    return messageSource;
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:15,代码来源:WebMvcConfig.java

示例4: messageSource

import org.springframework.context.support.ReloadableResourceBundleMessageSource; //导入方法依赖的package包/类
@Primary
@Bean(name = "messageSource")
public ReloadableResourceBundleMessageSource messageSource() { // @todo not working
    ReloadableResourceBundleMessageSource messageBundle = new ReloadableResourceBundleMessageSource();
    messageBundle.setBasename("classpath:messages");
    messageBundle.addBasenames("classpath:messages", "classpath:validation");
    messageBundle.setUseCodeAsDefaultMessage(true);
    messageBundle.setDefaultEncoding("UTF-8");
    messageBundle.setFallbackToSystemLocale(true);

    return messageBundle;
}
 
开发者ID:bulktrade,项目名称:SMSC,代码行数:13,代码来源:AppConfiguration.java


注:本文中的org.springframework.context.support.ReloadableResourceBundleMessageSource.addBasenames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。