aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-spring-www/src/main/java/com')
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/configuration/WebAppConfiguration.java14
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/configuration/WwwHelpConfiguration.java25
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/configuration/WwwInitializer.java3
3 files changed, 15 insertions, 27 deletions
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
index c9ecfeac..b314db64 100644
--- 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
@@ -1,7 +1,10 @@
package com.juick.www.configuration;
+import com.juick.www.HelpService;
import com.juick.www.WebApp;
import com.juick.www.settings.TemplateSettingsHolder;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.guava.GuavaCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@@ -15,6 +18,7 @@ import javax.annotation.Resource;
*/
@Configuration
@PropertySource("classpath:juick.conf")
+@EnableCaching
public class WebAppConfiguration {
@Resource
private Environment env;
@@ -40,4 +44,14 @@ public class WebAppConfiguration {
public WebApp webApp() {
return new WebApp(env);
}
+
+ @Bean
+ public GuavaCacheManager cacheManager() {
+ return new GuavaCacheManager("help");
+ }
+
+ @Bean
+ public HelpService helpService() {
+ return new HelpService("help");
+ }
}
diff --git a/juick-spring-www/src/main/java/com/juick/www/configuration/WwwHelpConfiguration.java b/juick-spring-www/src/main/java/com/juick/www/configuration/WwwHelpConfiguration.java
deleted file mode 100644
index d3b1aa9b..00000000
--- a/juick-spring-www/src/main/java/com/juick/www/configuration/WwwHelpConfiguration.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.juick.www.configuration;
-
-import com.juick.www.HelpService;
-import org.springframework.cache.annotation.EnableCaching;
-import org.springframework.cache.guava.GuavaCacheManager;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Created by aalexeev on 12/11/16.
- */
-@Configuration
-@EnableCaching
-public class WwwHelpConfiguration {
-
- @Bean
- public GuavaCacheManager cacheManager() {
- return new GuavaCacheManager("help");
- }
-
- @Bean
- public HelpService helpService() {
- return new HelpService("help");
- }
-}
diff --git a/juick-spring-www/src/main/java/com/juick/www/configuration/WwwInitializer.java b/juick-spring-www/src/main/java/com/juick/www/configuration/WwwInitializer.java
index c8c162bd..edb9a9fc 100644
--- a/juick-spring-www/src/main/java/com/juick/www/configuration/WwwInitializer.java
+++ b/juick-spring-www/src/main/java/com/juick/www/configuration/WwwInitializer.java
@@ -20,8 +20,7 @@ public class WwwInitializer extends AbstractAnnotationConfigDispatcherServletIni
WebAppConfiguration.class,
DataConfiguration.class,
SearchConfiguration.class,
- WebSecurityConfig.class,
- WwwHelpConfiguration.class};
+ WebSecurityConfig.class};
}
@Override