|
| 1 | +[ |
| 2 | + { |
| 3 | + "id": "data-orm-mybatis-plus", |
| 4 | + "name": "MyBatis-Plus", |
| 5 | + "name_en": "MyBatis-Plus", |
| 6 | + "domain": "data", |
| 7 | + "subdomain": "orm", |
| 8 | + "stage": [ |
| 9 | + "code" |
| 10 | + ], |
| 11 | + "type": "platform-bom", |
| 12 | + "description": "MyBatis 增强工具包,提供通用 CRUD、分页、条件构造器等开箱即用的 ORM 能力", |
| 13 | + "use_case": "首选 ORM 方案。数据层开发时的默认选择,通过 BOM 统一管理 MyBatis-Plus 族版本", |
| 14 | + "ai_context": "## 集成模式\n通过 BOM 引入版本管理。使用 mybatis-plus-boot-starter 自动配置集成。\n\n## 配置要点\n- mybatis-plus.mapper-locations: Mapper XML 文件位置\n- mybatis-plus.type-aliases-package: 实体类别名包\n- mybatis-plus.global-config.db-config.id-type: 主键策略\n- 分页插件需显式配置 MybatisPlusInterceptor\n\n## 约束与限制\n- 基于 MyBatis,SQL 能力完整但需要理解 MyBatis 体系\n- 复杂多表查询建议使用 MyBatis XML 而非注解\n- 自动生成代码需谨慎审查\n\n## 常见陷阱\n- 忘记配置分页插件导致分页失效\n- 逻辑删除字段未配置 @TableLogic\n- 乐观锁字段未配置 @Version\n- 实体类与数据库字段类型不匹配(特别是日期类型)", |
| 15 | + "alternatives": [ |
| 16 | + "data-orm-easy-query" |
| 17 | + ], |
| 18 | + "maven": { |
| 19 | + "group": "com.baomidou", |
| 20 | + "artifact": "mybatis-plus-bom" |
| 21 | + }, |
| 22 | + "version_ref": null, |
| 23 | + "gradle_ref": "mybatis-plus-bom", |
| 24 | + "dependencies": [], |
| 25 | + "starter_available": true, |
| 26 | + "tags": [ |
| 27 | + "orm", |
| 28 | + "mybatis", |
| 29 | + "mybatis-plus", |
| 30 | + "crud", |
| 31 | + "bom" |
| 32 | + ], |
| 33 | + "status": "stable", |
| 34 | + "since_version": "0.1.0", |
| 35 | + "deprecated_since": null, |
| 36 | + "migration_guide": null, |
| 37 | + "related_plugins": [ |
| 38 | + "pub.ihub.plugin.ihub-boot" |
| 39 | + ], |
| 40 | + "doc_url": "https://baomidou.com", |
| 41 | + "source_url": null, |
| 42 | + "ihub_layer": "L2" |
| 43 | + }, |
| 44 | + { |
| 45 | + "id": "data-orm-mybatis-plus-ext", |
| 46 | + "name": "MyBatis-Plus-Ext", |
| 47 | + "name_en": "MyBatis-Plus Extensions", |
| 48 | + "domain": "data", |
| 49 | + "subdomain": "orm", |
| 50 | + "stage": [ |
| 51 | + "code" |
| 52 | + ], |
| 53 | + "type": "third-party-reference", |
| 54 | + "description": "MyBatis-Plus 扩展包,提供自动建表、数据绑定、多数据源注解等高级功能", |
| 55 | + "use_case": "在 MyBatis-Plus 基础上需要自动建表(Actable)、关联数据自动绑定(Bind)、动态条件注解时使用", |
| 56 | + "ai_context": "## 集成模式\n在 mybatis-plus-bom 基础上叠加。各模块按需引入:\n- mpe-annotation: 基础注解\n- mpe-autotable-*: 自动建表\n- mpe-bind: 关联数据绑定\n- mpe-datasource: 多数据源注解\n- mpe-condition: 动态条件注解\n- mpe-spring-boot3-starter: Spring Boot 3.x 自动配置\n\n## 配置要点\n- 自动建表功能需在开发环境谨慎使用\n- 数据绑定可能产生 N+1 查询\n- 多数据源与 dynamic-datasource 配合使用\n\n## 约束与限制\n- 必须与 MyBatis-Plus 配合使用\n- 自动建表不建议在生产环境启用\n- Bind 注解会产生额外 SQL 查询\n\n## 常见陷阱\n- 生产环境忘记关闭自动建表导致数据库结构意外变更\n- Bind 注解导致 N+1 查询问题\n- 多数据源配置混淆", |
| 57 | + "alternatives": [], |
| 58 | + "maven": { |
| 59 | + "group": "org.dromara.mpe", |
| 60 | + "artifact": "mybatis-plus-ext-annotation" |
| 61 | + }, |
| 62 | + "version_ref": "mpe", |
| 63 | + "gradle_ref": [ |
| 64 | + "mpe-annotation", |
| 65 | + "mpe-autotable-annotation", |
| 66 | + "mpe-autotable-core", |
| 67 | + "mpe-actable-core", |
| 68 | + "mpe-bind", |
| 69 | + "mpe-condition", |
| 70 | + "mpe-datasource", |
| 71 | + "mpe-processor", |
| 72 | + "mpe-spring-boot-starter", |
| 73 | + "mpe-spring-boot3-starter" |
| 74 | + ], |
| 75 | + "dependencies": [ |
| 76 | + { |
| 77 | + "component_id": "data-orm-mybatis-plus", |
| 78 | + "required": true, |
| 79 | + "scope": "implementation", |
| 80 | + "reason": "MyBatis-Plus-Ext 是 MyBatis-Plus 的扩展" |
| 81 | + } |
| 82 | + ], |
| 83 | + "starter_available": true, |
| 84 | + "tags": [ |
| 85 | + "orm", |
| 86 | + "mybatis-plus", |
| 87 | + "extension", |
| 88 | + "auto-table", |
| 89 | + "data-bind" |
| 90 | + ], |
| 91 | + "status": "stable", |
| 92 | + "since_version": "0.1.0", |
| 93 | + "deprecated_since": null, |
| 94 | + "migration_guide": null, |
| 95 | + "related_plugins": [ |
| 96 | + "pub.ihub.plugin.ihub-boot" |
| 97 | + ], |
| 98 | + "doc_url": "https://mybatis-plus-ext.duanshu.com", |
| 99 | + "source_url": null, |
| 100 | + "ihub_layer": "L3" |
| 101 | + }, |
| 102 | + { |
| 103 | + "id": "data-orm-easy-query", |
| 104 | + "name": "Easy-Query", |
| 105 | + "name_en": "Easy-Query", |
| 106 | + "domain": "data", |
| 107 | + "subdomain": "orm", |
| 108 | + "stage": [ |
| 109 | + "code" |
| 110 | + ], |
| 111 | + "type": "third-party-reference", |
| 112 | + "description": "强类型 SQL DSL 框架,提供编译期安全的 SQL 构建、自动建表、多表查询等能力", |
| 113 | + "use_case": "MyBatis-Plus 的替代方案。需要强类型安全、编译期 SQL 校验、Lambda 风格查询时选择。适合喜欢 JPA 风格但需要 SQL 控制力的场景", |
| 114 | + "ai_context": "## 集成模式\n通过 BOM 引入,使用 eq-sql-springboot-starter 自动配置。支持 Java 和 Kotlin。\n\n## 配置要点\n- easy-query.enable: 是否启用\n- easy-query.default-track: 是否默认追踪实体变更\n- easy-query.logic-delete-strategy: 逻辑删除策略\n- 支持 MySQL、PostgreSQL、SQL Server 等主流数据库\n\n## 约束与限制\n- 与 MyBatis-Plus 互斥,不要同时使用两种 ORM\n- 部分复杂 SQL(如递归 CTE)可能不如 MyBatis XML 直观\n- 团队需要学习 DSL 风格查询语法\n\n## 常见陷阱\n- 同时引入 MyBatis-Plus 和 Easy-Query 导致配置冲突\n- 未配置 dialect 导致 SQL 生成错误\n- 实体追踪(tracking)开启后忘记调用 saveChanges 导致数据丢失", |
| 115 | + "alternatives": [ |
| 116 | + "data-orm-mybatis-plus" |
| 117 | + ], |
| 118 | + "maven": { |
| 119 | + "group": "com.easy-query", |
| 120 | + "artifact": "sql-core" |
| 121 | + }, |
| 122 | + "version_ref": "easy-query", |
| 123 | + "gradle_ref": [ |
| 124 | + "eq-sql-core", |
| 125 | + "eq-sql-springboot-starter", |
| 126 | + "eq-sql-api4j", |
| 127 | + "eq-sql-api-proxy", |
| 128 | + "eq-sql-cache", |
| 129 | + "eq-sql-mysql", |
| 130 | + "eq-sql-processor", |
| 131 | + "eq-sql-ksp-processor", |
| 132 | + "eq-sql-kt-springboot-starter", |
| 133 | + "eq-all" |
| 134 | + ], |
| 135 | + "dependencies": [], |
| 136 | + "starter_available": true, |
| 137 | + "tags": [ |
| 138 | + "orm", |
| 139 | + "sql", |
| 140 | + "dsl", |
| 141 | + "lambda", |
| 142 | + "type-safe" |
| 143 | + ], |
| 144 | + "status": "stable", |
| 145 | + "since_version": "0.1.0", |
| 146 | + "deprecated_since": null, |
| 147 | + "migration_guide": null, |
| 148 | + "related_plugins": [ |
| 149 | + "pub.ihub.plugin.ihub-boot" |
| 150 | + ], |
| 151 | + "doc_url": "https://easy-query.com", |
| 152 | + "source_url": null, |
| 153 | + "ihub_layer": "L2" |
| 154 | + }, |
| 155 | + { |
| 156 | + "id": "data-datasource-dynamic", |
| 157 | + "name": "Dynamic-Datasource", |
| 158 | + "name_en": "Dynamic Datasource", |
| 159 | + "domain": "data", |
| 160 | + "subdomain": "datasource", |
| 161 | + "stage": [ |
| 162 | + "code", |
| 163 | + "adapt" |
| 164 | + ], |
| 165 | + "type": "third-party-reference", |
| 166 | + "description": "动态数据源切换框架,支持运行时多数据源切换、读写分离、负载均衡", |
| 167 | + "use_case": "需要多数据源管理(主从分离、多租户分库、读写分离)时使用。通过 @DS 注解实现数据源切换", |
| 168 | + "ai_context": "## 集成模式\n通过 starter 自动配置。使用 @DS 注解标记类或方法的数据源。\n\n## 配置要点\n- spring.datasource.dynamic.primary: 默认数据源\n- spring.datasource.dynamic.datasource.<name>: 配置多个数据源\n- @DS(\"slave\"):方法级数据源切换\n- 支持 seata 分布式事务集成\n\n## 约束与限制\n- 不支持嵌套数据源切换(内层 @DS 会被外层覆盖)\n- 事务内切换数据源需要特殊处理\n- 多数据源的事务管理需要额外配置\n\n## 常见陷阱\n- 事务内 @DS 切换不生效\n- 忘记配置 primary 导致默认数据源未定义\n- 多数据源的 DDL 初始化脚本路径混淆", |
| 169 | + "alternatives": [], |
| 170 | + "maven": { |
| 171 | + "group": "com.baomidou", |
| 172 | + "artifact": "dynamic-datasource-spring-boot3-starter" |
| 173 | + }, |
| 174 | + "version_ref": null, |
| 175 | + "gradle_ref": "dynamic-datasource", |
| 176 | + "dependencies": [], |
| 177 | + "starter_available": true, |
| 178 | + "tags": [ |
| 179 | + "datasource", |
| 180 | + "dynamic", |
| 181 | + "read-write-split", |
| 182 | + "multi-tenant" |
| 183 | + ], |
| 184 | + "status": "stable", |
| 185 | + "since_version": "0.1.0", |
| 186 | + "deprecated_since": null, |
| 187 | + "migration_guide": null, |
| 188 | + "related_plugins": [ |
| 189 | + "pub.ihub.plugin.ihub-boot" |
| 190 | + ], |
| 191 | + "doc_url": "https://dynamic-datasource.com", |
| 192 | + "source_url": null, |
| 193 | + "ihub_layer": "L2" |
| 194 | + } |
| 195 | +] |
0 commit comments