代码优化

This commit is contained in:
tanghc
2019-07-24 17:01:42 +08:00
parent fb82f27a43
commit 6bc3da3fa8
5 changed files with 113 additions and 4 deletions

View File

@@ -32,4 +32,15 @@ public class RedirectController {
request.getRequestDispatcher(path).forward(request, response);
}
@RequestMapping("/{method}")
public void redirect2(
@PathVariable("method") String method
, HttpServletRequest request
, HttpServletResponse response
) throws ServletException, IOException {
request.setAttribute(SopConstants.REDIRECT_METHOD_KEY, method);
request.setAttribute(SopConstants.REDIRECT_VERSION_KEY, "1.0");
request.getRequestDispatcher(path).forward(request, response);
}
}