读书人

配置ssh常见错误

发布时间: 2013-01-18 10:22:42 作者: rapoo

配置ssh常见异常
<!--********* DAO和Service 层的 spring 文件 *********--> <context-param> <param-name>contextConfigLocation</param-name> <param-value> <!--此处记得加逗号--> /WEB-INF/spring/oa/email-cfg.xml, /WEB-INF/spring/oa/dataelement-cfg.xml </param-value> </context-param>

?3、异常:org.springframework.beans.NotWritablePropertyException: Invalid property 'dataElementDao' of bean class [com.kinth.oa.dataelement.service.impl.DataElementServiceImpl]: Bean property 'dataElementDao' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
原因是没有写setDataElementDao方法。

4、异常:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named

原因可能是(1)service没注入。(2)注入是写在某个xml中,但没有配置到web.xml中。

读书人网 >编程

热点推荐