O'Reilly logo
  • Yijun Yuan thinks this is interesting:

@ComponentScan tells Spring that we want to scan our application packages—starting from the package of our annotated class as a default package root—for the other classes that might be annotated with @Configuration, @Controller, and other applicable annotations, which Spring will automatically include as part of the context configuration

From

Cover of Spring Boot Cookbook

Note

Order should not matter except for the case of setting up profile, and some