Open aCodeRancher opened 5 years ago
As of Spring Framework 4.3, an @Autowired annotation on such a constructor is no longer necessary if the target bean only defines one constructor to begin with. However, if several constructors are available, at least one must be annotated to teach the container which one to use.
established by usage
Is @Autowired missing here in OrderController's constructor in chapter 3 example? public OrderController(OrderRepository orderRepo) { this.orderRepo = orderRepo; }