tomcat启动时加载配置文件 报错
原因: @serice("customerService") 和@Repository(value="customerDao") 解决: 直接@serice 和 @Repository
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'customerDao' of bean class [cn.itcast.service.CustomerServiceImpl]: Bean property 'customerDao' 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:1518)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'customerDao' of bean class [cn.itcast.service.CustomerServiceImpl]: Bean property 'customerDao' 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:231)
at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:423)
at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:280)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514)
... 22 more
tomcat启动时加载配置文件 报错的更多相关文章
- Tomcat启动时加载数据到缓存---web.xml中listener加载顺序(例如顺序:1、初始化spring容器,2、初始化线程池,3、加载业务代码,将数据库中数据加载到内存中)
最近公司要做功能迁移,原来的后台使用的Netty,现在要迁移到在uap上,也就是说所有后台的代码不能通过netty写的加载顺序加载了. 问题就来了,怎样让迁移到tomcat的代码按照原来的加载顺序进行 ...
- bash启动时加载配置文件过程
本文目录: 1.1 判断是否交互式.是否登录式 1.2 几种常见的bash启动方式 1.3 加载bash环境配置文件 当用户登录系统时,会加载各种bash配置文件,还会设置或清空一系列变量,有时还会执 ...
- Tomcat启动时加载数据到缓存---web.xml中listener加载顺序(优先初始化Spring IOC容器)
JavaWebSpringTomcatCache 最近用到在Tomcat服务器启动时自动加载数据到缓存,这就需要创建一个自定义的缓存监听器并实现ServletContextListener接口,并且 ...
- Servlet在启动时加载的tomcat源码(原创)
tomcat 8.0.36 知识点: 通过配置loadOnStartup可以设置Servlet是否在Tomcat启动时加载,以及按值大小进行有序加载,其最小有效值为0,最大有效值为Integer.MA ...
- 微服务架构 | *2.3 Spring Cloud 启动及加载配置文件源码分析(以 Nacos 为例)
目录 前言 1. Spring Cloud 什么时候加载配置文件 2. 准备 Environment 配置环境 2.1 配置 Environment 环境 SpringApplication.prep ...
- C#拖曳控件加载,bll报错问题
C#拖曳控件加载,bll报错问题,加载时实例如化bll时加上一个判断 if (!(GetService(typeof(IDesignerHost)) != null || Sys ...
- web.xml中配置启动时加载的servlet,load-on-starup
web.xml中配置启动时加载的servlet,load-on-starup 使用servlet来初始化配置文件数据: 在servlet的配置当中,<load-on-startup>1&l ...
- ElasticSearch 启动时加载 Analyzer 源码分析
ElasticSearch 启动时加载 Analyzer 源码分析 本文介绍 ElasticSearch启动时如何创建.加载Analyzer,主要的参考资料是Lucene中关于Analyzer官方文档 ...
- 设置程序启动时加载的storyboard
这个设置表明:程序启动时会加载Main.storyboard
随机推荐
- 【VS2013生成DirectX Tutorials时遇到的错误】无法解析的外部符号 _D3D10CreateDeviceAndSwapChain@32
本文为大便一箩筐的原创内容,转载请注明出处,谢谢:http://www.cnblogs.com/dbylk/p/3696472.html 今天尝试编译DirectX10中的一个Turorials时, ...
- element-ui树结构懒加载
在实际项目中,往往树结构数据量较大,这时树节点必须懒加载 element-ui树的懒加载: <div style="width:100%;height:420px;overflow: ...
- nginx默认语法
vi /etc/nginx/nginx.conf user 设置nginx服务的系统使用用户worker_processes 工作进程数error_log nginx的错误日志pid nginx服务启 ...
- 《ASP.NET夜话》 - 书摘精要
(P14) 如果客户端启用了Cookie,那么客户端与服务器之间通过Cookie来传递SessionID的值:如果客户端没有启用Cookie,就会通过URL来传递SessionID的值: (P15) ...
- 常用stl(c++)
众所周知,c++的模板库是相当强大的. 下面我来列举一些常用的,(神奇的) //部分材料选自<算法竞赛入门经典(第2版)>(刘汝佳) 一,algorithm (算法) min(a,b)-- ...
- 20165210 Java第二次实验报告
20165210 实验二 Java面向对象程序设计 一.面向对象程序设计1--单元测试和TDD 实验要求 参考 http://www.cnblogs.com/rocedu/p/6371315.html ...
- bzoj3597 方伯伯运椰子
有一个 DAG,有一个源点,一个汇点和很多条边,每条边有花费 $d_i$ 和最大流量 $c_i$,可以花 $b_i$ 的钱把最大流量增加 $1$,花 $a_i$ 的钱把最大流量减少 $1$ 现在要进行 ...
- 部署你的分布式调用链跟踪框架skywalking
使用docker-compose 一键部署你的分布式调用链跟踪框架skywalking https://www.cnblogs.com/huangxincheng/p/9666930.html 一旦你 ...
- java 实现树形结构
package tree; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; import java ...
- 锁存器 Latch v.s. 触发器 Flip-Flop
转载 http://guqian110.github.io/pages/2014/09/23/latch_versus_flip_flop.html 根据 Wiki: Flip-flop (elec ...