
How to Disable Open in View Safely in Spring Boot Apps
Disable spring.jpa.open-in-view safely: find lazy loads outside a transaction, fix them with fetch joins and DTO projections, and prove it with tests.
Everything you need to level up your coding skills.

Disable spring.jpa.open-in-view safely: find lazy loads outside a transaction, fix them with fetch joins and DTO projections, and prove it with tests.

Exclude a Spring Boot auto configuration class with an annotation or property, and learn when a custom bean or a profile is the better tool.

Understand Spring bean scopes: singleton, prototype, request, session and application, how each behaves, and the thread safety traps of the default.

Model money, time ranges and identifiers as value objects in Java with records, validation in the constructor, immutability and equality by value.

Hash passwords in Java with Argon2id, bcrypt or PBKDF2 using Spring Security's PasswordEncoder, salts, work factors, upgrades and what never to use.

Understand how ThreadLocal leaks memory in thread pools and web apps, how to clean up with remove, and when ScopedValue or explicit parameters are better.

How Jakarta Transactions works: @Transactional, UserTransaction, two phase commit with XA resources, the cost of distributed transactions and alternatives.

A Mockito tutorial: create mocks, stub return values and exceptions, verify calls and arguments, and know where mocks help a test and where they hurt.
Use Native Memory Tracking to see where non heap memory goes: Metaspace, threads, code cache, GC structures and direct buffers, with diffs.

Structure a Spring Boot app into modules, verify the boundaries in a test, communicate through events and test one module at a time with Spring Modulith.

Build a Quarkus native executable with Mandrel or GraalVM: the native profile, build commands, what you gain and lose, build time and memory, and testing it.

Use JPA safely from JSF: where to put transactions, injecting EntityManager into CDI services, avoiding lazy loading errors and handling optimistic locking.
We send one email when a new post is published. No spam.