Annotations
Autoconfiguration is enabled by @EnableAutoConfiguration.
@SpringBootConfiguration -> extends @Configuration
@ComponentScan("..")
@EnableAutoConfiguration
public class Application {
public static void main(String[] args){
SpringApplication.run(Application.class,args);
}
}
SpringBootConfiguration
Annotation @SpringBootApplication comprehends the following annotations:
- @EnableAutoConfiguration
- @ComponentScan
- @SpringBootConfiguration
@SpringBootApplication(scanBasePackages="..")
public class Application{
}
@SpringBootConfiguration – Indicates that a class provides Spring Boot application @Configuration. Can be used as an alternative to the Spring’s standard @Configuration annotation so that configuration can be found automatically (for example in tests).