Spring Boot Interview Question

What are the most common Spring Boot annotations?

Updated 2026-07-10 · Beginner friendly
Quick answer

The most common annotations are SpringBootApplication to start the app, RestController and RequestMapping to build web endpoints, Autowired for dependency injection, and the stereotype annotations Component, Service, and Repository to define beans. Knowing what each does and roughly when to use it covers most day to day Spring Boot code.

The ones you will use most

@RestController
class HelloController {
    @GetMapping("/hello")
    String hello() { return "hi"; }
}
In the interview

Do not just list annotations, group them by purpose: startup, web, injection, and beans. Organising your answer this way makes it clear you understand the roles rather than memorising a list.

Want the full Spring Boot guide?

Read every Spring Boot concept with notes, diagrams, and code in one place. Track your progress as you go.

Open the Spring Boot guide All Spring Boot questions