Java 登录和签出用户重定向到主页如何重定向到sap hybris中的购物车页面

Java 登录和签出用户重定向到主页如何重定向到sap hybris中的购物车页面,java,spring,hybris,backoffice,impex,Java,Spring,Hybris,Backoffice,Impex,这是我的情况。用这种方法 onAuthenticationSuccessfinal HttpServletRequest请求、final HttpServletResponse响应、final Authentication身份验证引发IOException、ServletException{ final RequestCache RequestCache=新的HttpSessionRequestCache; 最终SavedRequest SavedRequest=requestCache.get

这是我的情况。用这种方法

onAuthenticationSuccessfinal HttpServletRequest请求、final HttpServletResponse响应、final Authentication身份验证引发IOException、ServletException{ final RequestCache RequestCache=新的HttpSessionRequestCache; 最终SavedRequest SavedRequest=requestCache.getRequestrequest,响应; 我正在获取savedRequest为空如何在CheckoutLoginController.java中获取预期结果, 添加私有静态最终字符串REFERER=REFERER

在doCheckoutLogin方法中,添加request.getSession.setAttributeDirectTargetUrl,request.getHeaderREFERER


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

您可能希望包含更多详细信息…请查看:。它指导您如何在成功登录后使用spring security中保存的缓存重定向。