1.具体报错如下:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboot-vue-demo: There are test failures.

Please refer to E:\code\projectDir\study_springboot_vue\study_springboot_vue\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
在这里插入图片描述2.分析报错内容:
从这个报错的内容可以了解到,想要得到完整的报错信息,需要到“E:\code\projectDir\study_springboot_vue\study_springboot_vue\target\surefire-reports”这个目录下的这个文件中获取,也就是下图中圈起来的文件在这里插入图片描述打开文件找到报错信息:“Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$PoolBuilderFactory and org.apache.commons.pool2.impl.GenericObjectPoolConfig
”,也就是版本不兼容
在这里插入图片描述于是我就去pom.xml文件中去寻找刚添加的redis和pool依赖以及创建工程时导入的boot依赖版本,如图所示
在这里插入图片描述
在这里插入图片描述将百度得知,版本依赖冲突,于是我就更改了springboot的依赖版本,如图所示
在这里插入图片描述<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.7.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>

clean&compile后重新启动项目,正常运行
在这里插入图片描述最后告诉大家,遇事不要慌,先去接杯水,慢慢百度,然后一下午就过去了

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐