Patterns in Spring
Where Spring implements, resembles, or simply benefits from classic design patterns.
Each planned article states which of three cases applies:
- Spring implements the pattern.
- Spring’s design resembles the pattern.
- The pattern is useful in Spring applications.
Labelling every abstraction a “GoF pattern” teaches the wrong lesson.
Planned topics
These topics are on the roadmap and not written yet. They appear here so you can see the full scope of the section.
- Dependency Injection and the container
- Factory Method:
@Beanmethods andFactoryBean - Proxy: AOP,
@Transactionaland self-invocation - Template Method:
JdbcTemplateand callbacks - Strategy: pluggable interfaces such as
PasswordEncoder - Observer: application events
- Adapter:
HandlerAdapterin Spring MVC - Decorator: wrapping beans with
BeanPostProcessor - Chain of Responsibility: the servlet filter chain and Spring Security