配置数据库之后的代码:用的cas 3.52版本
把SimpleTestUsernamePasswordAuthenticationHandler注释掉 然后加了
password from t_admin_user where username=?">
com.mysql.jdbc.Driver
jdbc:mysql:/127.0.0.1/cas_demo
root
MD5
完整代码如下:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
class="org.jasig.cas.authentication.AuthenticationManagerImpl">
class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
p:httpClient-ref="httpClient" />
class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
class="org.jasig.services.persondir.support.StubPersonAttributeDao">
id="serviceRegistryDao"
class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
p:freeMemoryWarnThreshold="10" />
p:ticketRegistry-ref="ticketRegistry"
p:serviceTicketCountWarnThreshold="5000"
p:sessionCountWarnThreshold="100000" />
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
com.mysql.jdbc.Driver
jdbc:mysql://127.0.0.1:3306/cas_demo
root
之后就报404错误
但是用原来的源码就不会出现这个问题 求大神解答