我想从带有post参数的spring控制器重定向到另一个页面(在我的应用程序之外).我搜索了很多,但没有任何解决方案.
您将无法添加 POST,但可以使用 GET 重定向。请执行下列操作:
@RequestMapping("/redirectMe")
public void redirectMe (HttpServletResponse response){
response.sendRedirect("http://redirected.com/form?someGetParam=foo");
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14531 次 |
| 最近记录: |