https://grokonez.com/spring-framework/difference-between-annotation-config-and-component-scan
Difference between annotation-config and component-scan
annotation-config and component-scan are important basic concepts of Spring Core.
This tutorial helps you understand how to use them and difference between them.
<context:component-scan> not only does everything that annotation-config does, but also registers the java classes as a bean which are annotated with @Component, @Service ,@Repository…
public class Name{ //... } public class Address{ //... }
public class Customer {
private Name name;
private Address address;public Customer() //... public void setName(Name name) //setter injection... public void setAddress(Address address) //setter injection...
}
More at:
https://grokonez.com/spring-framework/difference-between-annotation-config-and-component-scan
Difference between annotation-config and component-scan
#spring