The so-called automatic assembly, is autowire.
How to activate automatic assembly it?
Method One: @EnableAutoConfiguration or @SpringBootApplication, written on @Configuration class.
Method two: xml for the <context: component-scan>, using loading ClassPathXmlApplicationContext
Method three: For @ Import, @ ComponentScan, using AnnotationConfigApplicationContext registration.
Automatic assembly strategies have those?
byType (default)
byName
constructor
@AutoWired
Defaults the byType, if there are multiple instances of this type, the use byName try to match, if not also byName determination, and may be determined by @Primary @Priority.