Skip to content
Sharp

Spring Core · interview question

Which Spring Boot annotation can be used to combine multiple other annotations commonly used in @Configuration classes?

Multiple choiceMediumchapter-9-curatedpremiumspring-corecontrollers-services-repositories
Choose one answer
Answer and explanation

Correct answer

C. @SpringBootApplication

Why

@SpringBootApplication is a convenience annotation that combines @Configuration, @EnableAutoConfiguration, and @ComponentScan. It simplifies the setup of a Spring Boot application by providing default configurations.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →