@Bean(name = "messageSource")
 public ReloadableResourceBundleMessageSource getMessageSource() {
   ReloadableResourceBundleMessageSource resource = new ReloadableResourceBundleMessageSource();
   resource.setBasename("classpath:messages");
   resource.setDefaultEncoding("UTF-8");
   return resource;
 }
예제 #2
0
 @Bean
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("classpath:/messages");
   return messageSource;
 }
 @Bean
 public MessageSource httpErrorMessageSource() {
   ReloadableResourceBundleMessageSource m = new ReloadableResourceBundleMessageSource();
   m.setBasename("classpath:/messages");
   m.setDefaultEncoding("UTF-8");
   return m;
 }
예제 #4
0
 @BeforeClass
 public static void setUpClass() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("classpath:/jp/co/ctc_g/jse/core/message/MessageContextTest");
   MessageSourceLocator.set(messageSource);
 }
예제 #5
0
 @Bean
 public ReloadableResourceBundleMessageSource messageSource() {
   ReloadableResourceBundleMessageSource messageBundle =
       new ReloadableResourceBundleMessageSource();
   messageBundle.setBasename("classpath:messages/messages");
   messageBundle.setDefaultEncoding("UTF-8");
   return messageBundle;
 }
예제 #6
0
 @Bean(name = "messageSource")
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename(MESSAGE_SOURCE);
   messageSource.setCacheSeconds(5);
   return messageSource;
 }
예제 #7
0
 @Bean
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("/WEB-INF/messages/messages");
   messageSource.setCacheSeconds(15);
   return messageSource;
 }
예제 #8
0
 /*
  * Configure MessageSource to provide internationalized messages
  */
 @Bean
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource bundle = new ReloadableResourceBundleMessageSource();
   bundle.setBasename("messages");
   bundle.setDefaultEncoding(TEMPLATE_RESOLVER_CHAR_ENCODING);
   bundle.setCacheSeconds(5);
   return bundle;
 }
 @Bean
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource bundle = new ReloadableResourceBundleMessageSource();
   bundle.setBasename("/WEB-INF/messages");
   //	bundle.setDefaultEncoding("UTF-8");
   bundle.setCacheSeconds(1);
   return bundle;
 }
예제 #10
0
 @Bean
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("classpath:/i18n/messages");
   messageSource.setDefaultEncoding("UTF-8");
   messageSource.setCacheSeconds(propertyResolver.getProperty("cache-seconds", Integer.class, -1));
   return messageSource;
 }
예제 #11
0
 /** Message fájlok elérésének beállítása. */
 @Bean
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("/resource/message/messages");
   messageSource.setFallbackToSystemLocale(false);
   messageSource.setCacheSeconds(0);
   return messageSource;
 }
 @Bean(name = "messageSource")
 public MessageSource configureMessageSource() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("classpath:messages");
   messageSource.setCacheSeconds(5);
   messageSource.setDefaultEncoding("UTF-8");
   return messageSource;
 }
 @Bean
 @Description("Spring mail message resolver")
 public MessageSource emailMessageSource() {
   log.info("loading non-reloadable mail messages resources");
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("classpath:/mails/messages/messages");
   messageSource.setDefaultEncoding(CharEncoding.UTF_8);
   return messageSource;
 }
예제 #14
0
파일: WebConfig.java 프로젝트: jdmr/demo
 @Override
 public Validator getValidator() {
   LocalValidatorFactoryBean factory = new LocalValidatorFactoryBean();
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("classpath:messages");
   messageSource.setDefaultEncoding("UTF-8");
   factory.setValidationMessageSource(messageSource);
   return factory;
 }
예제 #15
0
 @Bean(name = "messageSource")
 public MessageSource configureMessageSource() {
   logger.debug("setting up message source");
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename(MESSAGE_SOURCE);
   messageSource.setCacheSeconds(5);
   messageSource.setDefaultEncoding("UTF-8");
   return messageSource;
 }
예제 #16
0
 @Bean(name = "messageSource")
 public MessageSource messageSource() {
   ReloadableResourceBundleMessageSource messageSource =
       new ReloadableResourceBundleMessageSource();
   messageSource.setBasename("classpath:/messages/message");
   messageSource.setDefaultEncoding("UTF-8");
   if (environment.acceptsProfiles("dev")) {
     messageSource.setCacheSeconds(0);
   }
   return messageSource;
 }
 /**
  * Override to obtain a local reference to the basenames.
  *
  * @see
  *     org.springframework.context.support.ReloadableResourceBundleMessageSource#setBasename(java.lang.String)
  */
 @Override
 public void setBasename(String basename) {
   super.setBasename(basename);
   this.basenames = new String[] {basename};
 }