当我启动 soap 服务应用程序时,我从控制台收到此错误
java.lang.ClassNotFoundException: org.hamcrest.Matchers
经过研究,我已经将这三个依赖添加到pom.xml中,但启动应用程序仍然存在错误
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
感谢收到的任何帮助。
最佳答案
你能试试下面的吗:
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
关于java.lang.ClassNotFoundException : org. hamcrest.Matchers 添加依赖项后 pom.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41984727/