如何在SavedRequestStataWareAuthenticationSuccessHandler上注入spring数据存储库
我有一个自定义的身份验证成功处理程序,如下所示:如何在SavedRequestStataWareAuthenticationSuccessHandler上注入spring数据存储库,spring,spring-mvc,spring-security,spring-data-jpa,Spring,Spring Mvc,Spring Security,Spring Data Jpa,我有一个自定义的身份验证成功处理程序,如下所示: 公共类CustomAuthenticationHandler扩展了SavedRequestAwareAuthenticationSuccessHandler{ 验证成功时公共无效(HttpServletRequest请求, HttpServletResponse(响应、身份验证) 抛出ServletException、IOException{ .... } } 我如何在这里注入我的Spring数据存储库?我试着用不同的方法做,但没有成功=/ “
公共类CustomAuthenticationHandler扩展了SavedRequestAwareAuthenticationSuccessHandler{
验证成功时公共无效(HttpServletRequest请求,
HttpServletResponse(响应、身份验证)
抛出ServletException、IOException{
....
}
}
我如何在这里注入我的Spring数据存储库?我试着用不同的方法做,但没有成功=/ “我试着用不同的方法做,但没有成功”=>展示你的尝试,它会很有用。+1符合Getz的说法。从目前可见的情况来看,假设一个工作的spring设置只是在中自动连接数据源(您正在使用吗?),应该可以解决这个问题。嗨,有人可以帮我解决这个问题吗?