Я использую Spring Boot 2.0.5.RELEASE и использую плагин maven tomcat7-maven-plugin
.
@Configuration
@SpringBootApplication(scanBasePackages = { "com.online", "com.online.dao", "com.online.service",
"com.online.exception", "com.online.filter", "com.online.interceptor", "com.online.validator",
"com.online.component" }, exclude = { HibernateJpaAutoConfiguration.class })
public class SpringBootWebApplication
extends org.springframework.boot.web.servlet.support.SpringBootServletInitializer {
public static void main(String[] args) throws Exception {
SpringApplication.run(SpringBootWebApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SpringBootWebApplication.class);
}
}
при развертывании через приложение с помощью mvn tomcat7: deploy
[INFO] tomcatManager status code:200, ReasonPhrase:
[INFO] FAIL - Deployed application at context path [/online-web] but context failed to start
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] online-test 0.0.1-SNAPSHOT ......................... SUCCESS [ 0.708 s]
[INFO] online-data ........................................ SUCCESS [ 2.314 s]
[INFO] online-service ..................................... SUCCESS [ 1.244 s]
[INFO] online-web 0.0.1 ................................... SUCCESS [ 18.471 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.193 s
[INFO] Finished at: 2018-10-19T16:37:04+05:00
[INFO] ------------------------------------------------------------------------
если я удаляю exclude = { HibernateJpaAutoConfiguration.class }
, приложение развертывается успешно, но есть другие проблемы, с которыми я сталкиваюсь.