@RequestMapping(method = RequestMethod.GET, value = "/exportExcel/{info}")
public String exportUser(@PathVariable(“info”) String info){
//
}
http://localhost:8080/user/exportExcel/guangdong.guangzhou
参数guangdong.guangzhou中包含点号【.】,传递进来的参数只有点号前面的字符串guangdong
解决办法一:
@RequestMapping(method = RequestMethod.GET, value = "/exportExcel/{info:.+}")
public String exportUser(@PathVariable(“info”) String info){
//
}
解决方法二:
@RequestMapping(method = RequestMethod.POST, value = "/exportExcel")
public String exportUser(@RequestParam String info){
//
}