- Spring 5 Design Patterns
- Dinesh Rajput
- 102字
- 2021-07-08 09:59:39
Decorator design pattern in the Spring Framework
The Spring Framework uses the Decorator design pattern to build important functionalities such as transactions, cache synchronization, and security-related tasks. Let's look at some functionalities where Spring implements this pattern transparently:
- Weaving the advice into the Spring application. It uses the Decorator pattern via the CGLib proxy. It works by generating a subclass of the target class at runtime.
- BeanDefinitionDecorator : It is used to decorate the bean definition via applied custom attributes.
- WebSocketHandlerDecorator: It is used to decorate a WebSocketHandler with additional behaviors.
Now let's turn to another GOF Design Pattern - Facade design pattern.
推薦閱讀
- Learning Microsoft Windows Server 2012 Dynamic Access Control
- Google Flutter Mobile Development Quick Start Guide
- Linux C/C++服務器開發實踐
- HTML5 移動Web開發從入門到精通(微課精編版)
- 跟老齊學Python:輕松入門
- Java虛擬機字節碼:從入門到實戰
- Python金融數據分析
- Mastering LibGDX Game Development
- Learning ELK Stack
- 劍指大數據:企業級數據倉庫項目實戰(在線教育版)
- Laravel Application Development Blueprints
- Flink技術內幕:架構設計與實現原理
- PHP項目開發全程實錄(第4版)
- Python數據科學實踐指南
- JavaScript前端開發基礎教程