瀏覽代碼

disable some filters

Brian Clozel 11 年之前
父節點
當前提交
75f9be87c3
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      spring/src/main/java/com/techempower/spring/SampleApplication.java

+ 4 - 1
spring/src/main/java/com/techempower/spring/SampleApplication.java

@@ -1,12 +1,15 @@
 package com.techempower.spring;
 
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.SpringBootServletInitializer;
 import org.springframework.context.annotation.ComponentScan;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
 
 @ComponentScan
-@EnableAutoConfiguration
+@EnableAutoConfiguration(exclude = {WebMvcAutoConfiguration.class})
+@EnableWebMvc
 public class SampleApplication extends SpringBootServletInitializer {
 
 	@Override