aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-03-29 13:32:10 +0300
committerGravatar Vitaly Takmazov2017-03-29 13:32:10 +0300
commit2013ca7c8a174962c2c298b832b0642b845e2eac (patch)
treefeacf7d453e4c1242938a4ca8b9fd64f90503a5e /juick-www/src/main/java/com/juick/www/configuration
parentb8651556c21c83448e46b270ed7013f490e53a5d (diff)
juick-www: Springify Sape
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/configuration')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/SapeConfiguration.java18
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwInitializer.java3
2 files changed, 20 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/SapeConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/SapeConfiguration.java
new file mode 100644
index 00000000..fe1bce60
--- /dev/null
+++ b/juick-www/src/main/java/com/juick/www/configuration/SapeConfiguration.java
@@ -0,0 +1,18 @@
+package com.juick.www.configuration;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import ru.sape.Sape;
+
+/**
+ * Created by vitalyster on 29.03.2017.
+ */
+public class SapeConfiguration {
+ @Value("${sape_user}")
+ private String token;
+
+ @Bean
+ public Sape sape() {
+ return new Sape(token, "juick.com", 2000, 3600);
+ }
+}
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwInitializer.java b/juick-www/src/main/java/com/juick/www/configuration/WwwInitializer.java
index 0e185447..204d8c6c 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WwwInitializer.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WwwInitializer.java
@@ -20,7 +20,8 @@ public class WwwInitializer extends AbstractAnnotationConfigDispatcherServletIni
return new Class<?>[]{
WwwAppConfiguration.class,
DataConfiguration.class,
- SearchConfiguration.class
+ SearchConfiguration.class,
+ SapeConfiguration.class
};
}