SoringBoot的 Helloworld项目中使用JDBC直接连接mysql出现的问题:
Consider defining a bean of type ‘org.springframework.jdbc.core.JdbcTemplate’ in your configuration.
不要使用
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
应该使用
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
个人情况仅供参考,网上找了一堆解决方案,全是转载的。而且不能解决根本问题,服气……