Wiring Beans Together
Wiring beans together: constructor injection, stereotype annotations, choosing between two candidates, and @Bean methods.
Wiring: how the container decides which bean goes into which constructor. Getting it right is most of what writing a Spring application day to day involves, and getting it wrong usually stops the application from starting. It covers constructor injection and why it is the default, the four stereotype annotations, the two fixes when more than one bean fits (@Primary and @Qualifier), and @Bean methods for classes you cannot annotate. It leaves out XML configuration and the rarer injection points such as setters.
Contents
7 cardsnot started