Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
spring boot配置文件支持 properties和yml,从yml配置文件拷贝了一个数据源到properties的项目中死活不行一直报这样的错
说是跟驱动有关系,但是驱动都有,druid的连接池都有,几番尝试无果,从新创建一个demo试试
用https://start.spring.io创建的
创建的时候,mysql,mybatis,JDBC都勾选上了
直接 maven install ,居然报一样的错,因为新建的项目,就把数据库连接配上
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/ctb
spring.datasource.driver-class-name = com.mysql.jdbc.Driver
然后再启动就不报错了,恍然大悟,肯定是程序无法识别 以冒号缩进,格式的配置,就把配置文件改成了yml,然后,就没有然后了,就成功了