聊聊如何利用spring插件来实现策略模式

聊聊如何利用spring插件来实现策略模式

前言

偶然的机会发现spring有个spring-plugin,官网对它的介绍是

Spring Plugin provides a more pragmatic approach to plugin development by providing the core flexibility of having plugin implementations extending a core system’s functionality but of course not delivering core OSGi features like dynamic class loading or runtime installation and deployment of plugins. Although Spring Plugin thus is not nearly as powerful as OSGi, it serves a poor man’s requirements to build a modular extensible application.

大意就是Spring插件提供了一种更实用的插件开发方法,它提供了插件实现扩展核心系统功能的核心灵活性,但当然不提供核心OSGi功能,如动态类加载或运行时安装和部署插件。尽管Spring插件因此不如OSGi强大,但它满足了穷人构建模块化可扩展应用程序的需求。


比丘资源网 » 聊聊如何利用spring插件来实现策略模式

发表回复

提供最优质的资源集合

立即查看 了解详情