【发布时间】:2016-05-24 23:38:09
【问题描述】:
我正在尝试在我的 customerDoaImpl 文件的服务 url 中附加我的查询,但它没有返回正确的值。我尝试在服务端使用soapUI进行测试,但它正在向我的请求返回正确的数据。
我正在尝试根据 productId 和 datePeriod 搜索结果 这是我的代码 sn-p-
url.append(getServiceUrl()).append( "/transaction/find/customerrequestv2?id={productId}&dateperiod={Dateperiod}");
服务端控制器-
@RequestMapping(value = "/find/customerrequestv2", method = RequestMethod.GET,produces = "application/json")
public List<Customer> CustomerRequestv2(@RequestParam(value = "id") final String pProductId,
@RequestParam(value = "dateperiod") final String pDateperiod)
我在查询中做错了什么?
【问题讨论】:
-
确保对查询字符串进行编码。
标签: spring web-services rest spring-mvc spring-data