运行SpringBoot项目时发现报此异常
### The error may exist in mapper/UserMapper.xml
### The error may involve com.example.demo3.dao.UserDao.selectAll
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)] with root cause
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.15.jar:8.0.15]
...
经检查后发现,原来数据库库密码配置错了,修改为正确密码即可