Description:
Field inservice in controller
required a bean of type Inservice 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 Inservice in your configuration.
Service的實現類上沒有標準@Service,導致Spring不能加載Bean。
public interface InService {
}
public class InvoiceImpl implements InService {
}
@Service
@Transactional
public class InvoiceImpl implements InService {
}
文章讨论了在SpringBoot应用中,由于InService接口实现类缺少@Service注解导致Spring无法找到Bean的问题,建议在Service实现类上添加@Service注解以解决这个问题。
436

被折叠的 条评论
为什么被折叠?



