Java Reference
In-Depth Information
org.jboss.naming.client
</prop>
</props>
</property>
</bean>
</beans>
As shown in Listing 6-10, the
JdbcDaoImpl
requires a
DataSource
reference to execute
its query. The
JdbcDaoImpl
assumes you have set up two tables in the database as shown
in Figure 6-7.
Figure 6-7.
Spring Security: database tables
To retrieve data from these tables, the
JdbcDaoImpl
uses the default SQL statements
shown in Listing 6-11.
Listing 6-11.
applicationContext-security.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
<beans>
<!—Other beans -->
<bean name="daoAuthenticationProvider" class="org.springframework.
å
security.providers.dao.DaoAuthenticationProvider">
<property name="userDetailsService" ref="authenticationDao "/>
</bean>

