diff options
-rw-r--r-- | juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java | 6 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java index 65a9d410..c92aaa21 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java +++ b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java @@ -17,6 +17,7 @@ package com.juick.server.configuration; +import com.fasterxml.jackson.databind.ser.Serializers; import com.juick.configuration.DataConfiguration; import com.juick.server.WebsocketManager; import com.juick.server.api.rss.MessagesView; @@ -31,6 +32,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.view.BeanNameViewResolver; import org.springframework.web.servlet.view.feed.AbstractRssFeedView; import org.springframework.web.socket.client.WebSocketConnectionManager; @@ -59,9 +61,9 @@ import java.util.Collections; @EnableSwagger2 @EnableScheduling @EnableWebSocket -@Import({ApiSecurityConfig.class, DataConfiguration.class, StorageConfiguration.class}) +@Import({ApiSecurityConfig.class, BaseWebConfiguration.class, DataConfiguration.class, StorageConfiguration.class}) @ComponentScan(basePackages = "com.juick.server") -public class ApiAppConfiguration extends BaseWebConfiguration implements WebSocketConfigurer { +public class ApiAppConfiguration implements WebMvcConfigurer, WebSocketConfigurer { @Inject UserService userService; @Value("${api_user:juick}") diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java index f8258d5e..5e6a0d0e 100644 --- a/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java +++ b/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java @@ -34,6 +34,7 @@ import org.springframework.cache.caffeine.CaffeineCacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import javax.inject.Inject; import java.util.Collections; @@ -43,9 +44,9 @@ import java.util.Collections; */ @Configuration @EnableCaching -@Import({WwwServletConfiguration.class, WebSecurityConfig.class, SapeConfiguration.class, SearchConfiguration.class, +@Import({WwwServletConfiguration.class, BaseWebConfiguration.class, WebSecurityConfig.class, SapeConfiguration.class, SearchConfiguration.class, DataConfiguration.class, StorageConfiguration.class, XMPPConfiguration.class}) -public class WwwAppConfiguration extends BaseWebConfiguration { +public class WwwAppConfiguration implements WebMvcConfigurer { @Inject private UserService userService; @Inject |