学习Spring的小记。。

      今天第一天写博客,应该是带着高兴的心情,因为我开始对spring入门了。。。也很想把我的好的感想写下来,也要把自己学习时遇到的问题,然后解决了问题的过程写下来。。。呵呵,,,当然,对java的心情自己一定也会在以后慢慢的道来 :)晚上接着写。。。呵呵...

     spring的方便,强大真的让人咋舌。。。但是今天调了了好久的最简单的hello word的spring 程序 竟然一直报错,天哪,我说这spring 真的如此可怕吗???我觉得在此真的值得把我的错误打出来。。。。

 

log4j:WARN No appenders could be found for logger (org.springframework.core.CollectionFactory).
log4j:WARN Please initialize the log4j system properly.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'say' defined in class path resource [hellol.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'greeting' of bean class [spring.GreetingServiceImpl]: Bean property 'greeting' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.NotWritablePropertyException: Invalid property 'greeting' of bean class [spring.GreetingServiceImpl]: Bean property 'greeting' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:668)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:570)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:735)
at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:762)
at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:751)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1069)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144)
at spring.HelloApp.main(HelloApp.java:12)
Exception in thread "main"

 

     看了这个错误,真的让我头痛,,,但是真的这回感到绝对的功夫不负有心人,原来是我的setter方法名称写错了,,,再次写在这里,也不仅是让大家知道这个常识,其实更重要的是让自己能够记住,增长自己的经验。。。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值