设计模式

 

装饰器模式

代理模式

Interface中只定义最核心的业务,比如doXXX

AbstractService1中定义其他扩展方法,比如prepare,  afterExectute,  doLog等抽象方法

AbstractService2中有很多业务和AbstractService1不同,但是核心业务相同

YYYServiceImpl和其他业务都不同,自成一体

 

创建对象 建立关系

 

posted @ 2018-07-02 21:25  funny_coding  阅读(111)  评论(0编辑  收藏  举报
build beautiful things, share happiness