Error creating bean with name报错Unsatisfied dependency expressed through field

Error creating bean with name 'AaServiceImpl': Unsatisfied dependency expressed through field 'bb'; nested exception is


Error creating bean with name 'aA' defined in file
几个原因:

1、配置文件配置不正确applicationcontext.xml文件中,需加入要扫描的包并去除注解

<context:component-scan base-package="com.aa.service" >
		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
2、实现类里需要加入注解
@Service
public class AaServiceImpl implements AaService {
	@Autowired
	private bB bb;
...
}

3、我就是第三种情况,如果你之前正确运行过并且控制台没有报错,这次突然报错,就是.xml文件写错了,耐心看下面的其他提示错误信息,能找到错误的点

我的错误是这样提示的,所以我改成jdbcType就解决了,注意,jdbcType=VARCHAR只能是大写的

An invalid property 'idbcType' was found in mapping #{info,idbcType=VARCHAR}

  • 9
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值