aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick/components/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-06-29 17:09:49 +0300
committerGravatar Vitaly Takmazov2017-06-29 17:13:29 +0300
commitb75b5a3d1a3bf001923d49923dcebee95ba2327e (patch)
tree5080eacdf348c9598885ad5d3b5c567632db3717 /juick-notifications/src/main/java/com/juick/components/configuration
parent02723131139806c761539a42a5fa80b68ecadee8 (diff)
notifications and configurations refactoring
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/configuration')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java3
-rw-r--r--juick-notifications/src/main/java/com/juick/components/configuration/NotificationsMvcConfiguration.java28
2 files changed, 2 insertions, 29 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java
index 4249d988..8ecf72ea 100644
--- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java
+++ b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java
@@ -1,5 +1,6 @@
package com.juick.components.configuration;
+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;
@@ -21,7 +22,7 @@ public class NotificationsInitializer extends AbstractAnnotationConfigDispatcher
@Override
protected Class<?>[] getServletConfigClasses() {
- return new Class<?>[]{NotificationsMvcConfiguration.class};
+ return new Class<?>[]{ BaseWebConfiguration.class };
}
@Override
diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsMvcConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsMvcConfiguration.java
deleted file mode 100644
index 3d828832..00000000
--- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsMvcConfiguration.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.juick.components.configuration;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
-
-import javax.inject.Inject;
-import java.util.List;
-
-/**
- * Created by vitalyster on 28.06.2016.
- */
-@Configuration
-@ComponentScan(basePackages = {"com.juick.components.controllers"})
-public class NotificationsMvcConfiguration extends WebMvcConfigurationSupport {
- @Inject
- ObjectMapper jsonMapper;
-
- @Override
- protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
- MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(jsonMapper);
- converters.add(converter);
- super.configureMessageConverters(converters);
- }
-}