前台生成生成特殊格式,后台在进行转换
前台:$("#yxbz").data("url","dictionary/dropDown/"+encodeURI(encodeURI("有效标志")));
后台:@ResponseBody
@RequestMapping(value = "/dropDown/{boxName}",method = {RequestMethod.GET, RequestMethod.POST})
public Result queryDropDown(@PathVariable String boxName) throws UnsupportedEncodingException {
boxName=java.net.URLDecoder.decode(boxName,"UTF-8");
return ResultUtils.bulidResult(dictionaryService.selectDropDown(boxName));
}
前台:$("#yxbz").data("url","dictionary/dropDown/"+encodeURI(encodeURI("有效标志")));
后台:@ResponseBody
@RequestMapping(value = "/dropDown/{boxName}",method = {RequestMethod.GET, RequestMethod.POST})
public Result queryDropDown(@PathVariable String boxName) throws UnsupportedEncodingException {
boxName=java.net.URLDecoder.decode(boxName,"UTF-8");
return ResultUtils.bulidResult(dictionaryService.selectDropDown(boxName));
}