当前位置: 首页 > 工具软件 > WireMock > 使用案例 >

wiremock使用笔记

束帅
2023-12-01

依赖包:

<dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock-jre8</artifactId>
            <version>2.33.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-util</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
            <version>9.4.46.v20220331</version>
        </dependency>

说明:默认依赖的jetty-util版本,启动测试时会报错:

NoClassDefFoundError: org/eclipse/jetty/util/ssl/SslContextFactory$Server

参考:Using WireMock's JUnit Jupiter extension | WireMock 

 类似资料: