0

目前,我正在尝试将SpringBootTest与Spring-cloud-contract一起用于集成测试,但由于某种原因,我无法启动并运行 Embedded tomcat 实例。使用 Spring Boot Debug 我得到以下日志

EmbeddedServletContainerAutoConfiguration.EmbeddedTomcat matched:
  - @ConditionalOnClass found required classes 'javax.servlet.Servlet', 'org.apache.catalina.startup.Tomcat' (OnClassCondition)
  - @ConditionalOnMissingBean (types: org.springframework.boot.context.embedded.EmbeddedServletContainerFactory; SearchStrategy: current) did not find any beans (OnBeanCondition)

我得到的例外是

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract.stubrunner.BatchStubRunner]: Factory method 'batchStubRunner' threw exception; nested exception is com.github.tomakehurst.wiremock.common.FatalStartupException: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ... 60 more
Caused by: com.github.tomakehurst.wiremock.common.FatalStartupException: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
    at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:145)
    at org.springframework.cloud.contract.stubrunner.provider.wiremock.WireMockHttpServerStub.start(WireMockHttpServerStub.java:88)
    at org.springframework.cloud.contract.stubrunner.StubServer.start(StubServer.java:51)
    at org.springframework.cloud.contract.stubrunner.StubRunnerExecutor.startStubServers(StubRunnerExecutor.java:253)
    at org.springframework.cloud.contract.stubrunner.StubRunnerExecutor.runStubs(StubRunnerExecutor.java:76)
    at org.springframework.cloud.contract.stubrunner.StubRunner.runStubs(StubRunner.java:72)
    at org.springframework.cloud.contract.stubrunner.BatchStubRunner.runStubs(BatchStubRunner.java:46)
    at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration.batchStubRunner(StubRunnerConfiguration.java:79)
    at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$82620dd2.CGLIB$batchStubRunner$0(<generated>)
    at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$82620dd2$$FastClassBySpringCGLIB$$20c1c6a6.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
    at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$82620dd2.batchStubRunner(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 61 more
Caused by: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
    at org.springframework.cloud.contract.wiremock.SpringBootHttpServer.start(SpringBootHttpServerFactory.java:118)
    at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:143)
    ... 78 more
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:189)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:162)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
    ... 86 more

测试班

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = ReferenceApplication.class)
@AutoConfigureStubRunner(ids = {"groupId:artifact:TRUNK-SNAPSHOT:stubs:9095"}, workOffline = true)
@DirtiesContext
@TestPropertySource(properties = "debug=true")
@Slf4j

public class HelloClientTest{

    @Inject
    private TestClient testClient;

    @Test
    public void testClient(){
        Brand brands = testClient.getBrand("orgId","brandingCd");
        log.info("Brands {} ",brands);
    }
}

如果您需要更多详细信息,请告诉我。

+- org.springframework.cloud:spring-cloud-starter-contract-stub-runner:jar:1.2.0.BUILD-SNAPSHOT:test
|  +- org.springframework.cloud:spring-cloud-contract-stub-runner:jar:1.2.0.BUILD-SNAPSHOT:test
|  |  +- org.springframework.cloud:spring-cloud-contract-verifier:jar:1.2.0.BUILD-SNAPSHOT:test
|  |  |  +- com.toomuchcoding.jsonassert:jsonassert:jar:0.4.9:test
|  |  |  +- org.codehaus.groovy:groovy-nio:jar:2.4.7:test
|  |  |  \- com.github.jknack:handlebars:jar:4.0.6:test
|  |  |     +- org.antlr:antlr4-runtime:jar:4.5.1-1:test
|  |  |     \- org.mozilla:rhino:jar:1.7R4:test
|  |  +- org.springframework.cloud:spring-cloud-contract-shade:jar:1.2.0.BUILD-SNAPSHOT:test
|  |  \- org.springframework.cloud:spring-cloud-contract-spec:jar:1.2.0.BUILD-SNAPSHOT:test
|  |     \- dk.brics.automaton:automaton:jar:1.11-8:test
|  +- org.springframework.integration:spring-integration-java-dsl:jar:1.1.4.RELEASE:test
|  |  \- org.reactivestreams:reactive-streams:jar:1.0.0:test
|  +- org.springframework.cloud:spring-cloud-stream-test-support:jar:1.3.0.BUILD-SNAPSHOT:test
|  |  +- org.springframework.cloud:spring-cloud-stream:jar:1.3.0.BUILD-SNAPSHOT:test
|  |  |  +- org.springframework.boot:spring-boot-starter-validation:jar:1.4.3.RELEASE:test
|  |  |  +- org.springframework.integration:spring-integration-jmx:jar:4.3.6.RELEASE:test
|  |  |  +- org.springframework:spring-tuple:jar:1.0.0.RELEASE:test
|  |  |  |  \- com.esotericsoftware:kryo-shaded:jar:3.0.3:test
|  |  |  |     \- com.esotericsoftware:minlog:jar:1.3.0:test
|  |  |  \- org.springframework.integration:spring-integration-tuple:jar:1.0.0.RELEASE:test
|  |  \- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.3.RELEASE:compile
|  +- org.springframework.cloud:spring-cloud-contract-wiremock:jar:1.2.0.BUILD-SNAPSHOT:test
|  |  \- com.github.tomakehurst:wiremock:jar:2.6.0:test
|  |     +- org.xmlunit:xmlunit-core:jar:2.3.0:test
|  |     +- org.xmlunit:xmlunit-legacy:jar:2.3.0:test
|  |     \- com.flipkart.zjsonpatch:zjsonpatch:jar:0.3.0:test
|  \- org.eclipse.aether:aether-api:jar:1.0.2.v20150114:test
+- org.springframework.boot:spring-boot-starter-test:jar:1.4.3.RELEASE:test
|  +- org.springframework.boot:spring-boot-test:jar:1.4.3.RELEASE:test
|  |  \- org.springframework.boot:spring-boot:jar:1.4.3.RELEASE:compile
|  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.3.RELEASE:test
|  +- com.jayway.jsonpath:json-path:jar:2.2.0:test
|  |  \- net.minidev:json-smart:jar:2.2.1:test
|  |     \- net.minidev:accessors-smart:jar:1.1:test
|  |        \- org.ow2.asm:asm:jar:5.0.3:test
|  +- junit:junit:jar:4.12:test
|  +- org.assertj:assertj-core:jar:2.5.0:test
|  +- org.mockito:mockito-core:jar:1.10.19:test
|  |  \- org.objenesis:objenesis:jar:2.1:test
|  +- org.hamcrest:hamcrest-core:jar:1.3:test
|  +- org.hamcrest:hamcrest-library:jar:1.3:test
|  +- org.skyscreamer:jsonassert:jar:1.3.0:test
|  +- org.springframework:spring-core:jar:4.3.5.RELEASE:compile
|  \- org.springframework:spring-test:jar:4.3.5.RELEASE:test
+- org.hibernate:hibernate-core:jar:4.3.10.Final:compile
|  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
|  +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
|  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile
|  +- dom4j:dom4j:jar:1.6.1:compile
|  +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile
|  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
|  +- org.javassist:javassist:jar:3.20.0-GA:compile
|  +- antlr:antlr:jar:2.7.7:compile
|  \- org.jboss:jandex:jar:1.1.0.Final:compile
+- org.hibernate:hibernate-entitymanager:jar:4.3.10.Final:compile
+- org.hibernate:hibernate-envers:jar:4.3.10.Final:compile
+- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.3.RELEASE:compile
|  +- org.springframework.boot:spring-boot-starter:jar:1.4.3.RELEASE:compile
|  |  +- org.springframework.boot:spring-boot-starter-logging:jar:1.4.3.RELEASE:compile
|  |  |  +- ch.qos.logback:logback-classic:jar:1.1.8:compile
|  |  |  |  \- ch.qos.logback:logback-core:jar:1.1.8:compile
|  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.22:compile
|  |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.22:compile
|  |  \- org.yaml:snakeyaml:jar:1.17:compile
|  +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.4.3.RELEASE:compile
|  |  +- org.apache.tomcat:tomcat-jdbc:jar:8.5.6:compile
|  |  |  \- org.apache.tomcat:tomcat-juli:jar:8.5.6:compile
|  |  \- org.springframework:spring-jdbc:jar:4.3.5.RELEASE:compile
|  +- javax.transaction:javax.transaction-api:jar:1.2:compile
|  +- org.springframework.data:spring-data-jpa:jar:1.10.6.RELEASE:compile
|  |  +- org.springframework.data:spring-data-commons:jar:1.12.6.RELEASE:compile
|  |  +- org.springframework:spring-orm:jar:4.3.5.RELEASE:compile
|  |  \- org.slf4j:jcl-over-slf4j:jar:1.7.22:compile
|  \- org.springframework:spring-aspects:jar:4.3.5.RELEASE:compile
+- org.springframework.boot:spring-boot-starter-aop:jar:1.4.3.RELEASE:compile
|  +- org.springframework:spring-aop:jar:4.3.5.RELEASE:compile
|  \- org.aspectj:aspectjweaver:jar:1.8.9:compile
+- org.springframework.boot:spring-boot-starter-jta-atomikos:jar:1.4.3.RELEASE:provided
|  +- com.atomikos:transactions-jms:jar:3.9.3:provided
|  +- com.atomikos:transactions-jta:jar:3.9.3:provided
|  |  \- com.atomikos:transactions:jar:3.9.3:provided
|  |     \- com.atomikos:transactions-api:jar:3.9.3:provided
|  |        \- com.atomikos:atomikos-util:jar:3.9.3:provided
|  \- com.atomikos:transactions-jdbc:jar:3.9.3:provided
+- org.springframework.boot:spring-boot-starter-web:jar:1.4.3.RELEASE:compile
|  +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.3.RELEASE:compile
|  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.6:compile
|  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.6:compile
|  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.6:compile
|  +- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
|  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.5:compile
|  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.8.5:compile
|  +- org.springframework:spring-web:jar:4.3.5.RELEASE:compile
|  \- org.springframework:spring-webmvc:jar:4.3.5.RELEASE:compile
|     \- org.springframework:spring-expression:jar:4.3.5.RELEASE:compile
+- org.springframework.boot:spring-boot-starter-actuator:jar:1.4.3.RELEASE:compile
|  \- org.springframework.boot:spring-boot-actuator:jar:1.4.3.RELEASE:compile
+- org.springframework.boot:spring-boot-starter-hornetq:jar:1.4.7.RELEASE:compile
|  \- org.springframework:spring-jms:jar:4.3.5.RELEASE:compile
|     \- org.springframework:spring-messaging:jar:4.3.5.RELEASE:compile
+- org.hornetq:hornetq-jms-client:jar:2.4.7.Final:provided
|  +- org.hornetq:hornetq-core-client:jar:2.4.7.Final:provided
|  |  +- org.jgroups:jgroups:jar:3.3.4.Final:provided
|  |  +- org.hornetq:hornetq-commons:jar:2.4.7.Final:provided
|  |  \- org.hornetq:hornetq-journal:jar:2.4.7.Final:provided
|  |     \- org.hornetq:hornetq-native:jar:2.4.7.Final:provided
|  +- org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec:jar:1.0.0.Final:provided
|  \- javax.inject:javax.inject:jar:1:provided
+- org.springframework.boot:spring-boot-configuration-processor:jar:1.4.3.RELEASE:compile
|  \- org.json:json:jar:20140107:compile
+- org.glassfish.jersey.core:jersey-server:jar:2.25:compile
|  +- org.glassfish.jersey.core:jersey-common:jar:2.25:compile
|  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.25:compile
|  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
|  +- org.glassfish.jersey.core:jersey-client:jar:2.25:compile
|  +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
|  +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.25:compile
|  +- javax.annotation:javax.annotation-api:jar:1.2:compile
|  +- org.glassfish.hk2:hk2-api:jar:2.5.0-b30:compile
|  |  +- org.glassfish.hk2:hk2-utils:jar:2.5.0-b30:compile
|  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b30:compile
|  +- org.glassfish.hk2.external:javax.inject:jar:2.5.0-b30:compile
|  +- org.glassfish.hk2:hk2-locator:jar:2.5.0-b30:compile
|  \- javax.validation:validation-api:jar:1.1.0.Final:compile
+- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.25:compile
+- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.25:compile
+- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.25:compile
+- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.25:compile
|  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.5:compile
|  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.5:compile
|  |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.5:compile
|  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.5:compile
+- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.25:compile
|  +- javax.el:javax.el-api:jar:2.2.4:compile
|  \- org.glassfish.web:javax.el:jar:2.2.4:compile
+- org.glassfish.jersey.ext:jersey-spring3:jar:2.25:compile
|  +- org.glassfish.hk2:hk2:jar:2.5.0-b30:compile
|  |  +- org.glassfish.hk2:config-types:jar:2.5.0-b30:compile
|  |  +- org.glassfish.hk2:hk2-core:jar:2.5.0-b30:compile
|  |  +- org.glassfish.hk2:hk2-config:jar:2.5.0-b30:compile
|  |  |  \- org.jvnet:tiger-types:jar:1.4:compile
|  |  +- org.glassfish.hk2:hk2-runlevel:jar:2.5.0-b30:compile
|  |  \- org.glassfish.hk2:class-model:jar:2.5.0-b30:compile
|  |     \- org.glassfish.hk2.external:asm-all-repackaged:jar:2.5.0-b30:compile
|  +- org.glassfish.hk2:spring-bridge:jar:2.5.0-b30:compile
|  \- org.springframework:spring-beans:jar:4.3.5.RELEASE:compile
+- org.glassfish.jersey.media:jersey-media-multipart:jar:2.25:compile
|  \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
+- org.springframework.integration:spring-integration-ws:jar:4.3.6.RELEASE:compile
|  +- org.springframework.integration:spring-integration-core:jar:4.3.6.RELEASE:compile
|  |  \- org.springframework.retry:spring-retry:jar:1.1.5.RELEASE:compile
|  +- org.springframework:spring-oxm:jar:4.3.5.RELEASE:compile
|  \- org.springframework.ws:spring-ws-core:jar:2.3.1.RELEASE:compile
|     \- org.springframework.ws:spring-xml:jar:2.3.1.RELEASE:compile
+- org.springframework.batch:spring-batch-core:jar:3.0.5.RELEASE:compile
|  +- com.ibm.jbatch:com.ibm.jbatch-tck-spi:jar:1.0:compile
|  |  \- javax.batch:javax.batch-api:jar:1.0:compile
|  +- com.thoughtworks.xstream:xstream:jar:1.4.2:compile
|  |  +- xmlpull:xmlpull:jar:1.1.3.1:compile
|  |  \- xpp3:xpp3_min:jar:1.1.4c:compile
|  +- org.codehaus.jettison:jettison:jar:1.2:compile
|  +- org.springframework.batch:spring-batch-infrastructure:jar:3.0.7.RELEASE:compile
|  +- org.springframework:spring-context:jar:4.3.5.RELEASE:compile
|  \- org.springframework:spring-tx:jar:4.3.5.RELEASE:compile
+- io.swagger:swagger-jersey2-jaxrs:jar:1.5.0:compile
|  \- io.swagger:swagger-jaxrs:jar:1.5.0:compile
|     +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.5:compile
|     +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.8.5:compile
|     |  +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
|     |  \- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
|     +- io.swagger:swagger-core:jar:1.5.0:compile
|     |  \- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.8.5:compile
|     |     \- joda-time:joda-time:jar:2.9.6:compile
|     \- org.reflections:reflections:jar:0.9.9:compile
+- com.h2database:h2:jar:1.4.193:provided
+- org.apache.tika:tika-core:jar:1.10:compile
+- commons-io:commons-io:jar:1.3.2:compile
+- com.google.guava:guava:jar:18.0:compile
+- org.projectlombok:lombok:jar:1.16.12:compile
+- org.apache.commons:commons-collections4:jar:4.0:compile
+- org.apache.commons:commons-lang3:jar:3.4:compile
+- commons-codec:commons-codec:jar:1.10:compile
+- commons-digester:commons-digester:jar:2.3.0:compile
+- org.apache.httpcomponents:httpclient:jar:4.5.1:compile
|  \- org.apache.httpcomponents:httpcore:jar:4.4.5:compile
+- ognl:ognl:jar:3.1:compile
|  \- javassist:javassist:jar:3.11.0.GA:compile
+- org.hornetq:hornetq-jms-server:jar:2.4.7.Final:test
|  +- org.hornetq:hornetq-server:jar:2.4.7.Final:test
|  |  \- io.netty:netty-all:jar:4.0.13.Final:test
|  +- org.jboss:jboss-transaction-spi:jar:7.3.4.Final:test
|  |  \- org.jboss.spec.javax.resource:jboss-connector-api_1.7_spec:jar:1.0.0.Final:test
|  \- org.jboss.naming:jnpserver:jar:5.0.3.GA:test
|     \- org.jboss:jboss-common-core:jar:2.2.10.GA:test
+- com.netflix.hystrix:hystrix-core:jar:1.4.14:compile
|  +- com.netflix.archaius:archaius-core:jar:0.6.5:runtime
|  |  +- commons-configuration:commons-configuration:jar:1.8:runtime
|  |  \- com.google.code.findbugs:annotations:jar:2.0.0:compile
|  \- org.slf4j:slf4j-api:jar:1.7.22:compile
+- io.reactivex:rxjava:jar:1.0.7:compile
+- com.group.ssi:UserIdentityJBoss5:jar:3.0.2:compile
|  \- org.jboss.security:jbosssx-client:jar:2.0.4.SP2:compile
+- net.sf.dozer:dozer:jar:5.4.0:compile
|  \- commons-beanutils:commons-beanutils:jar:1.9.3:compile
|     \- commons-collections:commons-collections:jar:3.2.2:compile
+- com.jayway.restassured:rest-assured:jar:2.4.1:test
|  +- org.codehaus.groovy:groovy:jar:2.4.7:test
|  +- org.codehaus.groovy:groovy-xml:jar:2.4.7:test
|  +- org.apache.httpcomponents:httpmime:jar:4.5.2:test
|  +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:test
|  +- com.jayway.restassured:json-path:jar:2.4.1:test
|  |  +- org.codehaus.groovy:groovy-json:jar:2.4.7:test
|  |  \- com.jayway.restassured:rest-assured-common:jar:2.4.1:test
|  \- com.jayway.restassured:xml-path:jar:2.4.1:test
+- org.powermock:powermock-module-junit4:jar:1.6.2:test
|  \- org.powermock:powermock-module-junit4-common:jar:1.6.2:test
|     +- org.powermock:powermock-core:jar:1.6.2:test
|     \- org.powermock:powermock-reflect:jar:1.6.2:test
+- org.powermock:powermock-api-mockito:jar:1.6.2:test
|  +- org.mockito:mockito-all:jar:1.10.19:test
|  \- org.powermock:powermock-api-support:jar:1.6.2:test
+- org.spockframework:spock-core:jar:1.0-groovy-2.4:test
+- org.codehaus.groovy:groovy-all:jar:2.4.1:test
+- org.spockframework:spock-spring:jar:1.0-groovy-2.4:test
+- org.codehaus.groovy.modules.http-builder:http-builder:jar:0.7.1:test
|  +- net.sf.json-lib:json-lib:jar:jdk15:2.3:test
|  |  +- commons-lang:commons-lang:jar:2.4:runtime
|  |  +- commons-logging:commons-logging:jar:1.1.1:test
|  |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:test
|  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:test
|  \- xml-resolver:xml-resolver:jar:1.2:test
+- cglib:cglib-nodep:jar:3.1:test
+- xerces:xercesImpl:jar:2.11.0:provided
|  \- xml-apis:xml-apis:jar:1.4.01:compile
+- org.apache.maven.plugins:maven-failsafe-plugin:jar:2.19.1:test
|  +- org.apache.maven:maven-plugin-api:jar:2.2.1:test
|  +- org.apache.maven.surefire:maven-surefire-common:jar:2.19.1:test
|  |  +- org.apache.maven.surefire:surefire-booter:jar:2.19.1:test
|  |  +- org.apache.maven:maven-artifact:jar:2.2.1:test
|  |  |  \- org.codehaus.plexus:plexus-utils:jar:1.5.15:test
|  |  +- org.apache.maven:maven-plugin-descriptor:jar:2.2.1:test
|  |  |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:test
|  |  +- org.apache.maven:maven-project:jar:2.2.1:test
|  |  |  +- org.apache.maven:maven-settings:jar:2.2.1:test
|  |  |  +- org.apache.maven:maven-profile:jar:2.2.1:test
|  |  |  +- org.apache.maven:maven-artifact-manager:jar:2.2.1:test
|  |  |  |  \- backport-util-concurrent:backport-util-concurrent:jar:3.1:test
|  |  |  +- org.apache.maven:maven-plugin-registry:jar:2.2.1:test
|  |  |  \- org.codehaus.plexus:plexus-interpolation:jar:1.11:test
|  |  +- org.apache.maven:maven-model:jar:2.2.1:test
|  |  +- org.apache.maven:maven-core:jar:2.2.1:test
|  |  |  +- org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1:test
|  |  |  +- org.apache.maven.wagon:wagon-http:jar:1.0-beta-6:test
|  |  |  |  \- org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6:test
|  |  |  |     +- nekohtml:xercesMinimal:jar:1.9.6.2:test
|  |  |  |     +- nekohtml:nekohtml:jar:1.9.6.2:test
|  |  |  |     \- commons-httpclient:commons-httpclient:jar:3.1:test
|  |  |  +- org.apache.maven.wagon:wagon-webdav-jackrabbit:jar:1.0-beta-6:test
|  |  |  |  +- org.apache.jackrabbit:jackrabbit-webdav:jar:1.5.0:test
|  |  |  |  |  \- org.apache.jackrabbit:jackrabbit-jcr-commons:jar:1.5.0:test
|  |  |  |  \- org.slf4j:slf4j-nop:jar:1.5.3:test
|  |  |  +- org.slf4j:slf4j-jdk14:jar:1.7.22:test
|  |  |  +- org.apache.maven.reporting:maven-reporting-api:jar:2.2.1:test
|  |  |  |  \- org.apache.maven.doxia:doxia-logging-api:jar:1.1:test
|  |  |  +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:test
|  |  |  +- org.apache.maven:maven-repository-metadata:jar:2.2.1:test
|  |  |  +- org.apache.maven:maven-error-diagnostics:jar:2.2.1:test
|  |  |  +- org.apache.maven:maven-monitor:jar:2.2.1:test
|  |  |  +- classworlds:classworlds:jar:1.1:test
|  |  |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:test
|  |  |     \- org.sonatype.plexus:plexus-cipher:jar:1.4:test
|  |  \- org.apache.maven:maven-toolchain:jar:2.2.1:test
|  +- org.apache.maven.surefire:surefire-api:jar:2.19.1:test
|  \- org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3:test
+- io.springfox:springfox-swagger2:jar:2.6.1:compile
|  +- io.swagger:swagger-annotations:jar:1.5.10:compile
|  +- io.swagger:swagger-models:jar:1.5.10:compile
|  +- io.springfox:springfox-spi:jar:2.6.1:compile
|  |  \- io.springfox:springfox-core:jar:2.6.1:compile
|  +- io.springfox:springfox-schema:jar:2.6.1:compile
|  +- io.springfox:springfox-swagger-common:jar:2.6.1:compile
|  +- io.springfox:springfox-spring-web:jar:2.6.1:compile
|  +- com.fasterxml:classmate:jar:1.3.3:compile
|  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
|  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
|  \- org.mapstruct:mapstruct:jar:1.0.0.Final:compile
\- io.springfox:springfox-swagger-ui:jar:2.6.1:compile
4

1 回答 1

1

由于您使用的是 Jetty,因此您应该添加spring-cloud-starter-contract-stub-runner-jetty- 这样启动的 WireMock 将使用正确的容器。

于 2017-07-18T15:39:56.033 回答