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;的更多相关文章

  1. 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 ...

  2. 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 ...

  3. spring报错NoClassDefFoundError等与第三方jar包导入问题

    今天配置spring,遇到各种报错的问题,做一个小小总结. 1.刚开始我忘了引入commons-logging,报错.--解决方式:下载并引入该jar包 2.spring以及commons-loggi ...

  4. spring 报错

    一. java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter 解决方案: 1. ...

  5. 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 ...

  6. 安装spring报错:Cannot complete the install because of a conflicting dependency.

    问题: 在Eclipse里安装Spring插件,help->install new software用端点安装,说是出现软件依赖错误报错如下: Cannot complete the insta ...

  7. Spring报错汇总笔记

    报错信息: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing X ...

  8. spring报错can't find resources

    整合spring的时候报错can't find resource[../././.xml] 这两天在整个spring,发现单元测试的时候就可以正常运行,放在tomcat中就报错initial cont ...

  9. Spring报错——Scope 'session' is not active for the current thread

    在对程序进行了一些修改后,运行发现spring报了这个错误,这是由于我设置了一个@Scope("session")导致的,现记录下解决方法. 解决方法: 将Scope设置为scop ...

随机推荐

  1. C# 发邮件 服务器响应为: 5.7.0 Must issue a STARTTLS command first

    The SMTP server requires a secure connection or the client was not authenticated. The server respons ...

  2. 在windows下编译ffmpeg

    编译ffmpeg,我在网上找了很多相关的方法,但最后都没编译成功. 所以下面就记录下自己的编译方法吧,留着以后编译的时候做参考. 1.首先,下载编译工具MinGW+Msys,搭建编译环境.工具下载地址 ...

  3. (转)Tiny210v2( S5PV210 ) 平台下 FIMD 对应 的 framebuffer 驱动中,关于 video buffer 的理解

    原文:http://www.arm9home.net/read.php?tid-25938.html 管理提醒: 本帖被 xoom 执行加亮操作(2012-12-13) 如之前所说,一直想知道显示数据 ...

  4. 谷哥的小弟学后台(04)——MySQL(4)

    探索Android软键盘的疑难杂症 深入探讨Android异步精髓Handler 具体解释Android主流框架不可或缺的基石 站在源代码的肩膀上全解Scroller工作机制 Android多分辨率适 ...

  5. C++多线程环境下注意共享资源的释放顺序

    比如我现在写一个多线程下载程序,包含DownloadTask.HttpDownload两个类. class DownloadTask { //省略n行代码 public: int m_threads; ...

  6. 批量快速的导入导出Oracle的数据(spool缓冲池、java实现)

    1. Java代码实现思路 BufferedWriter writefile = new BufferedWriter(new FileWriter(file));  writefile.write( ...

  7. jQuery语法小结(超实用)

    1.关于页面元素的引用 通过jquery的$()引用元素包括通过id.class.元素名以及元素的层级关系及dom或者xpath条件等方法,且返回的对象为jquery对象(集合对象),不能直接调用do ...

  8. Javascript定义类(class)的最新方法

    极简主义法 3.1 封装 这种方法不使用this和prototype,代码部署起来非常简单,这大概也是它被叫做"极简主义法"的原因. 首先,它也是用一个对象模拟"类&qu ...

  9. 如何使用ChemDraw改变说明文本

    作为一款全球领先的化学绘图工具,ChemDraw能够绘制各种复杂的结构方程式.ChemDraw软件还增加了新的绘图工具,能够方便化学领域的图形绘制.本教程将向大家讲解如何在ChemDraw中改变说明文 ...

  10. 安装SQL Server 2008数据库(带完整图解)

    方法/步骤   1 双击sql server 2008的.exe安装文件,进入[SQL Server 安装中心]. 2 点击界面左侧的[安装],然后点击右侧的[全新SQL Server 独立安装或向现 ...