栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

完美解决Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:XXX:test (default-test)。。。

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

完美解决Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:XXX:test (default-test)。。。

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:codeprojectDirstudy_springboot_vuestudy_springboot_vuetargetsurefire-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:codeprojectDirstudy_springboot_vuestudy_springboot_vuetargetsurefire-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的依赖版本,如图所示
org.springframework.boot spring-boot-starter-parent 2.2.7.RELEASE

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

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/782360.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号