Skip to content

Commit

Permalink
整理扩展功能 下篇
Browse files Browse the repository at this point in the history
  • Loading branch information
Vip-Augus committed Jun 30, 2019
1 parent 9e91ef7 commit c623123
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ getApplicationEventMulticaster().multicastEvent(applicationEvent, eventType);

**也可以通过广播事件,定义事件和监听器,在监听器中实现业务逻辑,由于不是直接调用监听器,而是通过事件广播器进行中转,达到了代码解耦的效果。**

**所以在之后的代码设计和编写中,在整体设计上,有必要的话,考虑在更高的抽象层要预留扩展功能,然后让子类重载或者实现,实现扩展的功能。**

---
**由于个人技术有限,如果有理解不到位或者错误的地方,请留下评论,我会根据朋友们的建议进行修正**

Expand Down

0 comments on commit c623123

Please sign in to comment.