Bug汇总---Day02
一、项目运行出错
1、问题:运行SpringBoot项目重新导入Maven报错
java
org.springframework.boot:spring-boot-dependencies:pom:2.2.2.RELEASE failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.2.2.RELEASE from/to central (https://repo.maven.apache.org/maven2): Read timed out
Try to run Maven import with -U flag (force update snapshots)
报错原因:
- 在IDEA中的Maven配置出错
解决方案:将setting -> Maven配置本地的Maven,重新install
2、问题:在重新install项目中的Maven后,报错
报错原因:未删除test文件夹
解决方案:将Maven删除test文件夹
3、报错原因:项目运行出现和数据库MySQL连接错误
java
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.18.jar:8.0.18]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.18.jar:8.0.18]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.18.jar:8.0.18]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836) ~[mysql-connector-java-8.0.18.jar:8.0.18]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456) ~[mysql-connector-java-8.0.18.jar:8.0.18]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246) ~[mysql-connector-java-8.0.18.jar:8.0.18]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) ~[mysql-connector-java-8.0.18.jar:8.0.18]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.1.jar:na]
...........
报错原因:在application.yml文件中配置的MySQL用户名密码错误
解决办法:修改application.yml文件中的相关MySQL用户名密码配置
的相关MySQL用户名密码配置