aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp-bot/src/main/java/com/juick/components
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-06-29 17:09:49 +0300
committerGravatar Vitaly Takmazov2017-06-30 10:22:20 +0300
commitc99b9350be030bfbf87829956a182753a81d07a2 (patch)
tree1485ea407aca135eee7815d93a3636ba793a0276 /juick-xmpp-bot/src/main/java/com/juick/components
parentb75b5a3d1a3bf001923d49923dcebee95ba2327e (diff)
MVC was not enabled in apps based on BaseWebConfiguration
Diffstat (limited to 'juick-xmpp-bot/src/main/java/com/juick/components')
-rw-r--r--juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotAppConfiguration.java10
-rw-r--r--juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotInitializer.java5
2 files changed, 7 insertions, 8 deletions
diff --git a/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotAppConfiguration.java b/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotAppConfiguration.java
index 09b366b6..b1b70155 100644
--- a/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotAppConfiguration.java
+++ b/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotAppConfiguration.java
@@ -1,12 +1,11 @@
package com.juick.components.configuration;
import com.juick.components.XMPPBot;
+import com.juick.server.configuration.BaseWebConfiguration;
import com.juick.server.protocol.JuickProtocol;
-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 org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import javax.inject.Inject;
@@ -16,7 +15,8 @@ import javax.inject.Inject;
@Configuration
@ComponentScan(basePackages = {"com.juick.components.controllers"})
@PropertySource("classpath:juick.conf")
-public class BotAppConfiguration {
+@Import(BaseWebConfiguration.class)
+public class BotAppConfiguration extends WebMvcConfigurationSupport {
@Inject
private Environment env;
diff --git a/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotInitializer.java b/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotInitializer.java
index 9e8745af..ce4afd0c 100644
--- a/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotInitializer.java
+++ b/juick-xmpp-bot/src/main/java/com/juick/components/configuration/BotInitializer.java
@@ -1,7 +1,6 @@
package com.juick.components.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;
@@ -15,12 +14,12 @@ public class BotInitializer extends AbstractAnnotationConfigDispatcherServletIni
@Override
protected Class<?>[] getRootConfigClasses() {
- return new Class<?>[]{BotAppConfiguration.class, DataConfiguration.class};
+ return new Class<?>[]{ DataConfiguration.class };
}
@Override
protected Class<?>[] getServletConfigClasses() {
- return new Class<?>[]{ BaseWebConfiguration.class };
+ return new Class<?>[]{ BotAppConfiguration.class };
}
@Override