为什么对“ get()”的调用返回错误?

时间:2019-07-09 12:58:52

标签: spring-boot spring-test rest-assured mockmvc

我有以下代码:

myWebView

最后一行导致错误(“ get(” / address“)”)

“地址”位与我所请求的微服务有关

这是控制台日志:

java.lang.NullPointerException: null
    at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:227)
    at org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder$StaticRequestMappingHandlerMapping.registerHandlers(StandaloneMockMvcBuilder.java:486)
    at org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder.registerMvcSingletons(StandaloneMockMvcBuilder.java:352)
    at org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder.initWebAppContext(StandaloneMockMvcBuilder.java:337)
    at org.springframework.test.web.servlet.setup.AbstractMockMvcBuilder.build(AbstractMockMvcBuilder.java:139)
    at io.restassured.module.mockmvc.internal.MockMvcFactory.build(MockMvcFactory.java:79)
    at io.restassured.module.mockmvc.internal.MockMvcRequestSpecificationImpl.when(MockMvcRequestSpecificationImpl.java:723)
    at io.restassured.module.mockmvc.internal.MockMvcRequestSpecificationImpl.get(MockMvcRequestSpecificationImpl.java:751)
    at io.restassured.module.mockmvc.internal.MockMvcRequestSpecificationImpl.get(MockMvcRequestSpecificationImpl.java:62)
    at ContractVerifierTest.validate_shouldReturnPreviousAddress(ContractVerifierTest.java:23)

此代码是自动生成的,因此我无法在此处进行任何更改或调试。

0 个答案:

没有答案