在controller中有 @autowired private IService service;
在service中有 @autowired private IDao dao;
我的问题是: 两个之中都有@autowired, 那么哪一个先起作用; 为什么?
我自己测的时候,发现应该是controller中的先起作用; 才去遍历注入的service中的dao ; 如果没有controller, 那么dao将空指针
收起
controller->service->dao 调用链是这样的吧。肯定是先Controller中的注解先起作用啊
报告相同问题?