java.sql.SQLException: Access denied for user ‘’@‘localhost’ (using password:YES)
毋庸置疑,这这种错误,一定是数据库的配置问题,所以检查你的properties或者yml文件
注意其中的username而不是name。
Solution: pay attention to the username or name. I think some configurations are username and name (I reported this error because I wrote username as name)
附上实例文档 application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/db01?serverTimezone=UTC&userUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver