
How to Use Spring Boot Test Slices Properly in Java
Use Spring Boot test slices properly: WebMvcTest, DataJpaTest, JsonTest and RestClientTest load only part of the context, with mocks, imports and speed gains.
Starters, auto-configuration, actuator and the property you forgot about. Boot, from first project to a jar in production.

Use Spring Boot test slices properly: WebMvcTest, DataJpaTest, JsonTest and RestClientTest load only part of the context, with mocks, imports and speed gains.

Understand Spring test context caching: what the cache key contains, how to see hits and misses, limit the cache size and design tests to share contexts.

Compare Vaadin and React on a Spring Boot backend for internal tools: team skills, delivery speed, API surface, testing, UX ceiling and long term cost.

Wire a Vaadin application into Spring Boot so views get services by constructor injection, with the right scopes, security and a production build.

Why javax became jakarta, which packages moved and which did not, who is affected and how the change shows up in Spring Boot 3 and application servers.

Reproduce a lost update in JPA with two transactions, then fix it with a version column, an atomic update query or a pessimistic lock, and test the conflict.

Run bulk update and delete queries in JPA and Spring Data, clear the stale persistence context, keep versions right and delete huge tables in chunks.

Compare Caffeine, Guava Cache and Ehcache for in process caching in Java: eviction, refresh, statistics, Spring support and when you need a shared cache.

Implement multi tenancy with Hibernate: compare discriminator, schema and database per tenant, resolve the tenant per request and avoid cross tenant leaks.

Use PESSIMISTIC_WRITE and SKIP LOCKED in JPA and Spring Data, set lock timeouts, handle lock exceptions and know when optimistic locking is the better choice.

Compute Kafka consumer lag with the AdminClient, export it as a Micrometer gauge, set time based alerts and learn what a growing lag really means.

Write a Kafka consumer that survives restarts, duplicates, poison messages and slow batches, with manual commits, idempotency, retries and a dead letter topic
We send one email when a new post is published. No spam.