Java Code Examples for org.springframework.context.support.ReloadableResourceBundleMessageSource#addBasenames()
The following examples show how to use
org.springframework.context.support.ReloadableResourceBundleMessageSource#addBasenames() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebMvcConfig.java From konker-platform with Apache License 2.0 | 7 votes |
@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/routes-counter"); 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.addBasenames("classpath:/messages/private-storage"); messageSource.addBasenames("classpath:/messages/global"); messageSource.setDefaultEncoding("UTF-8"); return messageSource; }
Example 2
Source File: MessageSouceTestConfiguration.java From konker-platform with Apache License 2.0 | 6 votes |
@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; }
Example 3
Source File: WebMvcConfig.java From konker-platform with Apache License 2.0 | 5 votes |
@Bean(name = "messageSource") public MessageSource getMessageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageSource.addBasenames( "classpath:/messages/devices", "classpath:/messages/routes", "classpath:/messages/routes-counter", "classpath:/messages/integration", "classpath:/messages/transformations", "classpath:/messages/devices-config", "classpath:/messages/applications"); messageSource.setDefaultEncoding("UTF-8"); return messageSource; }
Example 4
Source File: MessageSourceConfig.java From konker-platform with Apache License 2.0 | 5 votes |
@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:/messages/routes-counter", "classpath:/messages/iugu", "classpath:/mail/MailMessages"); messageSource.setDefaultEncoding("UTF-8"); return messageSource; }
Example 5
Source File: WebMvcConfig.java From konker-platform with Apache License 2.0 | 5 votes |
@Bean(name = "messageSource") public MessageSource getMessageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageSource.addBasenames( "classpath:/messages/devices", "classpath:/messages/routes", "classpath:/messages/routes-counter", "classpath:/messages/integration", "classpath:/messages/transformations", "classpath:/messages/devices-config", "classpath:/messages/applications"); messageSource.setDefaultEncoding("UTF-8"); return messageSource; }
Example 6
Source File: WebMvcConfig.java From konker-platform with Apache License 2.0 | 5 votes |
@Bean(name = "messageSource") public MessageSource getMessageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageSource.addBasenames( "classpath:/messages/devices", "classpath:/messages/routes", "classpath:/messages/routes-counter", "classpath:/messages/integration", "classpath:/messages/transformations", "classpath:/messages/devices-config", "classpath:/messages/applications"); messageSource.setDefaultEncoding("UTF-8"); return messageSource; }
Example 7
Source File: AppConfiguration.java From SMSC with Apache License 2.0 | 5 votes |
@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; }