Error creating bean with name 'AdminShowUser' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'adminService' of bean class [cn.cslg.action.AdminShowUser]: Bean property 'adminService' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?我在做学生购书系统,发布后出现这个错 求解ssh
<bean id="adminDao" class="cn.cslg.dao.impl.AdminDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="adminService" class="cn.cslg.service.impl.AdminServiceImpl">
<property name="adminDao">
<ref bean="adminDao"/>
</property>
</bean>
<bean id="AdminAction" class="cn.cslg.action.AdminAction">
<property name="adminService">
<ref bean="adminService"/>
</property>
</bean>
<bean id="AdminShowUser" class="cn.cslg.action.AdminShowUser">
<property name="adminService">
<ref bean="adminService"/>
</property>
</bean>
这个是代码,您帮忙看下
<action name="AdminLogin" class="cn.cslg.action.AdminAction" method="AdminLogin">
<result name="success">/pages/AdminLogin_success.jsp</result>
<result name="error">AdminLogin.jsp</result>
</action>
<!-- 管理员登离 -->
<action name="AdminLogout" class="cn.cslg.action.AdminAction" method="AdminLogout">
<result name="success">/pages/Logout_success.jsp</result>
</action> <!-- 显示所有用户 -->
<action name="AdminShowUser" class="cn.cslg.action.AdminShowUser">
<result name="success">/pages/ShowUsers.jsp</result>
<result name="error">/pages/AdminError.jsp</result>
</action>能够登录,但是登离和显示就不行
setAdminDao