5.SpringBoot : @SpringBootAnnotation is combination of | Interview Questions

Опубликовано: 31 Март 2026
на канале: Pavan Tricks
12
0

@SpringBootApplication annotation is a combination of three other annotations:



@Configuration :

@Configuration annotation in Spring Boot indicates that a class declares one or more @Bean methods and may be processed by the Spring container to generate bean definitions and service requests for those beans.



@EnableAutoConfiguration:

his annotation enables Spring Boot's auto-configuration feature. It automatically configures the Spring application based on the dependencies and properties present in the classpath. This greatly reduces the need for manual configuration.



@ComponentScan

Scans the specified package and its sub-packages for Spring components, such as controllers, services, repositories, and other beans annotated with @Component or its stereotype annotations. It enables Spring to automatically discover and instantiate these components.