我有我的服務器在tomcat 8上運行,我使用了沒有任何澤西組件的Spring Boot框架,但仍然從某些原因,當我啓動我的服務器時, :爲什麼在我的Spring引導中顯示球衣MVC
信息:春WebApplicationInitializers類路徑檢測:org.springframework.boot.autoconfigure[email protected]310ddd95,[email protected]]
注:我的服務器只運行很好,但我沒有使用任何澤西島,所以爲什麼我得到這個信息?
這是我的主要配置類:
@ImportResource({"classpath:/META-INF/application-context.xml"})
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableScheduling
public class DemoApplication {...}
這是另一種的conf類:
@Configuration
@AutoConfigureAfter(DispatcherServletAutoConfiguration.class)
public class CustomWebMvcAutoConfig extends WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter {...}
另外的conf類:
@Configuration
@EnableWebSecurity
public class SecurityConfiguration {}
而且也是這一個(我認爲是大問題):
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(DemoApplication.class);
}
}
我必須問,你怎麼知道「周圍的自動配置不活躍」? – winter
你說,你使用Spring Boot「沒有任何Jersey組件」。所以我假設你在類路徑中沒有任何Jersey相關的依賴關係。然後自動配置不應該是主動的。當然,如果你的類路徑上有Jersey,它就會像它應該那樣工作,你應該清理你的依賴關係。 – dunni
以及我的類路徑中沒有任何依賴項,並且我沒有使用任何澤西(甚至爲了以防萬一清理了我的未使用的導入),所以基本上我會去找一個錯誤報告... :) – winter