spring-in-action-5-samples
spring-in-action-5-samples copied to clipboard
Autowired@ needed ?
Is @Autowired missing here in OrderController's constructor in chapter 3 example? public OrderController(OrderRepository orderRepo) { this.orderRepo = orderRepo; }
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