Bug汇总—Day02
一、项目运行出错
1、问题:运行SpringBoot项目重新导入Maven报错
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.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用户名密码配置文章来源:https://www.toymoban.com/news/detail-846579.html
的相关MySQL用户名密码配置文章来源地址https://www.toymoban.com/news/detail-846579.html
到了这里,关于每日Bug汇总--Day02的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!