报错Access denied for user ‘’@‘localhost’ (using password: NO)
提示没有权限,但是其他地方连接数据库是正常的,多数博客的解决方法是改数据库权限,明显不适合这个情况,最后改配置文件解决
# DB 配置
spring.datasource.url=jdbc:mysql://127.0.0.1:3305/springboot?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.password=root
spring.datasource.username=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
@Mapper没有注入的标志
SpringBoot中使用@Mapper没有出现小叶子标志,并且在service层提示没有注入,但是实际运行没有问题,只是红下划线看着碍眼,使用@MapperScan也没有解决红下划线问题