老应用链接替换到新链接
@RequestMapping("/myContext/**") public void redirect(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String requestUrl = request.getRequestURI(); log.info("request.getRequestURI(): old "+requestUrl); requestUrl = requestUrl.replace("myContext","myContext2");
log.info("request.getRequestURI(): new " + requestUrl); request.getRequestDispatcher(requestUrl).forward(request,response);
}
!============记录点滴成长============!