Skip to content
DevOps with Multi Cloud: new batch 25 Nov
novarynit: Training, Placement, Consulting

8 questions

Spring Boot interview questions and answers

Spring Boot and microservices questions for Java back-end roles.

What is Spring Boot and how is it different from Spring?
Spring Boot builds on the Spring framework with auto-configuration, starter dependencies and an embedded server, so an application runs with very little setup.
What does @SpringBootApplication do?
It combines @Configuration, @EnableAutoConfiguration and @ComponentScan: it marks the configuration class, switches on auto-configuration and scans the package for components.
What is dependency injection?
The framework creates objects and supplies their dependencies instead of the class creating them. It keeps classes loosely coupled and easy to test. Constructor injection is preferred.
What is the difference between @Component, @Service and @Repository?
All register a bean. @Service marks business logic, @Repository marks data access and translates database exceptions, and @Component is the general form.
What is the difference between @Controller and @RestController?
@Controller returns view names for server-rendered pages. @RestController adds @ResponseBody, so return values are written directly as JSON or XML.
How do you handle exceptions globally?
With a class annotated @RestControllerAdvice containing @ExceptionHandler methods that turn exceptions into consistent error responses.
What are microservices?
An architecture where an application is split into small services, each owning one business capability and its own data, deployed independently and talking over APIs or messages.
What is an API gateway?
A single entry point in front of the services that handles routing, authentication, rate limiting and similar cross-cutting concerns.

More topics

Next step

Practise these in a mock interview

Sit in a free demo class first. We will call you back in 5 minutes

  • See a live class before you join
  • Meet the trainer and review the syllabus
  • Get a batch and timing that fits you
  • Ask about EMI and placement support

Where to learn

  • Ameerpet, Hyderabad

    3rd Floor, Green House, Ameerpet, Hyderabad, Telangana

  • Live online

    Join the same class from anywhere, ask questions live and get the same project reviews.

Request your free demo

Takes 30 seconds. No payment needed.

+91

Free · no obligation

Book your free demo class

Leave your number and we will call you back.

  1. We will call you back in 5 minutes
  2. Attend a free demo class
  3. Join only if you like it