1
回答
deployerConfigContext.xml的问题
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

将deployerConfigContext.xml中的

<bean class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler"/>



换成:

<bean class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
	<property name="dataSource" ref=" casDataSource " />
	<property name="sql" value="select password from t_admin_user where username = ?" />
	<property  name="passwordEncoder"  ref="myPasswordEncoder"/>
</bean>



<bean id="casDataSource"
	class="org.springframework.jdbc.datasource.DriverManagerDataSource">
		<property name="driverClassName">
			<value>com.mysql.jdbc.Driver</value>
		</property>
		<property name="url">
			<value>jdbc:mysql://localhost:3306/cas_demo</value>
		</property>
		<property name="username">
			<value>root</value>
		</property>
		<property name="password">
			<value></value>
		</property>
	</bean>



<bean id="passwordEncoder" 
            class="org.jasig.cas.authentication.handler.MyPasswordEncoder"/>



然后报这个错

Error creating bean with name 'org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler#31829b9f' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Cannot resolve reference to bean ' casDataSource ' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ' casDataSource ' is defined



求高手解决一下

举报
贰拾
发帖于2年前 1回/424阅
顶部