Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在SavedRequestStataWareAuthenticationSuccessHandler上注入spring数据存储库_Spring_Spring Mvc_Spring Security_Spring Data Jpa - Fatal编程技术网

如何在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设置只是在中自动连接数据源(您正在使用吗?),应该可以解决这个问题。嗨,有人可以帮我解决这个问题吗?