Wiremock问题,使用Wiremock主体转换器jar访问单个json文件中的多个存根

问题描述 投票:0回答:1

[线程“主”中的异常com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:无法识别的字段“映射”(com.github.tomakehurst.wiremock.stubbing.StubMapping类),未标记为可忽略(10个已知属性:“ response”,“ requiredScenarioState”,“ priority”,“ persistent”,“ id”,“ postServeActions”,“ request”,“ newScenarioState”,“ uuid”,“ scenarioName”]]]

启动wiremock的命令

java -cp“ wiremock-body-transformer-1.1.3.jar; wiremock-2.3.1-standalone.jar” com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --verbose --extensions com.opentable.extension .BodyTransformer --port 8082

注意:在运行wiremock-2.3.1-standalone.jar时,访问wiremock-body-transformer时不会遇到任何问题,仅此问题

wiremock wiremock-standalone
1个回答
0
投票

或者,您可以调用wiremock api并一次性发布多个存根(json)。尝试这个。 Solution here

© www.soinside.com 2019 - 2024. All rights reserved.