Spring编码不正确

时间:2016-08-22 22:49:04

标签: java spring-mvc

@RequestMapping(value = "getCategoryAspectValues", method = RequestMethod.GET)
    @ResponseBody
    public Map<String, String> retrieveCategoryAspectValues(@RequestParam long cat, @RequestParam String aspectName) {
        return new GetAspectsTask().getAspectValues(cat, (StringUtils.encodeAspectName(aspectName)));       
    }

当请求网址:http://localhost:8080/rpt/getCatValues?cat=55793&aName=US+Shoe+Size+(Women%27s)如下所示时,解码的aspectName值为“US Show Size(Women s)”而不是“US Show Size(Women's)”。如果提供了错误编码的原因,将会很有帮助。

0 个答案:

没有答案