2021
02-24
02-24
spring boot @PathVariable传递带反斜杠参数 / 的处理
我就废话不多说了,大家还是看完整的代码吧~@RequestMapping(value="/modules/{moduleBaseName}/**",method=RequestMethod.GET)@ResponseBodypublicStringmoduleStrings(@PathVariableStringmoduleBaseName,HttpServletRequestrequest){finalStringpath=request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE).toString();finalStringbestMatchingPattern=request.getAtt...
继续阅读 >