这一节我们看看适配器模式在Spring框架和JDK源码中的应用:

 

一、Spring中的应用

Spring 框架使用适配器模式来实现很多功能。以下列出的一些在 Spring 框架中使用到适配器模式的类:

  • JpaVendorAdapter
  • HibernateJpaVendorAdapter
  • HandlerInterceptorAdapter
  • MessageListenerAdapter
  • SpringContextResourceAdapter
  • ClassPreProcessorAgentAdapter
  • RequestMappingHandlerAdapter
  • AnnotationMethodHandlerAdapter

更多推荐

大话设计模式之爱你一万年:第六章 结构型模式:适配器模式:i7爱妻:为爱找份工作:5.适配器模式在Spring框架和JDK源码中的应用