ai-engineering-init 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/.claude/agents/code-reviewer.md +139 -0
  2. package/.claude/agents/project-manager.md +159 -0
  3. package/.claude/audio/completed.wav +0 -0
  4. package/.claude/commands/add-todo.md +255 -0
  5. package/.claude/commands/check.md +210 -0
  6. package/.claude/commands/crud.md +454 -0
  7. package/.claude/commands/dev.md +503 -0
  8. package/.claude/commands/init-docs.md +681 -0
  9. package/.claude/commands/next.md +251 -0
  10. package/.claude/commands/progress.md +242 -0
  11. package/.claude/commands/start.md +199 -0
  12. package/.claude/commands/sync.md +307 -0
  13. package/.claude/commands/update-status.md +428 -0
  14. package/.claude/docs/Mixin/344/275/277/347/224/250/346/214/207/345/215/227.md +299 -0
  15. package/.claude/docs/README.md +167 -0
  16. package/.claude/docs//345/211/215/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +599 -0
  17. package/.claude/docs//345/220/216/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +726 -0
  18. package/.claude/docs//345/267/245/344/275/234/346/265/201/345/274/200/345/217/221/346/214/207/345/215/227.md +714 -0
  19. package/.claude/docs//345/267/245/345/205/267/347/261/273/344/275/277/347/224/250/346/214/207/345/215/227.md +463 -0
  20. package/.claude/docs//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/350/247/204/350/214/203.md +390 -0
  21. package/.claude/docs//346/226/260/345/212/237/350/203/275/345/274/200/345/217/221/346/265/201/347/250/213/350/247/204/350/214/203.md +688 -0
  22. package/.claude/docs//346/226/260/351/241/271/347/233/256/345/274/200/345/217/221/346/265/201/347/250/213.md +365 -0
  23. package/.claude/docs//346/241/206/346/236/266/350/257/264/346/230/216.md +393 -0
  24. package/.claude/docs//350/267/257/347/224/261/351/205/215/347/275/256/346/214/207/345/215/227.md +246 -0
  25. package/.claude/framework-config.json +73 -0
  26. package/.claude/hooks/pre-tool-use.js +117 -0
  27. package/.claude/hooks/skill-forced-eval.js +167 -0
  28. package/.claude/hooks/stop.js +58 -0
  29. package/.claude/settings.json +41 -0
  30. package/.claude/skills/add-skill/SKILL.md +352 -0
  31. package/.claude/skills/api-development/SKILL.md +560 -0
  32. package/.claude/skills/architecture-design/SKILL.md +756 -0
  33. package/.claude/skills/backend-annotations/SKILL.md +674 -0
  34. package/.claude/skills/banana-image/CHANGELOG.md +37 -0
  35. package/.claude/skills/banana-image/README.md +146 -0
  36. package/.claude/skills/banana-image/SKILL.md +164 -0
  37. package/.claude/skills/banana-image/assets/logo.png +0 -0
  38. package/.claude/skills/banana-image/references/advanced-usage.md +189 -0
  39. package/.claude/skills/banana-image/scripts/apply_template.py +125 -0
  40. package/.claude/skills/banana-image/scripts/banana_image_exec.ts +412 -0
  41. package/.claude/skills/banana-image/scripts/batch_prep.py +82 -0
  42. package/.claude/skills/banana-image/scripts/package-lock.json +1437 -0
  43. package/.claude/skills/banana-image/scripts/package.json +18 -0
  44. package/.claude/skills/banana-image/scripts/requirements.txt +10 -0
  45. package/.claude/skills/banana-image/templates/poster.json +22 -0
  46. package/.claude/skills/banana-image/templates/product.json +17 -0
  47. package/.claude/skills/banana-image/templates/social.json +22 -0
  48. package/.claude/skills/banana-image/templates/thumbnail.json +17 -0
  49. package/.claude/skills/brainstorm/SKILL.md +648 -0
  50. package/.claude/skills/bug-detective/SKILL.md +1206 -0
  51. package/.claude/skills/code-patterns/SKILL.md +590 -0
  52. package/.claude/skills/collaborating-with-codex/SKILL.md +174 -0
  53. package/.claude/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
  54. package/.claude/skills/collaborating-with-gemini/SKILL.md +194 -0
  55. package/.claude/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
  56. package/.claude/skills/crud-development/SKILL.md +649 -0
  57. package/.claude/skills/data-permission/SKILL.md +599 -0
  58. package/.claude/skills/database-ops/SKILL.md +407 -0
  59. package/.claude/skills/error-handler/SKILL.md +371 -0
  60. package/.claude/skills/file-oss-management/SKILL.md +863 -0
  61. package/.claude/skills/git-workflow/SKILL.md +375 -0
  62. package/.claude/skills/json-serialization/SKILL.md +357 -0
  63. package/.claude/skills/leniu-api-development/SKILL.md +803 -0
  64. package/.claude/skills/leniu-architecture-design/SKILL.md +598 -0
  65. package/.claude/skills/leniu-backend-annotations/SKILL.md +664 -0
  66. package/.claude/skills/leniu-code-patterns/SKILL.md +365 -0
  67. package/.claude/skills/leniu-crud-development/SKILL.md +1110 -0
  68. package/.claude/skills/leniu-data-permission/SKILL.md +256 -0
  69. package/.claude/skills/leniu-database-ops/SKILL.md +426 -0
  70. package/.claude/skills/leniu-error-handler/SKILL.md +462 -0
  71. package/.claude/skills/leniu-java-amount-handling/SKILL.md +461 -0
  72. package/.claude/skills/leniu-java-code-style/SKILL.md +510 -0
  73. package/.claude/skills/leniu-java-concurrent/SKILL.md +400 -0
  74. package/.claude/skills/leniu-java-entity/SKILL.md +751 -0
  75. package/.claude/skills/leniu-java-export/SKILL.md +560 -0
  76. package/.claude/skills/leniu-java-logging/SKILL.md +832 -0
  77. package/.claude/skills/leniu-java-mq/SKILL.md +338 -0
  78. package/.claude/skills/leniu-java-mybatis/SKILL.md +640 -0
  79. package/.claude/skills/leniu-java-report-query-param/SKILL.md +291 -0
  80. package/.claude/skills/leniu-java-task/SKILL.md +367 -0
  81. package/.claude/skills/leniu-java-total-line/SKILL.md +195 -0
  82. package/.claude/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
  83. package/.claude/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
  84. package/.claude/skills/leniu-mealtime/SKILL.md +215 -0
  85. package/.claude/skills/leniu-redis-cache/SKILL.md +316 -0
  86. package/.claude/skills/leniu-security-guard/SKILL.md +520 -0
  87. package/.claude/skills/leniu-utils-toolkit/SKILL.md +380 -0
  88. package/.claude/skills/openspec-apply-change/SKILL.md +156 -0
  89. package/.claude/skills/openspec-archive-change/SKILL.md +114 -0
  90. package/.claude/skills/openspec-bulk-archive-change/SKILL.md +246 -0
  91. package/.claude/skills/openspec-continue-change/SKILL.md +118 -0
  92. package/.claude/skills/openspec-explore/SKILL.md +290 -0
  93. package/.claude/skills/openspec-ff-change/SKILL.md +101 -0
  94. package/.claude/skills/openspec-new-change/SKILL.md +74 -0
  95. package/.claude/skills/openspec-onboard/SKILL.md +529 -0
  96. package/.claude/skills/openspec-sync-specs/SKILL.md +138 -0
  97. package/.claude/skills/openspec-verify-change/SKILL.md +168 -0
  98. package/.claude/skills/performance-doctor/SKILL.md +627 -0
  99. package/.claude/skills/project-navigator/SKILL.md +305 -0
  100. package/.claude/skills/redis-cache/SKILL.md +839 -0
  101. package/.claude/skills/scheduled-jobs/SKILL.md +633 -0
  102. package/.claude/skills/security-guard/SKILL.md +748 -0
  103. package/.claude/skills/sms-mail/SKILL.md +766 -0
  104. package/.claude/skills/social-login/SKILL.md +668 -0
  105. package/.claude/skills/store-pc/SKILL.md +366 -0
  106. package/.claude/skills/task-tracker/SKILL.md +307 -0
  107. package/.claude/skills/tech-decision/SKILL.md +393 -0
  108. package/.claude/skills/tenant-management/SKILL.md +603 -0
  109. package/.claude/skills/test-development/SKILL.md +755 -0
  110. package/.claude/skills/ui-pc/SKILL.md +438 -0
  111. package/.claude/skills/utils-toolkit/SKILL.md +615 -0
  112. package/.claude/skills/websocket-sse/SKILL.md +716 -0
  113. package/.claude/skills/workflow-engine/SKILL.md +676 -0
  114. package/.claude/templates//345/276/205/345/212/236/346/270/205/345/215/225/346/250/241/346/235/277.md +56 -0
  115. package/.claude/templates//351/234/200/346/261/202/346/226/207/346/241/243/346/250/241/346/235/277.md +85 -0
  116. package/.claude/templates//351/241/271/347/233/256/347/212/266/346/200/201/346/250/241/346/235/277.md +43 -0
  117. package/.codex/skills/add-skill/SKILL.md +352 -0
  118. package/.codex/skills/add-todo/SKILL.md +269 -0
  119. package/.codex/skills/api-development/SKILL.md +693 -0
  120. package/.codex/skills/architecture-design/SKILL.md +628 -0
  121. package/.codex/skills/backend-annotations/SKILL.md +664 -0
  122. package/.codex/skills/banana-image/CHANGELOG.md +37 -0
  123. package/.codex/skills/banana-image/README.md +146 -0
  124. package/.codex/skills/banana-image/SKILL.md +164 -0
  125. package/.codex/skills/banana-image/assets/logo.png +0 -0
  126. package/.codex/skills/banana-image/references/advanced-usage.md +189 -0
  127. package/.codex/skills/banana-image/scripts/apply_template.py +125 -0
  128. package/.codex/skills/banana-image/scripts/banana_image_exec.ts +412 -0
  129. package/.codex/skills/banana-image/scripts/batch_prep.py +82 -0
  130. package/.codex/skills/banana-image/scripts/package-lock.json +1437 -0
  131. package/.codex/skills/banana-image/scripts/package.json +18 -0
  132. package/.codex/skills/banana-image/scripts/requirements.txt +10 -0
  133. package/.codex/skills/banana-image/templates/poster.json +22 -0
  134. package/.codex/skills/banana-image/templates/product.json +17 -0
  135. package/.codex/skills/banana-image/templates/social.json +22 -0
  136. package/.codex/skills/banana-image/templates/thumbnail.json +17 -0
  137. package/.codex/skills/brainstorm/SKILL.md +648 -0
  138. package/.codex/skills/bug-detective/SKILL.md +1206 -0
  139. package/.codex/skills/check/SKILL.md +367 -0
  140. package/.codex/skills/code-patterns/SKILL.md +442 -0
  141. package/.codex/skills/collaborating-with-codex/SKILL.md +174 -0
  142. package/.codex/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
  143. package/.codex/skills/collaborating-with-gemini/SKILL.md +194 -0
  144. package/.codex/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
  145. package/.codex/skills/crud/SKILL.md +265 -0
  146. package/.codex/skills/crud-development/SKILL.md +637 -0
  147. package/.codex/skills/data-permission/SKILL.md +591 -0
  148. package/.codex/skills/database-ops/SKILL.md +553 -0
  149. package/.codex/skills/dev/SKILL.md +187 -0
  150. package/.codex/skills/error-handler/SKILL.md +361 -0
  151. package/.codex/skills/file-oss-management/SKILL.md +863 -0
  152. package/.codex/skills/git-workflow/SKILL.md +375 -0
  153. package/.codex/skills/init-docs/SKILL.md +194 -0
  154. package/.codex/skills/json-serialization/SKILL.md +357 -0
  155. package/.codex/skills/leniu-api-development/SKILL.md +803 -0
  156. package/.codex/skills/leniu-architecture-design/SKILL.md +594 -0
  157. package/.codex/skills/leniu-backend-annotations/SKILL.md +662 -0
  158. package/.codex/skills/leniu-code-patterns/SKILL.md +365 -0
  159. package/.codex/skills/leniu-crud-development/SKILL.md +1110 -0
  160. package/.codex/skills/leniu-data-permission/SKILL.md +256 -0
  161. package/.codex/skills/leniu-database-ops/SKILL.md +426 -0
  162. package/.codex/skills/leniu-error-handler/SKILL.md +462 -0
  163. package/.codex/skills/leniu-java-amount-handling/SKILL.md +461 -0
  164. package/.codex/skills/leniu-java-code-style/SKILL.md +510 -0
  165. package/.codex/skills/leniu-java-concurrent/SKILL.md +400 -0
  166. package/.codex/skills/leniu-java-entity/SKILL.md +751 -0
  167. package/.codex/skills/leniu-java-export/SKILL.md +560 -0
  168. package/.codex/skills/leniu-java-logging/SKILL.md +832 -0
  169. package/.codex/skills/leniu-java-mq/SKILL.md +338 -0
  170. package/.codex/skills/leniu-java-mybatis/SKILL.md +640 -0
  171. package/.codex/skills/leniu-java-report-query-param/SKILL.md +291 -0
  172. package/.codex/skills/leniu-java-task/SKILL.md +367 -0
  173. package/.codex/skills/leniu-java-total-line/SKILL.md +195 -0
  174. package/.codex/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
  175. package/.codex/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
  176. package/.codex/skills/leniu-mealtime/SKILL.md +215 -0
  177. package/.codex/skills/leniu-redis-cache/SKILL.md +316 -0
  178. package/.codex/skills/leniu-security-guard/SKILL.md +520 -0
  179. package/.codex/skills/leniu-utils-toolkit/SKILL.md +378 -0
  180. package/.codex/skills/next/SKILL.md +137 -0
  181. package/.codex/skills/openspec-apply-change/SKILL.md +156 -0
  182. package/.codex/skills/openspec-archive-change/SKILL.md +114 -0
  183. package/.codex/skills/openspec-bulk-archive-change/SKILL.md +246 -0
  184. package/.codex/skills/openspec-continue-change/SKILL.md +118 -0
  185. package/.codex/skills/openspec-explore/SKILL.md +290 -0
  186. package/.codex/skills/openspec-ff-change/SKILL.md +101 -0
  187. package/.codex/skills/openspec-new-change/SKILL.md +74 -0
  188. package/.codex/skills/openspec-onboard/SKILL.md +529 -0
  189. package/.codex/skills/openspec-sync-specs/SKILL.md +138 -0
  190. package/.codex/skills/openspec-verify-change/SKILL.md +168 -0
  191. package/.codex/skills/performance-doctor/SKILL.md +627 -0
  192. package/.codex/skills/progress/SKILL.md +193 -0
  193. package/.codex/skills/project-navigator/SKILL.md +286 -0
  194. package/.codex/skills/redis-cache/SKILL.md +829 -0
  195. package/.codex/skills/scheduled-jobs/SKILL.md +633 -0
  196. package/.codex/skills/security-guard/SKILL.md +739 -0
  197. package/.codex/skills/sms-mail/SKILL.md +766 -0
  198. package/.codex/skills/social-login/SKILL.md +668 -0
  199. package/.codex/skills/start/SKILL.md +154 -0
  200. package/.codex/skills/store-pc/SKILL.md +491 -0
  201. package/.codex/skills/sync/SKILL.md +149 -0
  202. package/.codex/skills/task-tracker/SKILL.md +307 -0
  203. package/.codex/skills/tech-decision/SKILL.md +393 -0
  204. package/.codex/skills/tenant-management/SKILL.md +603 -0
  205. package/.codex/skills/test-development/SKILL.md +755 -0
  206. package/.codex/skills/ui-pc/SKILL.md +475 -0
  207. package/.codex/skills/update-status/SKILL.md +159 -0
  208. package/.codex/skills/utils-toolkit/SKILL.md +593 -0
  209. package/.codex/skills/websocket-sse/SKILL.md +716 -0
  210. package/.codex/skills/workflow-engine/SKILL.md +676 -0
  211. package/.cursor/agents/code-reviewer.md +139 -0
  212. package/.cursor/agents/project-manager.md +159 -0
  213. package/.cursor/commands/opsx-apply.md +152 -0
  214. package/.cursor/commands/opsx-archive.md +157 -0
  215. package/.cursor/commands/opsx-bulk-archive.md +242 -0
  216. package/.cursor/commands/opsx-continue.md +114 -0
  217. package/.cursor/commands/opsx-explore.md +174 -0
  218. package/.cursor/commands/opsx-ff.md +94 -0
  219. package/.cursor/commands/opsx-new.md +69 -0
  220. package/.cursor/commands/opsx-onboard.md +525 -0
  221. package/.cursor/commands/opsx-sync.md +134 -0
  222. package/.cursor/commands/opsx-verify.md +164 -0
  223. package/.cursor/mcp.json +22 -0
  224. package/.cursor/skills/add-skill/SKILL.md +352 -0
  225. package/.cursor/skills/api-development/SKILL.md +560 -0
  226. package/.cursor/skills/architecture-design/SKILL.md +756 -0
  227. package/.cursor/skills/backend-annotations/SKILL.md +674 -0
  228. package/.cursor/skills/banana-image/CHANGELOG.md +37 -0
  229. package/.cursor/skills/banana-image/README.md +146 -0
  230. package/.cursor/skills/banana-image/SKILL.md +164 -0
  231. package/.cursor/skills/banana-image/assets/logo.png +0 -0
  232. package/.cursor/skills/banana-image/references/advanced-usage.md +189 -0
  233. package/.cursor/skills/banana-image/scripts/apply_template.py +125 -0
  234. package/.cursor/skills/banana-image/scripts/banana_image_exec.ts +412 -0
  235. package/.cursor/skills/banana-image/scripts/batch_prep.py +82 -0
  236. package/.cursor/skills/banana-image/scripts/package-lock.json +1437 -0
  237. package/.cursor/skills/banana-image/scripts/package.json +18 -0
  238. package/.cursor/skills/banana-image/scripts/requirements.txt +10 -0
  239. package/.cursor/skills/banana-image/templates/poster.json +22 -0
  240. package/.cursor/skills/banana-image/templates/product.json +17 -0
  241. package/.cursor/skills/banana-image/templates/social.json +22 -0
  242. package/.cursor/skills/banana-image/templates/thumbnail.json +17 -0
  243. package/.cursor/skills/brainstorm/SKILL.md +648 -0
  244. package/.cursor/skills/bug-detective/SKILL.md +1206 -0
  245. package/.cursor/skills/code-patterns/SKILL.md +590 -0
  246. package/.cursor/skills/collaborating-with-codex/SKILL.md +174 -0
  247. package/.cursor/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
  248. package/.cursor/skills/collaborating-with-gemini/SKILL.md +194 -0
  249. package/.cursor/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
  250. package/.cursor/skills/crud-development/SKILL.md +649 -0
  251. package/.cursor/skills/data-permission/SKILL.md +599 -0
  252. package/.cursor/skills/database-ops/SKILL.md +407 -0
  253. package/.cursor/skills/error-handler/SKILL.md +371 -0
  254. package/.cursor/skills/file-oss-management/SKILL.md +863 -0
  255. package/.cursor/skills/git-workflow/SKILL.md +375 -0
  256. package/.cursor/skills/json-serialization/SKILL.md +357 -0
  257. package/.cursor/skills/leniu-api-development/SKILL.md +803 -0
  258. package/.cursor/skills/leniu-architecture-design/SKILL.md +598 -0
  259. package/.cursor/skills/leniu-backend-annotations/SKILL.md +664 -0
  260. package/.cursor/skills/leniu-code-patterns/SKILL.md +365 -0
  261. package/.cursor/skills/leniu-crud-development/SKILL.md +1110 -0
  262. package/.cursor/skills/leniu-data-permission/SKILL.md +256 -0
  263. package/.cursor/skills/leniu-database-ops/SKILL.md +426 -0
  264. package/.cursor/skills/leniu-error-handler/SKILL.md +462 -0
  265. package/.cursor/skills/leniu-java-amount-handling/SKILL.md +461 -0
  266. package/.cursor/skills/leniu-java-code-style/SKILL.md +510 -0
  267. package/.cursor/skills/leniu-java-concurrent/SKILL.md +400 -0
  268. package/.cursor/skills/leniu-java-entity/SKILL.md +751 -0
  269. package/.cursor/skills/leniu-java-export/SKILL.md +560 -0
  270. package/.cursor/skills/leniu-java-logging/SKILL.md +832 -0
  271. package/.cursor/skills/leniu-java-mq/SKILL.md +338 -0
  272. package/.cursor/skills/leniu-java-mybatis/SKILL.md +640 -0
  273. package/.cursor/skills/leniu-java-report-query-param/SKILL.md +291 -0
  274. package/.cursor/skills/leniu-java-task/SKILL.md +367 -0
  275. package/.cursor/skills/leniu-java-total-line/SKILL.md +195 -0
  276. package/.cursor/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
  277. package/.cursor/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
  278. package/.cursor/skills/leniu-mealtime/SKILL.md +215 -0
  279. package/.cursor/skills/leniu-redis-cache/SKILL.md +316 -0
  280. package/.cursor/skills/leniu-security-guard/SKILL.md +520 -0
  281. package/.cursor/skills/leniu-utils-toolkit/SKILL.md +380 -0
  282. package/.cursor/skills/openspec-apply-change/SKILL.md +156 -0
  283. package/.cursor/skills/openspec-archive-change/SKILL.md +114 -0
  284. package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +246 -0
  285. package/.cursor/skills/openspec-continue-change/SKILL.md +118 -0
  286. package/.cursor/skills/openspec-explore/SKILL.md +290 -0
  287. package/.cursor/skills/openspec-ff-change/SKILL.md +101 -0
  288. package/.cursor/skills/openspec-new-change/SKILL.md +74 -0
  289. package/.cursor/skills/openspec-onboard/SKILL.md +529 -0
  290. package/.cursor/skills/openspec-sync-specs/SKILL.md +138 -0
  291. package/.cursor/skills/openspec-verify-change/SKILL.md +168 -0
  292. package/.cursor/skills/performance-doctor/SKILL.md +627 -0
  293. package/.cursor/skills/project-navigator/SKILL.md +305 -0
  294. package/.cursor/skills/redis-cache/SKILL.md +839 -0
  295. package/.cursor/skills/scheduled-jobs/SKILL.md +633 -0
  296. package/.cursor/skills/security-guard/SKILL.md +748 -0
  297. package/.cursor/skills/sms-mail/SKILL.md +766 -0
  298. package/.cursor/skills/social-login/SKILL.md +668 -0
  299. package/.cursor/skills/store-pc/SKILL.md +366 -0
  300. package/.cursor/skills/task-tracker/SKILL.md +307 -0
  301. package/.cursor/skills/tech-decision/SKILL.md +393 -0
  302. package/.cursor/skills/tenant-management/SKILL.md +603 -0
  303. package/.cursor/skills/test-development/SKILL.md +755 -0
  304. package/.cursor/skills/ui-pc/SKILL.md +438 -0
  305. package/.cursor/skills/utils-toolkit/SKILL.md +615 -0
  306. package/.cursor/skills/websocket-sse/SKILL.md +716 -0
  307. package/.cursor/skills/workflow-engine/SKILL.md +676 -0
  308. package/AGENTS.md +669 -0
  309. package/CLAUDE.md +205 -0
  310. package/README.md +205 -0
  311. package/bin/index.js +179 -0
  312. package/init.sh +178 -0
  313. package/package.json +27 -0
@@ -0,0 +1,674 @@
1
+ ---
2
+ name: backend-annotations
3
+ description: |
4
+ 后端高级注解使用指南。包含 @RateLimiter、@RepeatSubmit、@Sensitive、@EncryptField、@ApiEncrypt、@DataPermission 等注解的用法。
5
+
6
+ 触发场景:
7
+ - 配置接口限流(@RateLimiter)
8
+ - 配置防重复提交(@RepeatSubmit)
9
+ - 配置数据脱敏(@Sensitive)
10
+ - 配置字段加密(@EncryptField)
11
+ - 配置接口加密(@ApiEncrypt)
12
+ - 配置数据权限注解(@DataPermission)
13
+
14
+ 触发词:注解、@RateLimiter、@RepeatSubmit、@Sensitive、@EncryptField、@ApiEncrypt、@DataPermission、@DataColumn、限流、防重复、脱敏、加密、数据权限注解
15
+ ---
16
+
17
+ # 后端高级注解指南
18
+
19
+ > **⚠️ 重要声明**: 本项目是 **RuoYi-Vue-Plus 纯后端项目**,采用三层架构!
20
+ > 本文档规范基于框架内置的高级注解功能。所有注解均依赖 Redis 或数据库拦截机制。
21
+
22
+ ## 注解快速特征对比
23
+
24
+ | 注解 | 实现机制 | 作用范围 | 依赖 | 常用场景 |
25
+ |------|--------|--------|------|---------|
26
+ | `@RateLimiter` | AOP 切面 | Controller 方法 | Redis | 接口防刷、流量保护 |
27
+ | `@RepeatSubmit` | AOP 切面 | Controller 方法 | Redis + Token | 防重复提交、幂等性 |
28
+ | `@Sensitive` | Jackson 序列化器 | VO 字段 | 无 | 数据脱敏、隐私保护 |
29
+ | `@EncryptField` | MyBatis 拦截器 | Entity 字段 | 无 | 数据库加密、敏感字段 |
30
+ | `@ApiEncrypt` | 拦截器 | Controller 方法 | 无 | 接口加密、传输安全 |
31
+ | `@DataPermission` | AOP 拦截器 | Mapper 接口 | MyBatis | 数据隔离、行级权限 |
32
+
33
+ ---
34
+
35
+ ## 1. @RateLimiter - 接口限流
36
+
37
+ ### 作用
38
+ 基于 Redis 和令牌桶算法实现分布式限流,防止接口被恶意刷新或频繁访问。
39
+
40
+ ### 限流类型
41
+
42
+ | 类型 | 说明 | 适用场景 |
43
+ |------|------|---------|
44
+ | `LimitType.DEFAULT` | 全局限流,所有请求共享配额 | 查询接口、通用接口 |
45
+ | `LimitType.IP` | IP限流,每个IP独立计算 | 登录、验证码、敏感操作 |
46
+ | `LimitType.CLUSTER` | 集群限流,每个节点独立 | 集群部署、分布式场景 |
47
+
48
+ ### 使用示例
49
+
50
+ ```java
51
+ import org.dromara.common.ratelimiter.annotation.RateLimiter;
52
+ import org.dromara.common.ratelimiter.enums.LimitType;
53
+
54
+ @RestController
55
+ @RequestMapping("/demo")
56
+ public class DemoController {
57
+
58
+ // ✅ 基本用法:60秒内最多100次
59
+ @RateLimiter(time = 60, count = 100)
60
+ @GetMapping("/list")
61
+ public R<List<XxxVo>> list() { }
62
+
63
+ // ✅ IP限流:每个IP每分钟最多10次
64
+ @RateLimiter(time = 60, count = 10, limitType = LimitType.IP)
65
+ @PostMapping("/login")
66
+ public R<String> login() { }
67
+
68
+ // ✅ 集群限流:每个节点独立限流
69
+ @RateLimiter(time = 60, count = 20, limitType = LimitType.CLUSTER)
70
+ @GetMapping("/data")
71
+ public R<DataVo> getData() { }
72
+
73
+ // ✅ 动态key:基于用户ID限流
74
+ @RateLimiter(key = "#userId", time = 60, count = 5)
75
+ @PostMapping("/submit")
76
+ public R<Void> submit(Long userId) { }
77
+
78
+ // ✅ 自定义错误消息
79
+ @RateLimiter(time = 60, count = 10, message = "访问过于频繁,请稍后再试")
80
+ @GetMapping("/sensitive")
81
+ public R<DataVo> getSensitiveData() { }
82
+ }
83
+ ```
84
+
85
+ ### 注解参数
86
+
87
+ | 参数 | 类型 | 默认值 | 说明 |
88
+ |------|------|--------|------|
89
+ | `key` | String | "" | 限流key,支持SpEL表达式 |
90
+ | `time` | int | 60 | 时间窗口(秒) |
91
+ | `count` | int | 100 | 最大请求次数 |
92
+ | `limitType` | LimitType | DEFAULT | 限流类型 |
93
+ | `message` | String | 国际化key | 错误提示消息 |
94
+ | `timeout` | int | 86400 | Redis超时(秒) |
95
+
96
+ ### 推荐配置
97
+
98
+ | 场景 | time | count | limitType | 说明 |
99
+ |------|------|-------|-----------|------|
100
+ | 登录接口 | 60 | 5-10 | IP | 防止暴力破解 |
101
+ | 验证码 | 60 | 3 | IP | 防止验证码滥用 |
102
+ | 查询接口 | 60 | 100-1000 | DEFAULT | 一般查询 |
103
+ | 写入接口 | 60 | 10-50 | DEFAULT | 新增/修改/删除 |
104
+ | 敏感操作 | 60 | 1-5 | IP | 支付、提现等 |
105
+
106
+ ---
107
+
108
+ ## 2. @RepeatSubmit - 防重复提交
109
+
110
+ ### 作用
111
+ 基于 Redis 分布式锁防止短时间内重复提交表单或请求,保证接口幂等性。
112
+
113
+ ### 使用示例
114
+
115
+ ```java
116
+ import org.dromara.common.idempotent.annotation.RepeatSubmit;
117
+ import java.util.concurrent.TimeUnit;
118
+
119
+ @RestController
120
+ @RequestMapping("/order")
121
+ public class OrderController {
122
+
123
+ // ✅ 默认:5秒内不能重复提交
124
+ @RepeatSubmit()
125
+ @PostMapping()
126
+ public R<Long> addOrder(@RequestBody OrderBo bo) {
127
+ return R.ok(orderService.add(bo));
128
+ }
129
+
130
+ // ✅ 自定义间隔:10秒
131
+ @RepeatSubmit(interval = 10000)
132
+ @PostMapping("/pay")
133
+ public R<Void> pay(@RequestBody PayBo bo) { }
134
+
135
+ // ✅ 使用秒作为单位
136
+ @RepeatSubmit(interval = 10, timeUnit = TimeUnit.SECONDS)
137
+ @PostMapping("/submit")
138
+ public R<Void> submit(@RequestBody SubmitBo bo) { }
139
+
140
+ // ✅ 自定义提示消息
141
+ @RepeatSubmit(interval = 5000, message = "请勿重复提交订单")
142
+ @PostMapping("/create")
143
+ public R<Long> createOrder(@RequestBody OrderBo bo) { }
144
+ }
145
+ ```
146
+
147
+ ### 注解参数
148
+
149
+ | 参数 | 类型 | 默认值 | 说明 |
150
+ |------|------|--------|------|
151
+ | `interval` | int | 5000 | 间隔时间(毫秒) |
152
+ | `timeUnit` | TimeUnit | MILLISECONDS | 时间单位 |
153
+ | `message` | String | 国际化key | 错误提示消息 |
154
+
155
+ ### 工作原理
156
+
157
+ 1. **提交前** - 生成请求唯一键:`MD5(token + ":" + 序列化参数)`
158
+ 2. **Redis检查** - 尝试在 Redis 中设置该键,有效期为 `interval`
159
+ 3. **重复检测** - 如果已存在该键,说明重复提交,直接返回错误
160
+ 4. **成功处理** - 如果返回 `R.SUCCESS`,保持 Redis 数据不删除(防止短时间重复)
161
+ 5. **异常处理** - 如果异常,删除 Redis 数据允许重新提交
162
+
163
+ ### 常见场景
164
+
165
+ | 场景 | 推荐间隔 |
166
+ |------|---------|
167
+ | 普通表单 | 3-5秒 |
168
+ | 订单创建 | 10秒 |
169
+ | 支付操作 | 30秒 |
170
+ | 文件上传 | 10秒 |
171
+
172
+ ---
173
+
174
+ ## 3. @Sensitive - 数据脱敏
175
+
176
+ ### 作用
177
+ 在 JSON 序列化时自动对敏感字段进行脱敏处理,支持基于角色/权限的访问控制。
178
+
179
+ ### 脱敏策略
180
+
181
+ | 策略 | 说明 | 效果示例 |
182
+ |------|------|---------|
183
+ | `ID_CARD` | 身份证 | 110397198608215431 → 110***5431 |
184
+ | `PHONE` | 手机号 | 17640125371 → 176****5371 |
185
+ | `EMAIL` | 邮箱 | test@example.com → t**@example.com |
186
+ | `BANK_CARD` | 银行卡 | 6222456952351452853 → 6222***2853 |
187
+ | `CHINESE_NAME` | 中文名 | 张三 → 张* |
188
+ | `ADDRESS` | 地址 | 北京市朝阳区某街道 → 北京市朝阳区**** |
189
+ | `FIXED_PHONE` | 固定电话 | 010-12345678 → 010****5678 |
190
+ | `PASSWORD` | 密码 | ****** |
191
+ | `IPV4` | IPv4地址 | 192.168.1.1 → 192.*.*.* |
192
+ | `IPV6` | IPv6地址 | 2001:0db8:... → 2001:*:*:*:*:*:*:* |
193
+ | `USER_ID` | 用户ID | 0 |
194
+ | `CAR_LICENSE` | 车牌号 | 京A12345 → 京A1***5 |
195
+ | `FIRST_MASK` | 只显示第一个字符 | abcdef → a***** |
196
+ | `STRING_MASK` | 通用字符串脱敏 | abcdefghij → abcd****ghij |
197
+ | `MASK_HIGH_SECURITY` | 高安全级别脱敏 | token → to******en |
198
+ | `CLEAR` | 清空为空字符串 | abc → "" |
199
+ | `CLEAR_TO_NULL` | 清空为null | abc → null |
200
+
201
+ ### 使用示例
202
+
203
+ ```java
204
+ import org.dromara.common.sensitive.annotation.Sensitive;
205
+ import org.dromara.common.sensitive.core.SensitiveStrategy;
206
+
207
+ public class UserVo {
208
+
209
+ private Long id;
210
+ private String name;
211
+
212
+ // ✅ 手机号脱敏(所有人看脱敏数据)
213
+ @Sensitive(strategy = SensitiveStrategy.PHONE)
214
+ private String phone;
215
+
216
+ // ✅ 身份证脱敏,admin角色可查看原数据
217
+ @Sensitive(strategy = SensitiveStrategy.ID_CARD, roleKey = {"admin"})
218
+ private String idCard;
219
+
220
+ // ✅ 邮箱脱敏,需要用户详情权限才能看原数据
221
+ @Sensitive(strategy = SensitiveStrategy.EMAIL, perms = {"system:user:detail"})
222
+ private String email;
223
+
224
+ // ✅ 银行卡脱敏,admin角色或有权限都可查看
225
+ @Sensitive(strategy = SensitiveStrategy.BANK_CARD,
226
+ roleKey = {"admin"},
227
+ perms = {"finance:account:query"})
228
+ private String bankCard;
229
+ }
230
+ ```
231
+
232
+ ### 注解参数
233
+
234
+ | 参数 | 类型 | 默认值 | 说明 |
235
+ |------|------|--------|------|
236
+ | `strategy` | SensitiveStrategy | 必填 | 脱敏策略 |
237
+ | `roleKey` | String[] | {} | 可查看原数据的角色 |
238
+ | `perms` | String[] | {} | 可查看原数据的权限 |
239
+
240
+ **权限控制逻辑**:
241
+ - `roleKey` 和 `perms` 都为空:所有人都看脱敏数据
242
+ - 满足任一 `roleKey` **或** 任一 `perms`:可查看原数据
243
+ - 两者是 **OR** 关系,不是 AND
244
+
245
+ ---
246
+
247
+ ## 4. @EncryptField - 字段加密
248
+
249
+ ### 作用
250
+ 在数据库级别对敏感字段进行加密存储,读取时自动解密。支持多种加密算法。
251
+
252
+ ### 支持的算法
253
+
254
+ | 算法 | 说明 | 性能 | 安全性 | 适用场景 |
255
+ |------|------|------|--------|---------|
256
+ | `BASE64` | BASE64编码 | 高 | 低 | 简单数据保护 |
257
+ | `AES` | AES对称加密 | 中 | 中 | 生产环境推荐 |
258
+ | `RSA` | RSA非对称加密 | 低 | 高 | 高安全需求 |
259
+ | `SM2` | SM2非对称加密 | 低 | 高 | 国密要求 |
260
+ | `SM4` | SM4对称加密 | 中 | 高 | 国密要求 |
261
+
262
+ ### 使用示例
263
+
264
+ ```java
265
+ import org.dromara.common.encrypt.annotation.EncryptField;
266
+ import org.dromara.common.encrypt.enums.AlgorithmType;
267
+
268
+ @Data
269
+ @TableName("test_demo")
270
+ public class TestDemo extends BaseEntity {
271
+
272
+ private Long id;
273
+
274
+ // ✅ AES加密(使用yml配置的秘钥)
275
+ @EncryptField(algorithm = AlgorithmType.AES)
276
+ private String aesField;
277
+
278
+ // ✅ RSA加密(指定公私钥)
279
+ @EncryptField(algorithm = AlgorithmType.RSA,
280
+ privateKey = "MIICdQIBADANB...",
281
+ publicKey = "MFkwEwYHKoZI...")
282
+ private String rsaField;
283
+
284
+ // ✅ 使用默认配置
285
+ @EncryptField
286
+ private String defaultField;
287
+
288
+ // ❌ 不加密字段 - 无需添加注解
289
+ private String normalField;
290
+ }
291
+ ```
292
+
293
+ ### 配置文件(application.yml)
294
+
295
+ ```yaml
296
+ mybatis-encryptor:
297
+ # 是否开启加密
298
+ enable: false
299
+ # 默认加密算法:BASE64 | AES | RSA | SM2 | SM4
300
+ algorithm: BASE64
301
+ # 编码方式:BASE64 | HEX
302
+ encode: BASE64
303
+ # AES/SM4 对称算法秘钥(16字符)
304
+ password: your-secret-key-16-chars
305
+ # RSA/SM2 公私钥
306
+ publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJnNwrj4hi/...
307
+ privateKey: MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6...
308
+ ```
309
+
310
+ ### 注解参数
311
+
312
+ | 参数 | 类型 | 默认值 | 说明 |
313
+ |------|------|--------|------|
314
+ | `algorithm` | AlgorithmType | DEFAULT | 加密算法 |
315
+ | `password` | String | "" | 对称算法秘钥 |
316
+ | `publicKey` | String | "" | 非对称算法公钥 |
317
+ | `privateKey` | String | "" | 非对称算法私钥 |
318
+ | `encode` | EncodeType | DEFAULT | 编码方式 |
319
+
320
+ ---
321
+
322
+ ## 5. @ApiEncrypt - 接口加密
323
+
324
+ ### 作用
325
+ 对接口的请求和响应进行加密处理,确保数据在网络传输中的安全性。
326
+
327
+ ### 使用示例
328
+
329
+ ```java
330
+ import org.dromara.common.encrypt.annotation.ApiEncrypt;
331
+
332
+ @RestController
333
+ @RequestMapping("/api/user")
334
+ public class UserController {
335
+
336
+ // ✅ 加密响应数据
337
+ @ApiEncrypt(response = true)
338
+ @GetMapping("/{id}")
339
+ public R<UserVo> getUser(@PathVariable Long id) {
340
+ // 返回的数据会被自动加密
341
+ return R.ok(userService.getById(id));
342
+ }
343
+
344
+ // ✅ 不加密响应(默认)
345
+ @GetMapping("/public")
346
+ public R<List<PublicVo>> getPublicData() { }
347
+ }
348
+ ```
349
+
350
+ ### 配置文件(application.yml)
351
+
352
+ ```yaml
353
+ api-decrypt:
354
+ # 是否开启接口加密
355
+ enabled: true
356
+ # 加密头标识
357
+ headerFlag: encrypt-key
358
+ # 响应加密公钥(客户端使用私钥解密)
359
+ publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJnNwrj4hi/y3CCJu868ghCG5dUj8...
360
+ # 请求解密私钥(服务端使用私钥解密客户端加密的数据)
361
+ privateKey: MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYouqNxaY7...
362
+ ```
363
+
364
+ ### 注解参数
365
+
366
+ | 参数 | 类型 | 默认值 | 说明 |
367
+ |------|------|--------|------|
368
+ | `response` | boolean | false | 是否加密响应 |
369
+
370
+ ---
371
+
372
+ ## 6. @DataPermission - 数据权限
373
+
374
+ ### 作用
375
+ 在 SQL 查询时自动拼接数据权限过滤条件,实现部门级或用户级数据隔离(行级权限)。
376
+
377
+ ### 使用示例
378
+
379
+ ```java
380
+ import org.dromara.common.mybatis.annotation.DataPermission;
381
+ import org.dromara.common.mybatis.annotation.DataColumn;
382
+
383
+ public interface OrderMapper extends BaseMapperPlus<Order, OrderVo> {
384
+
385
+ // ✅ 类级别配置:按部门和创建人隔离数据
386
+ @DataPermission({
387
+ @DataColumn(key = "deptName", value = "dept_id"),
388
+ @DataColumn(key = "userName", value = "create_by")
389
+ })
390
+ default Page<OrderVo> selectPageOrderList(Page<Order> page, Wrapper<Order> queryWrapper) {
391
+ return this.selectVoPage(page, queryWrapper);
392
+ }
393
+
394
+ // ✅ 方法级别配置:覆盖类级别设置
395
+ @DataPermission({
396
+ @DataColumn(key = "deptName", value = "create_dept")
397
+ })
398
+ List<OrderVo> selectByDept(Long deptId);
399
+
400
+ // ✅ 指定权限标识:拥有此权限的角色不拼接过滤条件
401
+ @DataPermission({
402
+ @DataColumn(key = "deptName", value = "dept_id", permission = "order:all")
403
+ })
404
+ List<OrderVo> selectAllOrders();
405
+
406
+ // ✅ 使用表别名
407
+ @DataPermission({
408
+ @DataColumn(key = "deptName", value = "d.dept_id"),
409
+ @DataColumn(key = "userName", value = "u.create_by")
410
+ })
411
+ List<OrderVo> selectWithJoin(@Param(Constants.WRAPPER) Wrapper<Order> queryWrapper);
412
+ }
413
+ ```
414
+
415
+ ### 注解参数
416
+
417
+ **@DataPermission**
418
+
419
+ | 参数 | 类型 | 说明 |
420
+ |------|------|------|
421
+ | `value` | DataColumn[] | **必填**,数据权限配置数组 |
422
+ | `joinStr` | String | SQL连接符(OR/AND),默认为空 |
423
+
424
+ **@DataColumn**
425
+
426
+ | 参数 | 类型 | 默认值 | 说明 |
427
+ |------|------|--------|------|
428
+ | `key` | String[] | "deptName" | 占位符关键字 |
429
+ | `value` | String[] | "dept_id" | 替换的字段名 |
430
+ | `permission` | String | "" | 权限标识(拥有此权限不过滤) |
431
+
432
+ ### 数据权限范围
433
+
434
+ 系统支持的权限范围:
435
+ 1. **全部数据** - 无过滤条件
436
+ 2. **本部门数据** - 仅查看本部门数据
437
+ 3. **本部门及以下** - 本部门 + 所有子部门数据
438
+ 4. **仅本人数据** - 只看自己创建的数据
439
+ 5. **自定义权限** - 根据指定权限控制
440
+
441
+ ---
442
+
443
+ ## 最佳实践
444
+
445
+ ### 1. 限流 + 防重复提交组合
446
+
447
+ ```java
448
+ @RestController
449
+ @RequestMapping("/order")
450
+ public class OrderController {
451
+
452
+ // ✅ 同时使用限流 + 防重复提交 + 日志
453
+ @RateLimiter(time = 60, count = 10, limitType = LimitType.IP)
454
+ @RepeatSubmit(interval = 10, timeUnit = TimeUnit.SECONDS)
455
+ @Log(title = "订单", businessType = BusinessType.INSERT)
456
+ @PostMapping()
457
+ public R<Long> addOrder(@Validated @RequestBody OrderBo bo) {
458
+ return R.ok(orderService.add(bo));
459
+ }
460
+ }
461
+ ```
462
+
463
+ ### 2. VO层脱敏示例
464
+
465
+ ```java
466
+ public class UserDetailVo {
467
+
468
+ private Long id;
469
+
470
+ // 脱敏:手机号
471
+ @Sensitive(strategy = SensitiveStrategy.PHONE)
472
+ private String phone;
473
+
474
+ // 脱敏:身份证(admin角色可查看)
475
+ @Sensitive(strategy = SensitiveStrategy.ID_CARD, roleKey = {"admin"})
476
+ private String idCard;
477
+
478
+ // 脱敏:邮箱(需要权限才能查看原数据)
479
+ @Sensitive(strategy = SensitiveStrategy.EMAIL, perms = {"system:user:detail"})
480
+ private String email;
481
+
482
+ // 脱敏:银行卡
483
+ @Sensitive(strategy = SensitiveStrategy.BANK_CARD)
484
+ private String bankCard;
485
+ }
486
+ ```
487
+
488
+ ### 3. Entity层字段加密
489
+
490
+ ```java
491
+ @Data
492
+ @TableName("sys_user")
493
+ public class SysUser extends TenantEntity {
494
+
495
+ private Long id;
496
+ private String username;
497
+
498
+ // ✅ 加密存储手机号
499
+ @EncryptField(algorithm = AlgorithmType.AES)
500
+ private String phone;
501
+
502
+ // ✅ 加密存储身份证
503
+ @EncryptField(algorithm = AlgorithmType.AES)
504
+ private String idCard;
505
+ }
506
+ ```
507
+
508
+ ---
509
+
510
+ ## 常见错误
511
+
512
+ ### ❌ 不要做
513
+
514
+ ```java
515
+ // 错误1:RateLimiter 用在 Service 方法上(无效)
516
+ @Service
517
+ public class XxxService {
518
+ @RateLimiter(...) // ❌ 无效!只能用在 Controller
519
+ public void doSomething() { }
520
+ }
521
+
522
+ // 错误2:@DataPermission 未配置 @DataColumn
523
+ @DataPermission // ❌ 空注解无效!必须至少有一个 @DataColumn
524
+ public interface UserMapper { }
525
+
526
+ // 错误3:@Sensitive 和 @EncryptField 混淆
527
+ // @Sensitive 是序列化脱敏(VO层)
528
+ // @EncryptField 是数据库加密(Entity层)
529
+ // 不应该在 Entity 中使用 @Sensitive
530
+ ```
531
+
532
+ ### ✅ 正确做法
533
+
534
+ ```java
535
+ // 正确1:限流只能用在 Controller
536
+ @RestController
537
+ public class XxxController {
538
+ @RateLimiter(...) // ✅
539
+ @GetMapping("/test")
540
+ public R<Void> test() { }
541
+ }
542
+
543
+ // 正确2:@DataPermission 用在 Mapper 接口或方法上(支持类/方法两级)
544
+ @DataPermission({ // ✅ 类级别:所有方法默认使用此配置
545
+ @DataColumn(key = "deptName", value = "dept_id")
546
+ })
547
+ public interface UserMapper {
548
+ @DataPermission({ // ✅ 方法级别:覆盖类级别配置
549
+ @DataColumn(key = "deptName", value = "dept_id"),
550
+ @DataColumn(key = "userName", value = "create_by")
551
+ })
552
+ List<UserVo> selectList();
553
+ }
554
+
555
+ // 正确3:分层使用注解
556
+ @Entity
557
+ public class SysUser {
558
+ @EncryptField(algorithm = AlgorithmType.AES) // 存储时加密
559
+ private String phone;
560
+ }
561
+
562
+ @VO
563
+ public class UserVo {
564
+ @Sensitive(strategy = SensitiveStrategy.PHONE) // 序列化时脱敏
565
+ private String phone;
566
+ }
567
+ ```
568
+
569
+ ---
570
+
571
+ ## 使用检查清单
572
+
573
+ 使用后端注解前必须检查:
574
+
575
+ - [ ] **使用 @RateLimiter 吗**?是否选择了正确的 `limitType`?
576
+ - [ ] **使用 @RepeatSubmit 吗**?新增/修改/支付 必须添加!
577
+ - [ ] **使用 @Sensitive 吗**?VO 中的敏感字段应该脱敏
578
+ - [ ] **使用 @EncryptField 吗**?Entity 中的敏感字段应该加密
579
+ - [ ] **使用 @DataPermission 吗**?Mapper 需要数据隔离时必须添加!
580
+ - [ ] **所有配置都在 yml 中**?Redis 密钥、加密算法等
581
+ - [ ] **是否正确处理了异常**?脱敏/加密异常不应该导致请求失败
582
+ - [ ] **是否测试了权限控制**?不同角色应该看到不同数据
583
+ - [ ] **依赖是否齐全**?Redis、MyBatis-Plus 等必需库
584
+ - [ ] **导入路径是否正确**?使用 `org.dromara.*` 包名
585
+
586
+ ---
587
+
588
+ ## 快速参考
589
+
590
+ ### 注解速查表
591
+
592
+ ```
593
+ @RateLimiter → 接口限流(Controller 方法)
594
+ @RepeatSubmit → 防重复提交(POST/PUT 方法)
595
+ @Sensitive → 数据脱敏(VO 字段)
596
+ @EncryptField → 字段加密(Entity 字段)
597
+ @ApiEncrypt → 接口加密(Controller 方法)
598
+ @DataPermission → 数据权限(Mapper 接口)
599
+ ```
600
+
601
+ ### 组合使用速查
602
+
603
+ ```
604
+ 接口防护: @RateLimiter + @RepeatSubmit
605
+ 数据保护: @EncryptField + @Sensitive + @ApiEncrypt
606
+ 数据隔离: @DataPermission(Mapper)
607
+ ```
608
+
609
+ ### 配置位置速查
610
+
611
+ ```
612
+ application.yml:
613
+ - mybatis-encryptor.* → @EncryptField 全局配置
614
+ - api-decrypt.* → @ApiEncrypt 全局配置
615
+ - spring.data.redis.* → @RateLimiter/@RepeatSubmit 依赖(Redisson 客户端)
616
+ ```
617
+
618
+ ---
619
+
620
+ ## 参考实现
621
+
622
+ 查看框架中的完整实现:
623
+
624
+ - **限流示例**: `org.dromara.demo.controller.RedisRateLimiterController`(@RateLimiter 详细用法)
625
+ - **脱敏示例**: `org.dromara.demo.controller.TestSensitiveController`(@Sensitive 各策略)
626
+ - **防重示例**: 任何 POST/PUT 方法都有 @RepeatSubmit
627
+ - **加密示例**: `org.dromara.demo.domain.TestDemo`(@EncryptField 使用)
628
+ - **数据权限**: `org.dromara.system.mapper.SysUserMapper`(@DataPermission 使用)
629
+ - **对象映射**: 系统 BO/VO 类中的 `@AutoMapper` 注解(见 crud-development 技能)
630
+
631
+ **特别注意**:上述参考代码是本项目的标准实现,严格遵循三层架构和后端规范。
632
+
633
+ ---
634
+
635
+ ## 关键配置
636
+
637
+ ```yaml
638
+ # Redis 配置(必须,限流和防重复依赖)
639
+ # ⚠️ Spring Boot 3 使用 spring.data.redis(非 spring.redis)
640
+ # 本项目使用 Redisson 客户端(非 Jedis/Lettuce),连接池由 Redisson 管理
641
+ spring:
642
+ data:
643
+ redis:
644
+ host: localhost
645
+ port: 6379
646
+ password:
647
+ timeout: 10s
648
+
649
+ # 字段加密配置
650
+ mybatis-encryptor:
651
+ enable: false
652
+ algorithm: BASE64
653
+ encode: BASE64
654
+ password: your-secret-key
655
+ publicKey: your-public-key
656
+ privateKey: your-private-key
657
+
658
+ # 接口加密配置
659
+ api-decrypt:
660
+ enabled: true
661
+ headerFlag: encrypt-key
662
+ publicKey: your-public-key
663
+ privateKey: your-private-key
664
+ ```
665
+
666
+ ---
667
+
668
+ ## 相关技能
669
+
670
+ | 需要了解 | 激活 Skill |
671
+ |---------|-----------|
672
+ | Controller 层规范 | `java-controller` |
673
+ | 安全规范 | `security-guard` |
674
+ | 数据权限 | `data-permission` |
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-12-22
9
+
10
+ ### Added
11
+
12
+ - Initial release of Banana Image skill
13
+ - **Dual model support**: Flash (fast) and Pro (4K high-quality)
14
+ - **Image generation** with customizable parameters:
15
+ - Aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:4, 4:5, 5:4, 2:3, 3:2, 21:9
16
+ - Resolutions: 1K, 2K, 4K (Pro model only for 4K)
17
+ - Negative prompts for content exclusion
18
+ - Batch generation (1-4 images)
19
+ - **Image editing mode** - modify existing images with text prompts
20
+ - **Proxy support** via undici for corporate network environments
21
+ - **Google Search grounding** for Pro model
22
+ - **Template system** with predefined configurations:
23
+ - Product photography
24
+ - Social media posts
25
+ - Posters
26
+ - Thumbnails
27
+ - CLI interface with comprehensive options
28
+ - JSON output format for easy integration
29
+ - Claude Code skill integration
30
+
31
+ ### Technical Details
32
+
33
+ - Models:
34
+ - Flash: `gemini-2.5-flash-image`
35
+ - Pro: `gemini-3-pro-image-preview`
36
+ - Default output: `./images` directory
37
+ - Supported input formats: PNG, JPG, JPEG, GIF, WebP