org.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreatingbeanwithname'XXX':Unsatisfieddependencyexpressedthroughfield'XXX';嵌套异常是org.springframework.beansEx.factory.NoSuchBeanDefinition:'com.custom.interfaces.XxxService'类型的bean可用:预计至少有1个符合自动装配候选条件的bean。依赖注解:{@org.springframework.beans.factory.annotation.Autowired(required=true)}1.网上找的答案都是说没有@Service注解或者@Autowired2.如果你使用的包被POM.xml文件引用,需要注意你引用的包的版本是否有更新。因为在旧的引用包中找不到新写的服务,所以无法创建Bean。只需修改POM的版本即可。3、对于远程服务的调用(使用dubbo),可以将注解@Autowired改为@Reference,踩坑记录。希望能帮到大家~
