From 9820abe11c0c037f50bb2f7ddbb0bd19646264dc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 7 Apr 2017 10:29:52 +0300 Subject: juick-www: merge juick-spring-www i18n, drop thymeleaf --- .../www/configuration/WebAppConfiguration.java | 60 ---------------------- 1 file changed, 60 deletions(-) delete mode 100644 juick-spring-www/src/main/java/com/juick/www/configuration/WebAppConfiguration.java (limited to 'juick-spring-www/src/main/java/com/juick/www/configuration/WebAppConfiguration.java') diff --git a/juick-spring-www/src/main/java/com/juick/www/configuration/WebAppConfiguration.java b/juick-spring-www/src/main/java/com/juick/www/configuration/WebAppConfiguration.java deleted file mode 100644 index 4482dce1..00000000 --- a/juick-spring-www/src/main/java/com/juick/www/configuration/WebAppConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.juick.www.configuration; - -import com.juick.www.HelpService; -import com.juick.www.WebApp; -import org.apache.commons.lang3.CharEncoding; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.cache.guava.GuavaCacheManager; -import org.springframework.cache.interceptor.KeyGenerator; -import org.springframework.cache.interceptor.SimpleKeyGenerator; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.support.ResourceBundleMessageSource; -import org.springframework.core.env.Environment; - -import javax.annotation.Resource; - -/** - * Created by aalexeev on 11/22/16. - */ -@Configuration -@PropertySource("classpath:juick.conf") -@EnableCaching -public class WebAppConfiguration { - @Resource - private Environment env; - - @Bean - public ResourceBundleMessageSource messageSource() { - ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource(); - - messageSource.setBasenames("messages", "errors"); - messageSource.setDefaultEncoding(CharEncoding.UTF_8); - messageSource.setFallbackToSystemLocale(false); - messageSource.setUseCodeAsDefaultMessage(true); - - return messageSource; - } - - @Bean - public WebApp webApp() { - return new WebApp(env); - } - - @Bean - public GuavaCacheManager cacheManager() { - return new GuavaCacheManager("help"); - } - - @Bean - public HelpService helpService() { - return new HelpService("help"); - } - - @Bean - public KeyGenerator keyGenerator() { - // configure and return an implementation of Spring's KeyGenerator SPI - return new SimpleKeyGenerator(); - } -} -- cgit v1.2.3