Closed mysterin closed 5 years ago
比如这个 URL:
test-url/download-report/xxx.docx
后台匹配:
@RequestMapping("download-report/{docname}") public ResponseEntity<byte[]> downloadReport(@PathVariable String docname)
这样 docname 只能获取 xxx 这个值, 后面的 .docx 是拿不到的, 所以要改成这样获取:
docname
@RequestMapping("download-report/{docname:.+}") public ResponseEntity<byte[]> downloadReport(@PathVariable String docname)
比如这个 URL:
后台匹配:
这样
docname
只能获取 xxx 这个值, 后面的 .docx 是拿不到的, 所以要改成这样获取: