|
@@ -0,0 +1,46 @@
|
|
|
|
+package org.starter.learning.config;
|
|
|
|
+
|
|
|
|
+import org.springframework.web.context.WebApplicationContext;
|
|
|
|
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
|
|
|
+import org.springframework.web.filter.CharacterEncodingFilter;
|
|
|
|
+import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
|
|
|
|
+import org.springframework.web.servlet.support.AbstractDispatcherServletInitializer;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+public class ServletContainersInitConfig extends AbstractAnnotationConfigDispatcherServletInitializer {
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ protected Class<?>[] getRootConfigClasses() {
|
|
|
|
+ return new Class[0];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ protected Class<?>[] getServletConfigClasses() {
|
|
|
|
+ return new Class[0];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ protected String[] getServletMappings() {
|
|
|
|
+ return new String[0];
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//public class ServletContainersInitConfig extends AbstractDispatcherServletInitializer {
|
|
|
|
+//
|
|
|
|
+// @Override
|
|
|
|
+// protected WebApplicationContext createServletApplicationContext() {
|
|
|
|
+// AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
|
|
|
|
+// ctx.register(SpringMvcConfig.class);
|
|
|
|
+// return ctx;
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// @Override
|
|
|
|
+// protected String[] getServletMappings() {
|
|
|
|
+// return new String[]{"/"};
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// @Override
|
|
|
|
+// protected WebApplicationContext createRootApplicationContext() {
|
|
|
|
+// return null;
|
|
|
|
+// }
|
|
|
|
+//}
|