利用事件进行解耦 利用事件框架可以增加代码的灵活性和降低耦合性。看一个示例: System.out.println("do some business."); System.out.println("send email."); System.out.println("send sms."); 需要在完成一段业务逻辑后发送电子邮件和短信,现在业务代码和发送短信及电邮是耦合在一起的。 创建一个表示业务完成的事件类: static class AfterDoSomethingEvent extends Applicat…
SpringBoot
SpringMVC
MySQL
Java
php
Linux
设计模式
HTTP
Wordpress
Python
Activiti
Redis
SpringCloud
debug
前端开发
Maven
生活随笔
Spring Easy
MD-img
oa-demo
油猴脚本
i-tree
auto-hot-key
bilibili-down
haokan-down
PEP中文
M3U-Helper
我的Windows软件列表
