Skip to content
Sharp

Spring Core · interview question

Which Spring annotation is used to define a class as a Spring Boot application entry point?

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

Correct answer

B. @SpringBootApplication

Why

@SpringBootApplication is the primary annotation used to mark the main class that acts as the entry point for a Spring Boot application. It combines @Configuration, @EnableAutoConfiguration, and @ComponentScan.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →