Tagged “Spring-Boot”
9 articles with this tag.
- Externalized configurationRunning one build in every environment: property sources and their precedence, application.yml and profile-specific files, environment variables and relaxed binding, config import (config trees, Kubernetes ConfigMaps and Secrets, Vault), type-safe @ConfigurationProperties with records and validation, @Value vs @ConfigurationProperties, secrets handling and refreshing configuration.
- Spring Boot ImplementationA complete, tested order-management service in Spring Boot 4 and Java 21, built with ports and adapters: package structure, domain model, use cases, REST and JPA adapters, wiring, and tests that run without Spring or a database.
- IdempotencyMaking operations safe to retry: what idempotency means for HTTP methods, idempotency keys for POST requests (storage, concurrency, expiry, request fingerprinting), idempotent message consumers, natural idempotence, conditional writes, and a Spring Boot implementation with a filter and database constraint.
- Integration testingTesting Spring applications with real infrastructure: @SpringBootTest and web environments, test slices (@WebMvcTest, @DataJpaTest, @JsonTest, @RestClientTest), MockMvc and RestTestClient/WebTestClient, @MockitoBean, Testcontainers with @ServiceConnection, reusable containers and dev-time services, context caching, contract tests, and a practical test strategy.
- Saga patternHow to keep data consistent across microservices without distributed transactions: sagas as sequences of local transactions with compensating actions, choreography versus orchestration, designing compensations, pivot and retriable steps, isolation anomalies and countermeasures, and implementing an orchestrated saga in Spring Boot.
- Actuator & custom endpointsProduction endpoints with Spring Boot Actuator: health (groups, liveness and readiness probes for Kubernetes), metrics and Prometheus, info, loggers, env, configprops, threaddump, heapdump, SBOM; exposing and securing endpoints on a separate port; custom HealthIndicators, InfoContributors and @Endpoint operations.
- Auto-configuration & conditionsHow Spring Boot auto-configuration works: starters, @EnableAutoConfiguration, the AutoConfiguration.imports file, ordering, the full family of @ConditionalOn* annotations, back-off with @ConditionalOnMissingBean, the conditions evaluation report, Spring Boot 4 modular auto-configuration, and writing your own starter.
- Service review checklistA repeatable checklist for reviewing a Java/Spring Boot service before production: code and Java usage, Spring configuration, API design, persistence and transactions, security, resilience, observability, testing and operations, with red flags and a scoring rubric.
- Transactional outbox and inboxSolving the dual-write problem in microservices: why saving to the database and publishing to Kafka separately loses or invents events, the transactional outbox table, polling publishers versus CDC with Debezium, ordering and cleanup, the idempotent inbox for consumers, and a Spring Boot implementation.