'url' attribute is not specified and no embedded datasource could be configured

解决方案之一:

因为数据库配置信息。在application.properties里添加信息:

#描述数据源
spring.datasource.url="jdbc:mysql://localhost:3306/world?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&nullCatalogMeansCurrent=true"
spring.datasource.username=root
spring.datasource.password=0000
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver

然后保存,重新运行即可。

网上方法很多,根基情况选择。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章