私は私のカスタムの成功ハンドラで春のセッションBeanを注入することができないよ:sessionControllerにnullポインタ例外を返すカスタムスプリングセキュリティログイン成功ハンドラでセッションBeanを注入する方法
@Component
public class CustomSavedRequestAwareAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler {
@Resource
private SessionController sessionController;
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException {
super.onAuthenticationSuccess(request, response, authentication);
sessionController.setUtenteOnline();
}
。 ありがとうございます
@Autowireを使用することを意味しませんか? –
@Autowiredでも動作しません –
「スプリングセッションBean」とはどういう意味ですか? – skaffman