1.错误信息

There are test failures.

Please refer to D:\code\memo\memo-back\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个解决方案, 实际上都是一个操作,跳过test,但是没说什么原因

  1. 关闭ideamaventest
  2. pom.xml插件跳过test

2.原因分析

但是我想知道什么原因,所以点开错误看了一下

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘redisSupport’: Injection of resource dependencies failed;

3.解决方案

才想起redis没有启动,所以test失败了,启动redis,然后再打包就好了

4.总结

  1. 好处:在自己开发测试的过程中,跳过测试会速度更快
  2. 坏处:测试被跳过了,可能打出来的包不能用

更多推荐

idea 打包失败 【Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[