spring-framework
Installation
SKILL.md
Spring Framework
Pattern: Process
Core Spring patterns for dependency injection, AOP, transactions, and bean lifecycle. Targets Framework 7 (Jakarta EE 11, Java 17+). Most guidance applies to Framework 6.1+ — version-specific features are annotated.
Mental model: Spring's AOP is a decorator pattern applied at runtime via proxies. Every annotation that adds behavior (@Transactional, @Async, @Cacheable) is a decorator — decorators only work when called through the decorated object (the proxy), not via this.
Do NOT Load for Boot-specific topics (auto-configuration, starters, profiles, actuator) — use spring-boot. For web, security, data, or testing — use the dedicated skill.
When to Use
- Wiring beans, resolving injection ambiguities, or fixing circular dependencies
- Debugging why
@Transactional,@Async, or@Cacheableis silently ignored - Understanding proxy mechanics and the self-invocation trap
- Choosing between lifecycle hooks (
@PostConstructvsSmartLifecycle) - Writing
@Configurationclasses or registering beans programmatically - Using Spring Framework 7 features (
BeanRegistrar,@Proxyable,RetryTemplate)