在網上看到了好多,都是說將以下代碼進行註釋。
<!-- <scope>test</scope>-->
但是我這邊測試還是不可以,然後我試着切換了一下版本就可以了。
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<!-- <scope>test</scope>-->
</dependency>