摘要:我們在使用maven打包,正式環境一般使用的是內網數據庫,所以按照原來的打包檢測就是行不通的,因爲你在本地是連接不上內網的。這裏給出一個超簡便的方法。
方法一:也是網上最普遍的方法,重寫一個插件的配置
在你的pom文件中的 中添加上
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
方法二:https://suxiexingchen.github.io/2019/12/19/31/
還有更簡單的方法二請參考:https://suxiexingchen.github.io/2019/12/19/31/