aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api')
-rw-r--r--juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java10
-rw-r--r--juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java5
2 files changed, 7 insertions, 8 deletions
diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java b/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java
index 7ef1cf45..520f21eb 100644
--- a/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java
+++ b/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java
@@ -2,12 +2,11 @@ package com.juick.api.configuration;
import com.juick.api.ApiServer;
import com.juick.api.TGBot;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
+import com.juick.server.configuration.BaseWebConfiguration;
+import org.springframework.context.annotation.*;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.socket.client.WebSocketConnectionManager;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
@@ -21,7 +20,8 @@ import javax.inject.Inject;
@EnableAsync
@PropertySource("classpath:juick.conf")
@ComponentScan(basePackages = "com.juick.api.controllers")
-public class ApiAppConfiguration {
+@Import(BaseWebConfiguration.class)
+public class ApiAppConfiguration extends WebMvcConfigurationSupport {
@Inject
TGBot tgBot;
diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java b/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java
index d01df787..9de0af9d 100644
--- a/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java
+++ b/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java
@@ -1,7 +1,6 @@
package com.juick.api.configuration;
import com.juick.configuration.DataConfiguration;
-import com.juick.server.configuration.BaseWebConfiguration;
import org.apache.commons.codec.CharEncoding;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
@@ -16,14 +15,14 @@ public class ApiInitializer extends AbstractAnnotationConfigDispatcherServletIni
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class<?>[]{
- ApiAppConfiguration.class, ApiSecurityConfig.class, DataConfiguration.class,
+ ApiSecurityConfig.class, DataConfiguration.class,
TelegramConfiguration.class, MessengerConfiguration.class
};
}
@Override
protected Class<?>[] getServletConfigClasses() {
- return new Class<?>[]{BaseWebConfiguration.class};
+ return new Class<?>[]{ ApiAppConfiguration.class };
}
@Override