Spring Boot jdbc datasource autoconfiguration fails on standalone tomcat

戏子无情 提交于 2019-11-29 09:36:58

This is most likely an issue with the 0.5.0.M6 version and the Tomcat version you are using. It does work with Spring Boot 0.5.0.M7 and Tomcat 7.0.47.

Hi make sure you are not missing the JPA library.

spring-boot-starter-data-jpa

@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class,
        HibernateJpaAutoConfiguration.class,
        DataSourceTransactionManagerAutoConfiguration.class })

Worked for me for version 1.3.3

I was facing the same issue earlier and same was resolved by adding

@PropertySource("classpath:application.properties")

in Application.java Hope this helps

For me it was throwing the exception in JdbcTemplateAutoConfiguration. I added exclude JdbcTemplateAutoConfiguration in the Application.java. Hope it helps.

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, JdbcTemplateAutoConfiguration.class })
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!