我有以下代码:
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)
此代码是自动生成的,因此我无法在此处进行任何更改或调试。