Spring Boot
Spring Boot annotations and internals: stereotypes, Spring MVC request handling, request/response binding, exception handling, validation, dependency injection, bean lifecycle, AOP, security, auto-configuration, Actuator, microservices, performance and configuration properties.
How Spring Understands Annotations
What happens inside Spring when it sees an annotation — ApplicationContext, component scanning, BeanDefinitions, bean creation and dependency injection.
@Component
The foundation of Spring's component model — what @Component does, scanning, metadata reading vs reflection, bean naming, singletons, stateless beans and meta-annotations.
@Service
The business logic layer — why @Service exists when @Component works, layer responsibilities, service-to-service calls, transaction boundaries and common mistakes.
@Repository
The data access layer — why @Repository is more than @Component, persistence exception translation, Spring Data JPA proxies, query methods, @Query and CrudRepository vs JpaRepository.
@Controller
How a browser request reaches your Java code — Spring MVC, embedded Tomcat, DispatcherServlet, HandlerMapping, HandlerAdapter, ViewResolver, Model and thin, stateless controllers.
@RestController
The most-used Spring Boot annotation — @Controller + @ResponseBody, Jackson serialization, HttpMessageConverter, return types, content negotiation and DTOs.
@RequestMapping
The heart of URL routing — class and method mappings, RequestMappingHandlerMapping, HTTP methods, params, headers, consumes, produces, matching priority and ambiguous mappings.
@GetMapping, @PostMapping, @PutMapping, @DeleteMapping and @PatchMapping
HTTP methods like a backend architect — safe methods, idempotency, PUT vs PATCH, CRUD mapping, status codes (200, 201, 204, 400, 404, 409) and REST naming.
@PathVariable
Extracting values from the URL path — URL templates, ConversionService, UUID/enum/date types, multiple variables, name matching, failure cases and @PathVariable vs @RequestParam.
@RequestParam
Reading query-string parameters — type conversion, required vs optional, defaultValue, Optional, lists, arrays, maps, pagination and search APIs, validation and @RequestParam vs @PathVariable.
@RequestBody
JSON to Java object conversion — HttpMessageConverter, Jackson, serialization vs deserialization, DTOs, nested objects, missing/unknown fields, invalid JSON, @Valid and Content-Type.
@ResponseBody
Writing return values straight into the HTTP response — RequestResponseBodyMethodProcessor, message converters, return types, files and bytes, content negotiation and @ResponseBody vs @RestController.
ResponseEntity
Professional REST API responses — controlling status, headers and body, 200/201/204/400/404/500, Location headers, cookies, file downloads, response wrappers and ResponseEntity vs @ResponseStatus.
@ControllerAdvice and @ExceptionHandler
Global exception handling — custom exceptions, structured error responses, ProblemDetail, validation errors, @RestControllerAdvice, ResponseEntityExceptionHandler and resolution order.
@RequestHeader, @CookieValue and @RequestAttribute
Reading headers, cookies and server-side request attributes — JWT tokens, API versioning, sessions, filter-to-controller data passing and the argument resolvers behind them.
@ModelAttribute
Binding form fields and query parameters to objects — WebDataBinder, nested and collection binding, validation with BindingResult, global model data and @ModelAttribute vs @RequestBody.
@RequestPart, MultipartFile and File Upload
multipart/form-data, MultipartFile, single and multiple uploads, JSON + file together, @RequestParam vs @RequestPart vs @ModelAttribute, validation, security, streaming and size limits.
Bean Validation
@Valid, @Validated and Jakarta Validation — constraint annotations, @NotNull vs @NotEmpty vs @NotBlank, nested and method validation, groups, custom ConstraintValidators and error handling.
Dependency Injection
IoC vs DI, the IoC container, @Autowired, constructor vs setter vs field injection, @Qualifier, @Primary, the bean resolution algorithm, @Lazy, circular dependencies and ObjectProvider.
Bean Lifecycle
From BeanDefinition to destruction — Aware interfaces, BeanPostProcessor, @PostConstruct, InitializingBean, init/destroy methods, @PreDestroy, bean scopes and BeanFactoryPostProcessor.
Spring AOP
Aspect-oriented programming — cross-cutting concerns, aspects, join points, pointcuts, the five advice types, pointcut expressions, proxies, self-invocation and aspect ordering.
Spring Security
Authentication vs authorization, the security filter chain, AuthenticationManager, AuthenticationProvider, UserDetailsService, BCrypt, SecurityContextHolder, JWT with OncePerRequestFilter, roles, 401 vs 403 and CSRF.
Auto-Configuration and @SpringBootApplication
What happens after pressing Run — @SpringBootApplication, @EnableAutoConfiguration, AutoConfiguration.imports, conditional annotations, SpringApplication.run() internals and overriding defaults.
Spring Boot Actuator and Production Readiness
Health, info, metrics and operational endpoints, custom HealthIndicators, Micrometer with Prometheus and Grafana, loggers, dumps, graceful shutdown, liveness/readiness probes and securing endpoints.
Spring Boot Microservices
Monolith vs microservices, database per service, sync vs async communication, Eureka, API Gateway, Config Server, OpenFeign, load balancing, Resilience4j, tracing, Saga and idempotency.
Performance and JVM Tuning
Measure first — JVM memory (heap, stack, Metaspace), OutOfMemoryError vs StackOverflowError, garbage collectors and G1, JVM flags, HikariCP, thread pools and @Async, caching, N+1 queries and profiling tools.
@Value
Injecting configuration — ${...} placeholders, defaults, type conversion, environment variables and system properties, SpEL #{...}, lists and maps, static-field pitfalls and @Value vs @ConfigurationProperties.
@ConfigurationProperties
Type-safe configuration binding — prefixes, relaxed binding, nested objects, lists, maps, Duration and DataSize, validation, constructor binding and records, registration options and the Binder internals.