spring-plugin 来自spring 官方的plugin 解决方案
spring-plugin属于spring 官方的plugin 解决方案
使用的上下文
以下是官方的一些使用场景
- 希望构建一个插件化架构
- 不能使用osgi的(实际上还是osgi 太复杂)
- 系统通过一些接口进行系统扩展
- 希望通过jar 包的模式进行系统的灵活扩展
- 项目使用spring
说明
目前不太好的是spring-plugin似乎缺少维护,如果实际上使用一个插件化框架的化,我还是推荐基于pf4j,社区还是比较活跃的,而且一致在更新
好多设计点也很不错,官方文档也基本够用,spring-plugin 核心是对于spring 项目比较合适,但是pf4j 的通用型更强,如果看过dremio 的设计的话
会发现dremio的插件化架构也是很强大的,通过动态类加载,实现的能力也是很不错的
参考资料
https://github.com/spring-projects/spring-plugin
https://github.com/pf4j/pf4j
https://github.com/pf4j/pf4j-spring
https://wearenotch.com/extending-spring-boot-apps-with-plugins-2/
https://www.rajith.me/2021/10/strategy-pattern-with-spring-plugin.html
https://spring.io/blog/2021/10/13/spring-tips-spring-plugin
https://medium.com/javarevisited/the-strategy-design-pattern-with-spring-plugin-e99021c8f6eb
https://developer.atlassian.com/server/framework/atlassian-sdk/osgi-spring-and-the-plugin-framework/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2023-02-04 tracetest 基于trace 生成端到端测试的框架
2023-02-04 dremio AppBundleRunner 简单说明
2023-02-04 dremio yarn 集成之 AppBundleGenerator 简单说明
2023-02-04 dremio 的 YarnDaemon 简单说明
2022-02-04 primus 通用实时框架包装
2022-02-04 actionherojs 的插件机制
2022-02-04 actionherojs 中间件参考流程