- 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.
推薦閱讀
- 深入理解Bootstrap
- Drupal 8 Blueprints
- PyTorch Artificial Intelligence Fundamentals
- Apache Spark 2 for Beginners
- C語言實驗指導及習題解析
- 算法訓練營:提高篇(全彩版)
- Learn React with TypeScript 3
- C語言程序設計
- GitHub入門與實踐
- 30天學通C#項目案例開發
- Python Projects for Kids
- Learning Kotlin by building Android Applications
- Test-Driven iOS Development with Swift
- Flink核心技術:源碼剖析與特性開發
- 計算機應用基礎(Windows 7+Office 2010)