域上标注了@Autowired时,如果服务没有注册,则启动时会报错:
..... could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
这其实不是错误,而是服务实现类不在当前应用中(需要rpc调用),如何改造能够在自动装配找不到bean时,创建一个动态代理类并注入呢(在这个代理类中执行rpc调用)?
springboot好复杂啊,了解太少无处下手,谢谢!