zoukankan      html  css  js  c++  java
  • SpringBoot项目打包出错

    首先确定项目都能跑通的情况下,在跟项目打包时报错

    Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project spring_boot: There are test failures.

    大概意思是测试文件打包失败。

    既然失败,那就忽视测试文件。

    在测试类中添加给注解@Ignore

    @Ignore

    在类上添加就是忽视这个类,

    在方法上添加就是忽视这个方法。

    package cn.itsroce.spring_boot.spring_boot;
    
    import org.junit.Ignore;
    import org.junit.Test;
    import org.springframework.boot.test.context.SpringBootTest;
    
    @SpringBootTest
    @Ignore
    class ApplicationTests {
    
       @Test
       void contextLoads() {
       }
    
    }

    添加好后,再次打包,就ok了

    
    
  • 相关阅读:
    货币
    沙漏
    秋季学习总结
    三个老师
    介绍自己
    redis 的部分配置
    第二次博客作业
    第一次阅读作业
    shell_通配符
    shell_/dev/null,>和&
  • 原文地址:https://www.cnblogs.com/bigbigxiao/p/12101904.html
Copyright © 2011-2022 走看看