登录和签出用户重定向到主页如何在SAP Hybris中重定向到购物车页面

时间:2020-04-06 09:28:08

标签: java spring hybris backoffice impex

以我为例。用这种方法

onAuthenticationSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) throws IOException, ServletException {
     final RequestCache requestCache = new HttpSessionRequestCache();
     final SavedRequest savedRequest = requestCache.getRequest(request, response);

我正在获取saveRequest为NULL如何获得我的预期结果

1 个答案:

答案 0 :(得分:1)

CheckoutLoginController.java中, 添加private static final String REFERER = "referer";

doCheckoutLogin方法中,添加request.getSession().setAttribute("redirectTargetUrl", request.getHeader(REFERER));

此后,请求将添加到会话中。

相关问题