关于这个错误,因为用户密码错误。我们的密码应该都是123456
可是我在输入的时候输成12356。
修改之后重新运行,又报新的错误:
nested exception is java.sql.SQLException: The server time zone value '�
一看就是时区错误,在url路径后面添加:
?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
最终的配置文件:
spring:
datasource:
username: root
password: 123456
url: jdbc:mysql://127.0.0.1:3306/mybatis_0325?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
driver-class-name: com.mysql.jdbc.Driver