aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp-ft/src/main/java/com/juick/components/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp-ft/src/main/java/com/juick/components/configuration')
-rw-r--r--juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferAppConfiguration.java26
-rw-r--r--juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferInitializer.java40
-rw-r--r--juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferMvcConfiguration.java33
3 files changed, 0 insertions, 99 deletions
diff --git a/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferAppConfiguration.java b/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferAppConfiguration.java
deleted file mode 100644
index e52a604a..00000000
--- a/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferAppConfiguration.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.juick.components.configuration;
-
-import com.juick.components.XMPPFTServer;
-import com.juick.configuration.DataConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.core.env.Environment;
-
-import javax.inject.Inject;
-
-/**
- * Created by aalexeev on 11/12/16.
- */
-@Configuration
-@PropertySource("classpath:juick.conf")
-public class FileTransferAppConfiguration {
- @Inject
- private Environment env;
-
- @Bean
- public XMPPFTServer xmpp() {
- return new XMPPFTServer(env);
- }
-}
diff --git a/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferInitializer.java b/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferInitializer.java
deleted file mode 100644
index 7fac43d4..00000000
--- a/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferInitializer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.juick.components.configuration;
-
-import com.juick.configuration.DataConfiguration;
-import org.apache.commons.lang3.CharEncoding;
-import org.springframework.web.filter.CharacterEncodingFilter;
-import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
-
-import javax.servlet.Filter;
-
-/**
- * Created by vt on 09/02/16.
- */
-public class FileTransferInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
-
- @Override
- protected Class<?>[] getRootConfigClasses() {
- return new Class<?>[]{FileTransferAppConfiguration.class, DataConfiguration.class};
- }
-
- @Override
- protected Class<?>[] getServletConfigClasses() {
- return new Class<?>[]{FileTransferMvcConfiguration.class};
- }
-
- @Override
- protected String[] getServletMappings() {
- return new String[]{"/"};
- }
-
- @Override
- protected Filter[] getServletFilters() {
- CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter(CharEncoding.UTF_8);
- return new Filter[]{characterEncodingFilter};
- }
-
- @Override
- protected String getServletName() {
- return "File transfer dispantcher servlet";
- }
-}
diff --git a/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferMvcConfiguration.java b/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferMvcConfiguration.java
deleted file mode 100644
index 9500f4e6..00000000
--- a/juick-xmpp-ft/src/main/java/com/juick/components/configuration/FileTransferMvcConfiguration.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.juick.components.configuration;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
-import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
-
-import java.util.List;
-
-/**
- * Created by vitalyster on 28.06.2016.
- */
-@Configuration
-@ComponentScan(basePackages = {"com.juick.components.controllers"})
-public class FileTransferMvcConfiguration extends WebMvcConfigurationSupport {
-
- @Override
- protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
- Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder()
- .serializationInclusion(JsonInclude.Include.NON_DEFAULT)
- .serializationInclusion(JsonInclude.Include.NON_NULL)
- .serializationInclusion(JsonInclude.Include.NON_ABSENT)
- .serializationInclusion(JsonInclude.Include.NON_EMPTY);
- MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(builder.build());
- converter.getObjectMapper().registerModule(new Jdk8Module());
- converters.add(converter);
- super.configureMessageConverters(converters);
- }
-}