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文件中,需加入要扫描的包并去除注解


		
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}

你可能感兴趣的:(Error creating bean with name报错Unsatisfied dependency expressed through field)