当使用@PathVariable传递路径参数时,如果参数存在小数点会丢失
比如/report/{filename}
请求路径 /report/abc.pdf 调用到后台会变成/report/abc
Controller方法注解如下:
@GetMapping(value = “/report/{filename:.+}”,)
在参数后面添加个冒号和一个小数点在加上一个加号:{filename:.+}
当使用@PathVariable传递路径参数时,如果参数存在小数点会丢失
比如/report/{filename}
请求路径 /report/abc.pdf 调用到后台会变成/report/abc
Controller方法注解如下:
@GetMapping(value = “/report/{filename:.+}”,)
在参数后面添加个冒号和一个小数点在加上一个加号:{filename:.+}