SpringBoot war包tomcat运行启动报错(Cannot determine embedded database driver class for database type NONE)

我们的项目一直以来都是jar包直接运行的,昨天同事说要在tomcat运行,我就帮他倒腾了半天。怎么让springboot应用在tomcat运行请参考一下博文

http://blog.csdn.net/paranoia_zk/article/details/78128792

然后顺利打包部署进本地tomcat启动就报标题错误,网上搜过都说启动类中加入注解:@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class)

本人亲测无效。

解决方案:

启动类加入注解:@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}),亲测有效。

posted @ 2018-01-18 10:30  松子无泪  阅读(3164)  评论(2编辑  收藏  举报