org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.klzy.tnt.bean.host.Pif': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.Short]: : No unique bean of type [java.lang.Short] is defined: Unsatisfied dependency of type [class java.lang.Short]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [java.lang.Short] is defined: Unsatisfied dependency of type [class java.lang.Short]: expected at least 1 matching bean
这个是哪里出的问题?
这个是哪里出的问题?
解决方案 »
- 请问谁有struts-2.1.8-all.zip?
- 请教一个简单Hibernate映射问题
- 谁有spark修改的相关资料,还有怎样让spark自动读取服务器地址
- 高分求助关于在apache的开源项目xwiki上做二次开发的问题
- 谁能给我解释一下Spring的applicationcontext怎么理解
- 关于无ActionForm的Action中的编码问题~
- tomcat5.5配置连接池的问题
- 一个校园系统项目请求JAVA高手合作开发(限深圳市内)兼职也可
- 如何在 SessionBean 中调用 EntityBean
- Redis作为缓存框架的问题
- 请教Date转换
- applicationContext配置文件问题
仔细检查你的配置文件及实体类映射文件!应该是那里面的问题!~
private Integer ifid;
private short idx;
private int piftypeid;
//set get和构造都有
配置文件
<class name="com.klzy.tnt.bean.host.Pif" table="pif" catalog="mydb">
<id name="ifid" type="java.lang.Integer">
<column name="ifid" />
<generator class="assigned" />
</id>
<property name="idx" type="java.lang.Short">
<column name="idx" />
</property>
<property name="piftypeid" type="java.lang.Integer">
<column name="piftypeid" />
</property>
</class>
数据表
/*==============================================================*/
/* Table: pif */
/*==============================================================*/
create table pif
(
ifid int not null,
piftypeid int comment '引用piftype表的id表示网卡的类型
',
idx tinyint
);
<column name="idx" />
</property>
---改成常规short类型再试
应该是你的PIF类出的问题
贴全部代码出来看看