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. RTMP规范 消息与消息块

    Real Time Messaging Protocol(实时消息传输协议) 应用层协议 RTMP协议中, 基本数据单元称为消息(Message).当RTMP协议在互联网中传输数据的时候,消息会被拆分 ...

  2. StarRTC , AndroidThings , 树莓派小车,公网环境,视频遥控(二)小车端

    原文地址:http://blog.starrtc.com/?p=94 1 创建工程IDE:Android Studio 3.1:File>New>New Project>输入项目名& ...

  3. HBase系统入门--整体介绍

    转自:http://www.aboutyun.com/thread-8957-1-2.html 问题导读:1.HBase查询与写入哪个更好一些?2.HBase面对复杂操作能否实现?3.Region服务 ...

  4. 网络协议之bt---bt协议详解 DHT篇(下)

    -------------------------author:pkf -------------------------------qq:1327706646 ------------------- ...

  5. (38)JS运动之淡入淡出

    基本思路:使用样式filter.可是要区分IE浏览器和chrom.firefox的不同,详细也是用定时器来实现. <!DOCTYPE HTML> <!-- --> <ht ...

  6. Sharepoint 2013 Workflow Error

    问题: (1)提示“reload the page and then start the workflow”错误 (2)提示“Unable to properly communicate with t ...

  7. 【Graphlab】

    https://dato.com/ graphlab

  8. 学习 TList 类的实现[5]

    先来实现 TMyList.SetCapacity. 马上会想到下面代码: procedure TMyList.SetCapacity(const Value: Integer); begin   if ...

  9. C语言对文件的操作函数用法详解2

    fopen(打开文件) 相关函数 open,fclose 表头文件 #include<stdio.h> 定义函数 FILE * fopen(const char * path,const  ...

  10. Java精选笔记_JSTL(JSP标准标签库)

    JSTL(JSP标准标签库) JSTL入门 JavaServer Pages Standard Tag Library:JSP标准标签库 在JSP中可以通过Java代码来获取信息,但是过多的Java代 ...