如何在春季安全性中包含glassfish数据源

时间:2020-04-12 06:12:55

标签: spring jdbc spring-security datasource jndi


我的glassfish服务器中有一个JDBC资源,用于确保连接池,并将其与hibernate一起使用。
今天,我决定在我的项目中实现Spring Security,但是我不知道如何将我的数据源链接到它。

<authentication-manager>
    <authentication-provider>
    <password-encoder hash="bcrypt"/>
        <jdbc-user-service data-source-ref="jdbc/MyDS"/>
    </authentication-provider>
</authentication-manager>

我尝试了此操作,但是导致发布失败。

Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting constructor argument with key [0];

很明显,它是在请求一个bean,而不是一个dataSource名称。我该怎么办?
谢谢。

0 个答案:

没有答案
相关问题