'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

然後保存,重新運行即可。

網上方法很多,根基情況選擇。

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