SpringBoot报错:localhost:3306/shiro, errorCode 1045, state 28000
将spring.datasource.data-password 和spring.datasource.data-username
改成
spring.datasource.password 和spring.datasource.username
如下:
正确写法:
spring:
datasource:
username: "root"
password: "123456"
driver-class-name: "com.mysql.jdbc.Driver"
url: "jdbc:mysql://localhost:3306/shiro?serverTimezone=UTC"
type: com.alibaba.druid.pool.DruidDataSource