Wiremock获取含点URL参数失败,Spring Boot+Wiremock-jre8求助
WireMock获取含点的URL查询参数值失败
我在使用Spring Boot搭配wiremock-jre8时,遇到了一个问题:无法从URL参数中获取名为product.productCharacteristic.value的带点参数值。
以下是我的Stub配置:
{ "request": { "urlPath": "/exampleOfPath", "method": "GET", "queryParameters": { "product.productCharacteristic.name": { "equalTo": "MSISDN" }, "product.productCharacteristic.value": { "matches": ".*" } } }, "response": { "status": 200, "jsonBody": { "key": "the value should be here {{request.query['product.productCharacteristic.value']}}" }, "transformers": [ "response-template" ], "headers": { "Content-Type": "application/json" } } }
我已经尝试了以下所有表达式,但都没能成功获取目标参数值:
- {{request.query.['product.productCharacteristic.value']}}
- {{request.query['product.productCharacteristic.value']}}
- {{request.query['product%2EproductCharacteristic%2Evalue']}}
- {{request.query.['product%2EproductCharacteristic%2Evalue']}}
- {{request.query.product%2EproductCharacteristic%2Evalue}}
- {{request.query.product.productCharacteristic.value}}
- {{lookup request.query 'product.productCharacteristic.value'}}
- {{lookup request.query 'product%2EproductCharacteristic%2Evalue'}}
内容的提问来源于stack exchange,提问作者Moustafa Elkady
相关产品推荐
相关产品推荐

