解決:配置文件路徑錯誤,正確格式為
spring.datasource.url=jdbc:mysql://localhost:3306/test
如果數據庫是mysql6版本,還應加上時區, 所以完整寫法:
url = jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false
————————————————
原文鏈接:https://blog.csdn.net/caoshiminYQS/article/details/90024503
