无法将Jersey重定向迁移到Spring重定向

时间:2019-11-06 06:19:20

标签: java spring redirect iframe jersey

我有以下球衣代码可在iframe中重定向(redirectLink是同一域中的完整URL):

Geckodriver

我尝试使用ResponseEntity迁移到Spring:

Firefox WebDriver

但是我看到的是空白页面,而不是重定向

  • 我记录到完整的URL正确

文档示例:

private Response redirect(String redirectLink) {
   return Response.seeOther(new URI(redirectLink)).build();
}

1 个答案:

答案 0 :(得分:0)

我成功使用了RedirectView(使用到域的部分/相对路径)

public RedirectView  confirm(String partialPath) {
   return new RedirectView(partialPath);
}
  

重定向到绝对,上下文相关或当前请求相对URL的视图