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

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

Geckodriver

我尝试使用ResponseEntity迁移到Spring:

Firefox WebDriver

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

  • 我记录到完整的URL正确

文档示例:

private Response redirect(String redirectLink) {
   return Response.seeOther(new URI(redirectLink)).build();
}
anye417 回答:无法将Jersey重定向迁移到Spring重定向

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

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

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

本文链接:https://www.f2er.com/3154601.html

大家都在问