@autowired Auth security:authentication-manager

时间:2014-09-29 23:55:40

标签: java spring spring-security

这是我的上下文文件:

<security:authentication-manager id="authenticationManager">
    <security:authentication-provider user-service-ref="userDao">
        <security:password-encoder ref="passwordEncoder"></security:password-encoder>
    </security:authentication-provider>
</security:authentication-manager>


<context:component-scan base-package="net.myrest.resources" />

我正在尝试将自动安装的身份验证管理器发送到myrest.resource.file,但每次它都为null。

@Autowired
@Qualifier("authenticationManager")
private AuthenticationManager authManager;

0 个答案:

没有答案