使用Spring报错:No default constructor found;
Exception in thread "main" org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'CustomerBean' defined in class path resource [Spring-Customer.xml]:
Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.yiibai.common.Customer]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.yiibai.common.Customer.()
使用Spring注解时要提空默认的构造函数
提供默认的构造函数就好了。
使用Spring报错:No default constructor found;的更多相关文章
- Spring报错: org.springframework.beans.factory.support.BeanDefinitionValidationException: Couldn't find an init method named 'init' on bean with name 'car'(待解答)
在Spring工程里,有一个Car类的bean,Main.java主程序,MyBeanPostProcessor.java是Bean后置处理器. 文件目录结构如下: Car.java package ...
- Spring报错:java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist
感谢:http://blog.chinaunix.net/uid-20681545-id-184633.html提供的解决方案,非常棒 ! 问题说明: 新建一个Spring项目,新建一个Bean类:H ...
- spring报错NoClassDefFoundError等与第三方jar包导入问题
今天配置spring,遇到各种报错的问题,做一个小小总结. 1.刚开始我忘了引入commons-logging,报错.--解决方式:下载并引入该jar包 2.spring以及commons-loggi ...
- spring 报错
一. java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter 解决方案: 1. ...
- Spring报错:Exception in thread "main" java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source)
简单搭建了一个Spring Maven工程就报错: 看到网上说是JDK 7 和 Spring3.x :JDK编译级别设置成1.7,仍然没有得到解决,采用版本为 3.2.0.RELEASE <b ...
- 安装spring报错:Cannot complete the install because of a conflicting dependency.
问题: 在Eclipse里安装Spring插件,help->install new software用端点安装,说是出现软件依赖错误报错如下: Cannot complete the insta ...
- Spring报错汇总笔记
报错信息: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing X ...
- spring报错can't find resources
整合spring的时候报错can't find resource[../././.xml] 这两天在整个spring,发现单元测试的时候就可以正常运行,放在tomcat中就报错initial cont ...
- Spring报错——Scope 'session' is not active for the current thread
在对程序进行了一些修改后,运行发现spring报了这个错误,这是由于我设置了一个@Scope("session")导致的,现记录下解决方法. 解决方法: 将Scope设置为scop ...
随机推荐
- 用CSS3实现文字描边效果【效果在这儿,创意在你!】
CSS3作为新兴的前端技术可以实现很多复杂变化的效果,比如文字描边. 这里主要用到text-shadow属性,顾名思义就是为文字加上阴影效果.例: text-shadow:10px 5px 2px # ...
- AJAX跨域请求json数据的实现方法
这篇文章介绍了AJAX跨域请求json数据的实现方法,有需要的朋友可以参考一下 我们都知道,AJAX的一大限制是不允许跨域请求. 不过通过使用JSONP来实现.JSONP是一种通过脚本标记注入的方式, ...
- 网络协议之bt---bt协议详解 DHT篇(下)
-------------------------author:pkf -------------------------------qq:1327706646 ------------------- ...
- NPOI帮助类(Excel转DataTable、DataTable转Excel)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using NPOI.SS. ...
- Project Navigator Help: Creating a Workspace in Xcode
Creating a Workspace Start a multiproduct development endeavor by creating a workspace. 1.Choose Fil ...
- How many virtual users do I need? 计算需要的vuser
基本公式:--------English:Total Transations = TPS * Vuser==>Vuser = Total Transations / TPS=========== ...
- SQLServer跨服务器访问数据库(openrowset/opendatasource/openquery)
SQLServer跨服务器访问数据库(openrowset/opendatasource/openquery) 1.启用Ad Hoc Distributed Queries 在使用openrowset ...
- [转] Windows局域网通过NTP设置时间同步
NTP(Network Time Protocol,网络时间协议)是用来使网络中的各个计算机时间同步的一种协议. 如果局域网计算机(Windows系统)可以连接Internet,可以通过“控制面板”— ...
- error C2275: 'SOCKET' : illegal use of this type as an expression
在VC中编译xxx.c文件出现错误error C2275 illegal use of this type as an expression 问题在于C99之前要求所有的声明必须放在函数块的起始部分, ...
- OpenCV学习:Mat结构中的数据共享机制
使用Mat类,内存管理变得简单,不再像使用IplImage那样需要自己申请和释放内存. Mat是一个类,由两个数据部分组成:矩阵头(包含矩阵尺寸,存储方法,存储地址等信息)和一个指向存储所有像素值的矩 ...