使用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 ...
随机推荐
- windows rails new demo时候出错Make sure that `gem install mysql2 -v '0.3.15'` succeeds before bundling.
rails new demo --database=mysql最后报错Gem files will remain installed in D:/BillFiles/rails_dev/Ruby193 ...
- HTTP API 设计指南(结尾)
前言 这篇指南介绍描述了 HTTP+JSON API 的一种设计模式,最初摘录整理自 Heroku 平台的 API 设计指引 Heroku 平台 API 指引. 这篇指南除了详细介绍现有的 API 外 ...
- [oracle] 两种权限:系统权限VS对象权限
系统权限表示对表和表空间等 有无操作权 的权限.一般是SYS用户这种DBA来授权.比如: grant create session to lisi grant create table to l ...
- Photoshop脚本入门
- OPenGL 库文件的添加
OPenGL使用前必须添加一些必要的库文件: 需要安装 GLUT 工具包: GLUT下载地址 GLAUX下载地址 Windows 环境下安装 GLUT 的步骤:1.将下载的压缩包解开,将得到 5 ...
- python中时间操作总结
一.time 二.datetime 1.获取当前系统时间 datenow = datetime.datetime.now() 2.将datetime格式的时间转换成str datenow = date ...
- CentOS6.8忘记root密码的解决办法(开始初始化也可以用)
在开机启动的时候按键盘上的“E”键会进入如下界面. 选择相应的内核,再次按“E”,出现下图,选择第二项,再次按“E”键 经过第二步,这个画面可以编辑,在信息的最后加“空格”,然后键入“single”( ...
- .net cs后台刷新aspx页面的四种方式
一:Response.Redirect(Request.Url.ToString()); 二:Response.Write("<script language=javascript&g ...
- Mysql课后思考题
1.请简述数据库.表和数据库服务器之间的关系? 知识点数据库存储结构 一个数据库服务器可以管理多个数据库,通常情况下开发人员会针对每个应用创建一个数据库,为保存应用中实体的数据,会在数据库中创建多个表 ...
- 使用loadrunner进行压力测试遇到的问题总结
本人整理了一个LR使用过程中遇到的各种问题的总结文档,有需要可以加QQ群169974486下载. 一.无法生成虚拟用户,运行报错:CCI compilation error -vuser_init.c ...