严重: Context initialization failed --->请教.

suke_008 2010-05-26 03:27:16
大家好!我用SSH做项目,配置完启动时一直提示以下,实在找不到是什么原因.还请各位帮忙指点...在线等.感谢!!


严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'articleService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'articleDAO' of bean class [com.ytao.service.impl.ArticleServiceImpl]: Bean property 'articleDAO' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'articleDAO' of bean class [com.ytao.service.impl.ArticleServiceImpl]: Bean property 'articleDAO' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?


...全文
617 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
suke_008 2010-05-26
  • 打赏
  • 举报
回复
发现了,原来是DAO注入到业务层时少了个Getter方法.感谢各位!!
suke_008 2010-05-26
  • 打赏
  • 举报
回复
articleDAO 就是一个数据访问层的一个类而已啊....可否说明白点? 是配置错了还是哪个地访问题?谢谢.
ouyangxiaokang6 2010-05-26
  • 打赏
  • 举报
回复
应该是articleDAO里面的属性有问题。仔细检查一下。
学习Java中 2010-05-26
  • 打赏
  • 举报
回复
Bean property 'articleDAO' is not writable or has an invalid setter method

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧