
Dependency Inversion in Java and Spring Beyond the Slogan
What the dependency inversion principle means in Java, how it differs from dependency injection and why the interface should belong to the code that uses it.
The container underneath everything: beans, wiring, scopes, AOP and the events that make Spring work the way it does.

What the dependency inversion principle means in Java, how it differs from dependency injection and why the interface should belong to the code that uses it.

Read a BeanCreationException trace to its root cause and fix the usual culprits: constructors that throw, bad schemas and absent services.

Micronaut generates its dependency injection code during compilation instead of scanning at startup. See what that gives you and what it costs.

Bind application.yml values to typed Java records with @ConfigurationProperties: prefixes, nested objects, lists, durations, defaults and relaxed names.

Compare constructor, setter and field injection in Spring on immutability, testing, circular dependencies and required versus optional collaborators.

Write a timing aspect for Spring that flags slow methods: a custom annotation, threshold logging, Micrometer timers and the limits of proxy timing.

Compare Spring AOP and AspectJ: proxies versus weaving, supported join points, self invocation, performance, load time weaving and how to choose.

The Spring self invocation problem explained: why calls inside a bean skip the proxy, how it breaks Transactional, Async and Cacheable, and the fixes.

Spring transaction management explained: the Transactional annotation, the proxy and manager, propagation, rollback rules and common pitfalls.

Fix NoSuchBeanDefinitionException by telling apart a missing type, a missing name and a bean hidden by scanning, profiles or a child context.

Learn Jakarta CDI: bean discovery, scopes, injection, qualifiers, producers, observers and events, interceptors and how CDI compares with Spring.

Integrate Struts 2 with Spring using the struts2-spring-plugin: let Spring create actions, inject services by name or type, and handle scopes and AOP.
We send one email when a new post is published. No spam.