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/

posted on   荣锋亮  阅读(369)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用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 中间件参考流程

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示