码迷,mamicode.com
首页 > 编程语言 > 详细

SpringBoot项目打包出错

时间:2019-12-26 14:47:05      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:cut   frame   div   注解   its   failure   情况下   void   sts   

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

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了

SpringBoot项目打包出错

标签:cut   frame   div   注解   its   failure   情况下   void   sts   

原文地址:https://www.cnblogs.com/bigbigxiao/p/12101904.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!