Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
1.报错示例Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.
2.报错原因
表示数据库的配置信息里面没有配置url
3.解决办法
在配置文件application.properties中加上如下代码
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/bank?useSSL=true&useUnicode=true&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=123456
还没有评论,来说两句吧...