Wiring Beans Together
Getting your dependencies handed to you — by constructor, and by name when there's more than one candidate.
Three ways exist to get a dependency into a bean, and one of them is the only one worth defaulting to. This topic is wiring in practice: constructor injection as the default, the stereotype annotations that tell the container what a class is for rather than just that it exists, and the two ways to break a tie when more than one bean could fill a dependency. It closes on the case those annotations can't reach — a class you don't own, wired with @Bean instead.
Contents
7 cardsnot started