aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/configuration
diff options
context:
space:
mode:
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
};
}