JSF,spring安全集成,如何配置dataSource jdbc

时间:2015-05-21 16:35:18

标签: spring jsf spring-security

我的问题是:考虑到我正在使用JSF框架,使用tutorial like this (point 5)会不会有意义? 我知道spring和jsf不应该混在一起,但我不知道在哪里划线。

在spring安全文档中,他们为JDBC身份验证注入数据源,如下所示:

@Autowired private DataSource dataSource; // This, I don't know what to do

@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
    auth
        .jdbcAuthentication()
            .dataSource(dataSource)
            .withDefaultSchema()
            .withUser("user").password("password").roles("USER").and()
            .withUser("admin").password("password").roles("USER", "ADMIN");
}

我正在使用JSF并且我的数据源无处指定,因为这样,我有点不愿意使用与Spring相关的技术:Using JSF as view technology of Spring MVC

0 个答案:

没有答案