Exception encountered during context initialization - cancelling refresh attempt: org.springframewor

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountService' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'names' of bean class

F:\Java\jdk1.8.0_66\bin\java.exe -javaagent:F:\idea2018\Idea\Idea\ideaIU-2018.1.1.win\lib\idea_rt.jar=6604:F:\idea2018\Idea\Idea\ideaIU-2018.1.1.win\bin -Dfile.encoding=UTF-8 -classpath F:\Java\jdk1.8.0_66\jre\lib\charsets.jar;F:\Java\jdk1.8.0_66\jre\lib\deploy.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\access-bridge-64.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\cldrdata.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\dnsns.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\jaccess.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\jfxrt.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\localedata.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\nashorn.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\sunec.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\sunjce_provider.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\sunmscapi.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\sunpkcs11.jar;F:\Java\jdk1.8.0_66\jre\lib\ext\zipfs.jar;F:\Java\jdk1.8.0_66\jre\lib\javaws.jar;F:\Java\jdk1.8.0_66\jre\lib\jce.jar;F:\Java\jdk1.8.0_66\jre\lib\jfr.jar;F:\Java\jdk1.8.0_66\jre\lib\jfxswt.jar;F:\Java\jdk1.8.0_66\jre\lib\jsse.jar;F:\Java\jdk1.8.0_66\jre\lib\management-agent.jar;F:\Java\jdk1.8.0_66\jre\lib\plugin.jar;F:\Java\jdk1.8.0_66\jre\lib\resources.jar;F:\Java\jdk1.8.0_66\jre\lib\rt.jar;F:\workspaceStudy\My_Spring_Demo\target\classes;F:\JavaTool\apache-maven-3.5.4-bin\repository\repository\org\springframework\spring-context\5.0.2.RELEASE\spring-context-5.0.2.RELEASE.jar;F:\JavaTool\apache-maven-3.5.4-bin\repository\repository\org\springframework\spring-aop\5.0.2.RELEASE\spring-aop-5.0.2.RELEASE.jar;F:\JavaTool\apache-maven-3.5.4-bin\repository\repository\org\springframework\spring-beans\5.0.2.RELEASE\spring-beans-5.0.2.RELEASE.jar;F:\JavaTool\apache-maven-3.5.4-bin\repository\repository\org\springframework\spring-core\5.0.2.RELEASE\spring-core-5.0.2.RELEASE.jar;F:\JavaTool\apache-maven-3.5.4-bin\repository\repository\org\springframework\spring-jcl\5.0.2.RELEASE\spring-jcl-5.0.2.RELEASE.jar;F:\JavaTool\apache-maven-3.5.4-bin\repository\repository\org\springframework\spring-expression\5.0.2.RELEASE\spring-expression-5.0.2.RELEASE.jar com.cumd.servlet.Client
十月 07, 2019 10:37:02 上午 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@736e9adb: startup date [Mon Oct 07 10:37:02 CST 2019]; root of context hierarchy
十月 07, 2019 10:37:02 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
十月 07, 2019 10:37:02 上午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountService' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'names' of bean class [com.cumd.service.impl.AccountServiceImpl]: Bean property 'names' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountService' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'names' of bean class [com.cumd.service.impl.AccountServiceImpl]: Bean property 'names' 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.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1650)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1357)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:758)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:85)
    at com.cumd.servlet.Client.main(Client.java:15)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'names' of bean class [com.cumd.service.impl.AccountServiceImpl]: Bean property 'names' 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.createNotWritablePropertyException(BeanWrapperImpl.java:247)
    at org.springframework.beans.AbstractNestablePropertyAccessor.processLocalProperty(AbstractNestablePropertyAccessor.java:426)
    at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:278)
    at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:266)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:97)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:77)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1646)
    ... 13 more


Process finished with exit code 1

解决方案:配置文件的错误,修改配置文件

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值