Java Spring Boot

Auto-configuration and opinionated defaults. The interesting questions are all about what Boot decided on your behalf and how to see it.

5 concepts · 12 interview questions

What this topic covers

Every concept in spring boot, and the questions each one gets asked as. Where a question links, it has a full write-up.

Auto-configuration

Conditional configuration classes applied based on what is on the classpath and what you have not already defined yourself.

  • How does Spring Boot auto-configuration actually work?
  • How do you see which auto-configurations were applied?
  • How do you exclude or override an auto-configuration?

Starters and dependency management

A starter is a dependency aggregator with a curated version set, not code. The parent POM pins versions so transitive conflicts stay rare.

  • What is in a Spring Boot starter?
  • How does Boot decide dependency versions?

Configuration and profiles

Externalised configuration with a defined precedence order, bound to typed objects, and switched by profile.

  • What is the precedence order for Spring Boot configuration?
  • @Value versus @ConfigurationProperties?
  • How do profiles work, and what are their traps?

Actuator and observability

Production endpoints for health, metrics and environment — and a security exposure if you enable them without thinking.

  • What does the health endpoint actually check?
  • Which actuator endpoints are dangerous to expose?

The embedded server and startup

Boot runs an embedded container, so the application is a jar that starts a server rather than a war deployed into one.

  • What happens between main() and the first request being served?
  • How do you switch from Tomcat to Undertow or Jetty?

More in Spring and Spring Boot

See the whole reference map →