您好,登錄后才能下訂單哦!
環境: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>
<!--默認關掉單元測試 -->
<!-- <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插件已經集成了maven-surefire-plugin插件,會自動運行 Junit test,因此停用自動單元測試,只需要調用<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>
<!--默認關掉單元測試 -->
<!-- <maven.test.skip>true</maven.test.skip> -->
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。