7 topics · 0/7 read
Spring Core & Spring Boot
IoC and dependency injection, bean scopes and lifecycle, auto-configuration, REST controllers with validation, global exception handling, configuration and profiles, and AOP.
IoC and Dependency Injection in Spring
Inversion of Control means Spring creates your objects and wires their dependencies, instead of your code calling new. Dependency injection is how it does that. This is the first Spring question in almost every Java back
Read nowBean Scopes and the Bean Lifecycle
Spring beans are singletons by default, but there are prototype, request and session scopes too. Interviewers ask about the bean lifecycle, @PostConstruct, and the classic bug of injecting a prototype into a singleton.
Read nowHow Spring Boot Auto-Configuration Works
Spring Boot auto-configuration creates sensible beans based on what is on the classpath and in your properties. Interviewers ask what @SpringBootApplication does, how starters and conditional annotations work, and how to
Read nowREST Controllers, Validation and DTOs
Building REST APIs with @RestController, request mapping, DTOs and Bean Validation is the daily work of a Spring Boot developer and a standard interview and machine-coding topic.
Read nowGlobal Exception Handling with @RestControllerAdvice
Spring Boot APIs should return one consistent error format. @RestControllerAdvice with @ExceptionHandler methods maps exceptions to HTTP responses in one place, and ProblemDetail gives you the standard RFC 9457 shape.
Read nowConfiguration, Properties and Profiles
Spring Boot reads configuration from properties files, YAML, environment variables and command-line arguments in a defined order, and switches settings per environment with profiles. Interviewers ask about precedence, @C
Read nowSpring AOP and Proxies
Aspect-Oriented Programming adds cross-cutting behaviour such as logging, security, transactions and caching around methods without changing them. In Spring it works through proxies, which explains the famous self-invoca
Read now