j2EE编写时易错问题。-创新互联

org.springframework.web.context.support.XmlWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'user_service' defined in class path resource [META-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'recordDao' of bean class [com.jixiang.service.impl.UserServiceImpl]: Bean property 'recordDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

我们提供的服务有:成都做网站、成都网站建设、微信公众号开发、网站优化、网站认证、萝北ssl等。为超过千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的萝北网站制作公司

28-Dec-2017 13:48:46.127 严重 [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'user_service' defined in class path resource [META-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'recordDao' ofbean class [com.jixiang.service.impl.UserServiceImpl]:Bean property 'recordDao' 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:1568)

意思就是在com.jixiang.service.impl.UserServiceImpl这个类中没有找到recordDao,或者没有recordDao的setter方法。

但是你在Spring的applicationContext.xml配置中又加入了这个配置

<bean id="managerTemplate" abstract="true" lazy-init="true"
     p:mangerDao-ref="managerDao"
     p:userDao-ref="userDao"
     p:recordDao-ref="recordDao"
     />
<bean id="user_service"
     class="com.jixiang.service.impl.UserServiceImpl"
     parent="managerTemplate"/><!--class的类名一定要对-->

创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。

当前标题:j2EE编写时易错问题。-创新互联
网页链接:https://www.cdcxhl.com/article22/discjc.html

成都网站建设公司_创新互联,为您提供定制开发网站建设营销型网站建设标签优化外贸建站微信小程序

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都网页设计公司