2
我有一个使用Spring Boot开发的批处理应用程序。我的批处理应用程序需要依赖spring-boot-starter-web
。具体而言,我需要支持spring-hateoas
和jackson-databind
的REST客户端。如何禁用启动的嵌入式Tomcat?我需要使用什么排除?从加载禁用嵌入式servlet
至少,这些还不够,因为它有一个例外结束:
@EnableAutoConfiguration(exclude = {
EmbeddedServletContainerAutoConfiguration.class,
WebMvcAutoConfiguration.class,
EmbeddedTomcat.class,
DispatcherServletAutoConfiguration.class
})
唯一的例外是:
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
我已经得出了相同的结论,但有不正确的测试配置仍然启动tomcat的:) – RJo 2014-10-30 09:41:25
哇凉的解决方案! – ACV 2015-09-04 21:21:53