springboot注入失败
@Autowired
private ToBrailleImpl toBrailleImpl;
service层有接口类和实现类,在controller层注入接口类就报错找不到依赖,而注入实现类就不报错
@Autowired
private ToBrailleMsgInterface toBraille;
报错:
Description:
Field toBraille in tobraille1.controller.ToBraille required a bean of type 'tobraille1.service.serviceInterface.ToBrailleMsgInterface' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'tobraille1.service.serviceInterface.ToBrailleMsgInterface' in your configuration.
看下service实现类有没有service注解