您好,登錄后才能下訂單哦!
環(huán)境:Springboot2.x,配置如下
<maven.test.skip>true</maven.test.skip>跳過測試且不會生成class
<skipTests>true</skipTests>會跳過測試但是會生成測試class
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<!-- spring熱部署 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.8.RELEASE</version>
</dependency>
</dependencies>
<configuration>
<!--默認(rèn)關(guān)掉單元測試 -->
<!-- <maven.test.skip>true</maven.test.skip> -->
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
<maven.test.skip>true</maven.test.skip>跳過測試且不會生成class
<skipTests>true</skipTests>會跳過測試但是會生成測試class
spring-boot-maven-plugin插件已經(jīng)集成了maven-surefire-plugin插件,會自動運(yùn)行 Junit test,因此停用自動單元測試,只需要調(diào)用<skipTests>true</skipTests>或者<maven.test.skip>true</maven.test.skip>即可
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<!-- spring熱部署 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.8.RELEASE</version>
</dependency>
</dependencies>
<configuration>
<!--默認(rèn)關(guān)掉單元測試 -->
<!-- <maven.test.skip>true</maven.test.skip> -->
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。