6.5.4.1 半自动化拆分工具使用指南
背景
从大单体 SpringBoot 应用中拆出 Koupleless 模块时,用户拆分的学习和试错成本较高。用户需要先从服务入口分析要拆出哪些类至模块,然后根据 Koupleless 模块编码方式改造模块。
为了降低学习和试错成本,KouplelessIDE 插件提供半自动化拆分能力:分析依赖,并自动化修改。
快速开始
1. 安装插件
从 IDEA 插件市场安装插件 KouplelessIDE:

2. 配置 IDEA
确保 IDEA -> Preferences -> Builder -> Compiler 的 “User-local build process heap size” 至少为 4096

3. 选择模块
步骤一:用 IDEA 打开需要拆分的 SpringBoot 应用,在面板右侧打开 ServerlessSplit

步骤二:按需选择拆分方式,点击“确认并收起”

4. 依赖分析
在拆分时,需要分析类和Bean之间的依赖。可以通过插件可视化依赖关系,由业务方决定某个类是否要拆分到模块中。
步骤一:点击激活

步骤二:拖拽服务入口至模块,支持跨层级拖拽

拖拽结果:

步骤三:拖拽“待分析文件”,点击分析依赖,查看类/Bean的依赖关系,如下图:



其中,各图标表示:
图标 | 含义 | 用户需要的操作 |
---|---|---|
![]() | 已在模块 | 无需操作 |
![]() | 可移入模块 | 拖拽至模块 ![]() |
![]() | 建议分析被依赖关系 | 拖拽至分析 ![]() |
![]() | 不应该移入模块 | 鼠标悬停,查看该类被依赖情况 ![]() |
步骤四:根据提示,通过拖拽,一步步分析,导入需要的模块文件
5. 检测
点击初步检测,将提示用户此次拆分可能的问题,以及哪些中间件需要人工。

打开下侧面板中 KouplelessIDE,查看提示。

6. 拆分
点击开始拆分。

打开下侧面板中 KouplelessIDE,查看提示。

Feedback
Was this page helpful?
Welcome propose feedback to community!
Welcome propose feedback to community, or improve this document directly.。
最后修改 2025.07.02: Update multi-app-adapter-developing-notes.md (19868e7)