mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
Compare commits
342 Commits
v3.8.0last
...
v3.8.2last
| Author | SHA1 | Date | |
|---|---|---|---|
| 434b42e9ed | |||
| f1ceb08e16 | |||
| d2eedacc85 | |||
| 8791384791 | |||
| fd60e49f5b | |||
| 5f1dc06067 | |||
| b67770ff14 | |||
| 1dae808cf1 | |||
| 70d8353219 | |||
| 208d9990ae | |||
| 3e208de18e | |||
| 4f3c71af5b | |||
| 70bd639206 | |||
| d245ef3037 | |||
| 7af8346b79 | |||
| 1b8a31f0d3 | |||
| 294ad5a6c9 | |||
| 065b255d90 | |||
| 56976e68b4 | |||
| db1ff0268b | |||
| b7519d7199 | |||
| 81ba07c853 | |||
| 92ed296e63 | |||
| c2aff84914 | |||
| e002cd3bf3 | |||
| 1de07ff3ff | |||
| 35852d41f1 | |||
| a2cb1d9f25 | |||
| 2002af54d0 | |||
| 89747403a2 | |||
| 3db0995c3f | |||
| 950621dd88 | |||
| 033cf51d69 | |||
| fb9f367517 | |||
| b2da45d803 | |||
| 2840f0d325 | |||
| 6ace7eae8a | |||
| 3d88147c59 | |||
| 08f245bdf9 | |||
| 8cc033b86f | |||
| 6b7542620b | |||
| ba0052d452 | |||
| 69fca254f0 | |||
| b3de596199 | |||
| f46273d15e | |||
| 0fe258dbc2 | |||
| de7f23c555 | |||
| 67d9865861 | |||
| d97e56b2f0 | |||
| c868496b78 | |||
| c5150baa69 | |||
| 3d9f59c69b | |||
| 420d6db3fb | |||
| 473a626039 | |||
| 0308b0597c | |||
| cd809a6573 | |||
| 2191f5d48c | |||
| 1158b0b6e7 | |||
| ead2cef1f4 | |||
| 83bb0a0a6a | |||
| b474e9e5a5 | |||
| 422373e300 | |||
| 1cf11a4c2a | |||
| ac446691c4 | |||
| 925f163784 | |||
| 0feb307e8d | |||
| 781d61e96e | |||
| d01c1d7d47 | |||
| 3576b54945 | |||
| a760f94b94 | |||
| e795e03365 | |||
| 342bdd2e38 | |||
| 59ece16059 | |||
| 91208a4968 | |||
| 419e2bea0b | |||
| 443abc3ede | |||
| 358e46559f | |||
| 128c2c97f6 | |||
| 424dc33bba | |||
| 1cb48b4f0c | |||
| ea59454f51 | |||
| 615a1bc4ff | |||
| d976f12c8f | |||
| 3783765161 | |||
| 8cc6810fdd | |||
| a902d9af19 | |||
| 37a116f2fb | |||
| 1564831f7e | |||
| 18c1cd00c1 | |||
| a988b05e72 | |||
| a9a6fd529d | |||
| 6586d3a880 | |||
| af354f9f5e | |||
| 79b182819b | |||
| a638a93b65 | |||
| 621781d336 | |||
| f1cad333da | |||
| e70844ce61 | |||
| e00ffa2670 | |||
| 676fffa2c8 | |||
| 23cc569a47 | |||
| dafacf153b | |||
| 7a9f357510 | |||
| 6c15b45a8c | |||
| f30a8c658a | |||
| e84d7726d2 | |||
| 0f39802698 | |||
| a014a3ed0e | |||
| 5720d1a01e | |||
| 5eed6ac6d2 | |||
| 0cfa1e223a | |||
| 219869f4c0 | |||
| e6edde963a | |||
| c44b66128e | |||
| 9356b04741 | |||
| d0a094f9a3 | |||
| 73eb625737 | |||
| 74880705b8 | |||
| f67cfa1bfb | |||
| 8d91caa4e6 | |||
| 0d9f9a04cc | |||
| 90565fcf79 | |||
| 118775cf79 | |||
| 7b80ae3e68 | |||
| cf4d888839 | |||
| 336e7851aa | |||
| 56b9131675 | |||
| 3c0cc49f0c | |||
| 69b2e97935 | |||
| 1c2a49d371 | |||
| 967197d224 | |||
| 396718bc5e | |||
| 37c62c3962 | |||
| f510578cb7 | |||
| 96b378bb7a | |||
| 2d7c51eadc | |||
| 9d440a4261 | |||
| 4870c43f39 | |||
| 9c21f621c0 | |||
| 8d382b76ad | |||
| 410f2539e1 | |||
| baee00921f | |||
| 216d4b9a1f | |||
| e00b25af42 | |||
| 44d6b37873 | |||
| 271712b050 | |||
| 3482b3a0db | |||
| 10bf5cf127 | |||
| 6cc74699aa | |||
| 0e8fdc2c5a | |||
| bd6051d972 | |||
| 9cfb9dd2b7 | |||
| 87b41ab36f | |||
| 378f42bcb7 | |||
| 6838888f5f | |||
| bb8281107e | |||
| e9d44bfc80 | |||
| 8057172f8c | |||
| c6dd83a262 | |||
| 7469474124 | |||
| dc9f36905d | |||
| 30486c5358 | |||
| 5b7a90c8bc | |||
| ac40596ad6 | |||
| 6e0edc093b | |||
| 2831996dd4 | |||
| 130793fffe | |||
| 5cabfe1655 | |||
| e99e29a523 | |||
| d64e8b0adb | |||
| 4108ba54c3 | |||
| e8ad887096 | |||
| 6c24b3cf30 | |||
| 208861f808 | |||
| f7fe1dfc58 | |||
| e2805050cf | |||
| b34bb84fc9 | |||
| 11beca16da | |||
| b0c9a2fd9e | |||
| 6b4e8695ae | |||
| e8ca74f2ab | |||
| eabf98533a | |||
| 7848881dcb | |||
| 553bee57f1 | |||
| b751570789 | |||
| e45d29c4ff | |||
| 8c8a448a71 | |||
| 0148f45979 | |||
| 3d414aaec8 | |||
| 7a4c66af57 | |||
| 444c7140f6 | |||
| 0fda30b5d2 | |||
| 5972c74b43 | |||
| d69cb121fc | |||
| 10a9edd10b | |||
| c71ff3fbcc | |||
| 08612d5bfa | |||
| 2ecce8f02d | |||
| 62937f14fb | |||
| d6ccc4a326 | |||
| 1893108136 | |||
| 7980915bdc | |||
| 550997268b | |||
| 9e7d40a080 | |||
| 2c38db456b | |||
| e52538d304 | |||
| e91cbd5cd8 | |||
| 70cec8b5c6 | |||
| d2365088ce | |||
| a679571a5a | |||
| b9c74e549f | |||
| 81c1724016 | |||
| 56d59eb589 | |||
| a00fcae3a3 | |||
| 286d10a50f | |||
| 68f36cb1e5 | |||
| 78454d3434 | |||
| 56fbc2ed8f | |||
| 197d7adaaf | |||
| e952518d71 | |||
| 1e259c805e | |||
| 8a82141c95 | |||
| 888a032266 | |||
| 309c76d268 | |||
| f78eabfc66 | |||
| 748331d649 | |||
| b70e709e53 | |||
| 2ba17648c4 | |||
| 36caab37e2 | |||
| 6e721e4120 | |||
| a17b403675 | |||
| 632fd72d79 | |||
| 15fc262675 | |||
| 6768d65e1e | |||
| 410ab7bcc3 | |||
| 174f1ae432 | |||
| eef2f7e269 | |||
| 6a0ec66d3d | |||
| 163b0b531f | |||
| d1af49a33f | |||
| 03265691e6 | |||
| de9cc2f30d | |||
| 26887959cd | |||
| 7e15e81218 | |||
| 8b0e0367c7 | |||
| 334f7dbb62 | |||
| e9ddd21286 | |||
| 458526075e | |||
| a1b55f0d40 | |||
| 2f0a3bcd87 | |||
| 30d3a9f17b | |||
| 03739f2837 | |||
| d9e8bd2bc8 | |||
| 81eef5a838 | |||
| f528f72903 | |||
| 918286c144 | |||
| 512234a804 | |||
| cacc59b8fd | |||
| c744633139 | |||
| 0e4d304878 | |||
| 17a8964487 | |||
| 8ac6989d2c | |||
| 402ab0ffc4 | |||
| 7778ede90e | |||
| 06144206df | |||
| 3d3b5850ad | |||
| 816eeb9225 | |||
| 0b42efbbbf | |||
| b8e0d4391d | |||
| 72b34d082b | |||
| 7112649a21 | |||
| fbc312c35d | |||
| b8162a4a6d | |||
| 28404d2fd3 | |||
| c92c9be49a | |||
| 58e85e0569 | |||
| 6fc34d8a39 | |||
| 790df934b5 | |||
| 8aee4011a2 | |||
| 6e0277c60a | |||
| e923654161 | |||
| 06b41ae479 | |||
| 11af85d87a | |||
| 4caff75cce | |||
| 811861a957 | |||
| 24623ba4b0 | |||
| 7c68b46943 | |||
| 7c34161369 | |||
| bc52aa918d | |||
| 9dfdd47b36 | |||
| 272a7540eb | |||
| ad796f079f | |||
| e7e7716d05 | |||
| c5d620d2b2 | |||
| cdea05ebb0 | |||
| ca9a433f3c | |||
| 2be6052cd4 | |||
| 68ed67ee49 | |||
| d5903ba52a | |||
| 3ee635eddf | |||
| 21bc68fb53 | |||
| f532e57862 | |||
| da08adbea1 | |||
| 46e3e62b59 | |||
| 3656264f8a | |||
| 3361d48cd4 | |||
| ed86ea3da1 | |||
| 3deb0e5487 | |||
| 9e4792941e | |||
| b5fd5fe782 | |||
| 33c0104a02 | |||
| 81ed5100af | |||
| 87f9dc0064 | |||
| b311fedc6b | |||
| e321a0405f | |||
| d8bc74794d | |||
| 732f05dc74 | |||
| 6ce92798c6 | |||
| f4454e9348 | |||
| d9134ae0c8 | |||
| 25180e41c8 | |||
| a99e3f2268 | |||
| d27c354bf1 | |||
| d818b1dd9d | |||
| bcdbec0091 | |||
| 098bb12b9e | |||
| 4a6c750b19 | |||
| d396e5304a | |||
| 9bed25be8c | |||
| 7109b42092 | |||
| 1667b14194 | |||
| e9514873d2 | |||
| 0ee090664e | |||
| 4a9eda4ab0 | |||
| 2416c8b251 | |||
| 5b056f9dd6 | |||
| a93998dc56 | |||
| 268c27a782 | |||
| 23ace2712a | |||
| 157feeb925 | |||
| 4e25d4162f | |||
| 47a68f31e1 |
21
README-AI.md
21
README-AI.md
@ -16,6 +16,19 @@ JeecgBoot平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
[](https://www.bilibili.com/video/BV1zmd7YFE4w)
|
[](https://www.bilibili.com/video/BV1zmd7YFE4w)
|
||||||
|
|
||||||
|
|
||||||
|
##### 功能大模块
|
||||||
|
|
||||||
|
- AI应用开发平台
|
||||||
|
- AI知识库系统
|
||||||
|
- AI大模型管理
|
||||||
|
- AI流程编排
|
||||||
|
- AI对话支持图片
|
||||||
|
- AI对话助手(智能问答)
|
||||||
|
- AI建表(Online表单)
|
||||||
|
- AI写文章(CMS)
|
||||||
|
- AI表单字段建议(表单设计器)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Dify `VS` JEECG AI
|
#### Dify `VS` JEECG AI
|
||||||
|
|
||||||
@ -44,10 +57,10 @@ JeecgBoot平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 安装向量库 pgvector
|
### 技术文档
|
||||||
|
|
||||||
- https://help.jeecg.com/aigc/config
|
|
||||||
|
|
||||||
|
- [AIGC开发文档](https://help.jeecg.com/aigc)
|
||||||
|
- [安装向量库 pgvector](https://help.jeecg.com/aigc/config)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -73,7 +86,7 @@ JeecgBoot平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
## 技术交流
|
## 技术交流
|
||||||
|
|
||||||
- 开发文档:https://help.jeecg.com/aigc
|
- 开发文档:https://help.jeecg.com/aigc
|
||||||
- QQ群:716488839
|
- QQ群:964611995、716488839(满)
|
||||||
|
|
||||||
|
|
||||||
## 功能列表
|
## 功能列表
|
||||||
|
|||||||
14
README-EN.md
14
README-EN.md
@ -7,12 +7,12 @@
|
|||||||
JEECG BOOT AI Low Code Platform
|
JEECG BOOT AI Low Code Platform
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Current version: 3.8.0 (Release date: 2025-04-18)
|
Current version: 3.8.2 (Release date: 2025-08-04)
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
||||||
[](http://www.jeecg.com)
|
[](http://www.jeecg.com)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
|
|
||||||
@ -69,9 +69,13 @@ Jeecg-Boot AI low code platform can be applied in the development of any J2EE pr
|
|||||||
Starts the project
|
Starts the project
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- [IDEA Quick start](https://help.jeecg.com/java/setup/idea/startup)
|
> Default account password: admin/123456
|
||||||
- [Docker Quick start](https://help.jeecg.com/java/docker/quick)
|
|
||||||
|
|
||||||
|
- [Development Environment setup](https://help.jeecg.com/java/setup/tools)
|
||||||
|
- [IDEA Quick start(single model)](https://help.jeecg.com/java/setup/idea/startup)
|
||||||
|
- [Docker Quick start(single model)](https://help.jeecg.com/java/docker/quick)
|
||||||
|
- [IDEA Quick start(microservices model)](https://help.jeecg.com/java/springcloud/switchcloud/monomer)
|
||||||
|
- [Docker Quick start(microservices model)](https://help.jeecg.com/java/docker/quickcloud)
|
||||||
|
|
||||||
|
|
||||||
Technical documentation
|
Technical documentation
|
||||||
@ -81,7 +85,7 @@ Technical documentation
|
|||||||
- Demo : [OnlineDemo](http://boot3.jeecg.com) | [APP](http://jeecg.com/appIndex)
|
- Demo : [OnlineDemo](http://boot3.jeecg.com) | [APP](http://jeecg.com/appIndex)
|
||||||
- Doc: [DocumentCenter](http://help.jeecg.com) | [AI Config](https://help.jeecg.com/java/ai/aichat)
|
- Doc: [DocumentCenter](http://help.jeecg.com) | [AI Config](https://help.jeecg.com/java/ai/aichat)
|
||||||
- Newbie guide: [Quick start](http://www.jeecg.com/doc/quickstart) | [Q&A ](http://www.jeecg.com/doc/qa) | [1 minute experience](https://my.oschina.net/jeecg/blog/3083313)
|
- Newbie guide: [Quick start](http://www.jeecg.com/doc/quickstart) | [Q&A ](http://www.jeecg.com/doc/qa) | [1 minute experience](https://my.oschina.net/jeecg/blog/3083313)
|
||||||
- QQ group : ⑩716488839、⑨808791225
|
- QQ group : 964611995、⑩716488839(满)、⑨808791225(满)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
124
README-Enterprise.md
Normal file
124
README-Enterprise.md
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
|
||||||
|
JeecgBoot低代码平台(商业版介绍)
|
||||||
|
===============
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
项目介绍
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
<h3 align="center">企业级AI低代码平台</h3>
|
||||||
|
|
||||||
|
|
||||||
|
JeecgBoot是一款集成AI应用的,基于BPM流程的低代码平台,旨在帮助企业快速实现低代码开发和构建个性化AI应用!前后端分离架构Ant Design&Vue3,SpringBoot,SpringCloud Alibaba,Mybatis-plus,Shiro。强大的代码生成器让前后端代码一键生成,无需写任何代码! 引领AI低代码开发模式: AI生成->OnlineCoding-> 代码生成-> 手工MERGE, 帮助Java项目解决80%的重复工作,让开发更多关注业务,提高效率、节省成本,同时又不失灵活性!低代码能力:Online表单、表单设计、流程设计、Online报表、大屏/仪表盘设计、报表设计; AI应用平台功能:AI知识库问答、AI模型管理、AI流程编排、AI聊天等,支持含ChatGPT、DeepSeek、Ollama等多种AI大模型
|
||||||
|
|
||||||
|
JeecgBoot 提供了一系列 `低代码能力`,实现`真正的零代码`在线开发:Online表单开发、Online报表、复杂报表设计、打印设计、在线图表设计、仪表盘设计、大屏设计、移动图表能力、表单设计器、在线设计流程、流程自动化配置、插件能力(可插拔)
|
||||||
|
|
||||||
|
`AI赋能低代码:` 目前提供了AI应用、AI模型管理、AI流程编排、AI对话助手,AI建表、AI写文章、AI知识库问答、AI字段建议等功能;支持各种AI大模型ChatGPT、DeepSeek、Ollama、智普、千问等.
|
||||||
|
|
||||||
|
`JEECG宗旨是:` 简单功能由OnlineCoding配置实现,做到`零代码开发`;复杂功能由代码生成器生成进行手工Merge 实现`低代码开发`,既保证了`智能`又兼顾`灵活`;实现了低代码开发的同时又支持灵活编码,解决了当前低代码产品普遍不灵活的弊端!
|
||||||
|
|
||||||
|
`JEECG业务流程:` 采用工作流来实现、扩展出任务接口,供开发编写业务逻辑,表单提供多种解决方案: 表单设计器、online配置表单、编码表单。同时实现了流程与表单的分离设计(松耦合)、并支持任务节点灵活配置,既保证了公司流程的保密性,又减少了开发人员的工作量。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### JeecgBoot商业版与同类产品区别
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
- 灵活性:jeecgboot基于开源技术栈,设计初考虑到可插拔性和集成灵活性,确保平台的智能性与灵活性,避免因平台过于庞大而导致的扩展困难。
|
||||||
|
- 流程管理:支持一个表单挂接多个流程,同时一个流程可以连接多个表单,增强了流程的灵活性和复杂性管理。
|
||||||
|
- 符合中国国情的流程:针对中国市场的特定需求,jeecgboot能够实现各种符合中国国情的业务流程。
|
||||||
|
- 强大的表单设计器:jeecgboot的表单设计器与敲敲云共享,具备高质量和智能化的特点,能够满足零代码应用的需求,业内同类产品中不多见。
|
||||||
|
- 报表功能:自主研发的报表工具,拥有独立知识产权,功能上比业内老牌产品如帆软更智能,操作简便。
|
||||||
|
- BI产品整合:提供大屏、仪表盘、门户等功能,完美解决这些需求,并支持移动面板的设计与渲染。
|
||||||
|
- 自主研发的模块:jeecgboot的所有模块均为自主研发,具有独立的知识产权。
|
||||||
|
- 颗粒度和功能细致:在功能细致度和颗粒度上,jeecgboot远超同类产品,尤其在零代码能力方面表现突出。
|
||||||
|
- 零代码应用管理:最新版支持与敲敲云的零代码应用管理能力的集成,使得jeecgboot既具备低代码,又具备零代码的应用能力,业内独一无二。
|
||||||
|
- 强大的代码生成器:作为开源代码生成器的先锋,jeecgboot在代码生成的智能化和在线低代码与代码生成的结合方面,优势明显。
|
||||||
|
- 精细化权限管理:提供行级和列级的数据权限控制,满足企业在ERP和OA领域对权限管理的严格需求。
|
||||||
|
- 多平台支持的APP:目前采用uniapp3实现,支持小程序、H5、App及鸿蒙、鸿蒙Next、Electron桌面应用等多种终端。
|
||||||
|
|
||||||
|
> 综上所述,jeecgboot不仅在功能上具备丰富性和灵活性,还在技术架构、权限管理和用户体验等方面展现出明显的优势,是一个综合性能强大的低代码平台。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
商业版演示
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
JeecgBoot vs 敲敲云
|
||||||
|
> - JeecgBoot是低代码产品拥有系列低代码能力,比如流程设计、表单设计、大屏设计,代码生成器,适合半开发模式(开发+低代码结合),也可以集成零代码应用管理模块.
|
||||||
|
> - 敲敲云是零代码产品,完全不写代码,通过配置搭建业务系统,其在jeecgboot基础上研发而成,删除了online、代码生成、OA等需要编码功能,只保留应用管理功能和聊天、日程、文件三个OA组件.
|
||||||
|
|
||||||
|
|
||||||
|
- JeecgBoot低代码: https://boot3.jeecg.com
|
||||||
|
- 敲敲云零代码:https://app.qiaoqiaoyun.com
|
||||||
|
- APP演示(多端): http://jeecg.com/appIndex
|
||||||
|
|
||||||
|
|
||||||
|
### 流程视频介绍
|
||||||
|
|
||||||
|
[](https://www.bilibili.com/video/BV1Nk4y1o7Qc)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 商业版功能简述
|
||||||
|
|
||||||
|
> 详细的功能介绍,[请联系官方](https://jeecg.com/vip)
|
||||||
|
|
||||||
|
```
|
||||||
|
│─更多商业功能
|
||||||
|
│ ├─流程设计器
|
||||||
|
│ ├─简流设计器(类钉钉版)
|
||||||
|
│ ├─门户设计(NEW)
|
||||||
|
│ ├─表单设计器
|
||||||
|
│ ├─大屏设计器
|
||||||
|
│ └─我的任务
|
||||||
|
│ └─历史流程
|
||||||
|
│ └─历史流程
|
||||||
|
│ └─流程实例管理
|
||||||
|
│ └─流程监听管理
|
||||||
|
│ └─流程表达式
|
||||||
|
│ └─我发起的流程
|
||||||
|
│ └─我的抄送
|
||||||
|
│ └─流程委派、抄送、跳转
|
||||||
|
│ └─OA办公组件
|
||||||
|
│ └─零代码应用管理(无需编码,在线搭建应用系统)
|
||||||
|
│ ├─积木报表企业版(含jimureport、jimubi)
|
||||||
|
│ ├─AI流程设计器源码
|
||||||
|
│ ├─Online全模块功能和源码
|
||||||
|
│ ├─AI写文章(CMS)
|
||||||
|
│ ├─AI表单字段建议(表单设计器)
|
||||||
|
│ ├─OA办公协同组件
|
||||||
|
│ ├─在线聊天功能
|
||||||
|
│ ├─设计表单移动适配
|
||||||
|
│ ├─设计表单支持外部填报
|
||||||
|
│ ├─设计表单AI字段建议
|
||||||
|
│ ├─设计表单视图功能(支持多种类型含日历、表格、看板、甘特图)
|
||||||
|
│ └─。。。
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 流程设计
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 表单设计器
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
445
README.md
445
README.md
@ -2,12 +2,13 @@
|
|||||||
JeecgBoot AI低代码平台
|
JeecgBoot AI低代码平台
|
||||||
===============
|
===============
|
||||||
|
|
||||||
当前最新版本: 3.8.0(发布日期:2025-04-18)
|
当前最新版本: 3.8.2(发布日期:2025-08-04)
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/jeecgboot/JeecgBoot/blob/master/LICENSE)
|
[](https://github.com/jeecgboot/JeecgBoot/blob/master/LICENSE)
|
||||||
[](http://guojusoft.com)
|
[](https://jeecg.com)
|
||||||
[](https://github.com/jeecgboot/JeecgBoot)
|
[](https://jeecg.blog.csdn.net)
|
||||||
|
[](https://github.com/jeecgboot/JeecgBoot)
|
||||||
[](https://github.com/jeecgboot/JeecgBoot)
|
[](https://github.com/jeecgboot/JeecgBoot)
|
||||||
[](https://github.com/jeecgboot/JeecgBoot)
|
[](https://github.com/jeecgboot/JeecgBoot)
|
||||||
|
|
||||||
@ -16,57 +17,50 @@ JeecgBoot AI低代码平台
|
|||||||
项目介绍
|
项目介绍
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
<h3 align="center">Java AI Low Code Platform</h3>
|
<h3 align="center">企业级AI低代码平台</h3>
|
||||||
|
|
||||||
JeecgBoot是一款基于AIGC和低代码引擎的AI低代码平台,旨在帮助开发者快速实现低代码开发和构建、部署个性化的 AI 应用。
|
JeecgBoot 是一款基于BPM流程和代码生成的AI低代码平台,助力企业快速实现低代码开发和构建AI应用。
|
||||||
前后端分离架构Ant Design&Vue3,SpringBoot,SpringCloud Alibaba,Mybatis-plus,Shiro,强大的代码生成器让前后端代码一键生成,无需写任何代码!
|
采用前后端分离架构(Ant Design&Vue3,SpringBoot3,SpringCloud Alibaba,Mybatis-plus),强大代码生成器实现前后端一键生成,无需手写代码。
|
||||||
成套AI大模型功能: AI模型管理、AI应用、知识库、AI流程编排、AI对话助手等;
|
平台引领AI低代码开发模式:AI生成→在线编码→代码生成→手工合并,解决Java项目80%重复工作,提升效率,节省成本,兼顾灵活性。
|
||||||
引领AI低代码开发模式: AIGC生成->OnlineCoding-> 代码生成-> 手工MERGE, 帮助Java项目解决80%的重复工作,让开发更多关注业务,快速提高效率 节省成本,同时又不失灵活性!
|
具备强大且颗粒化的权限控制,支持按钮权限和数据权限设置,满足大型业务系统需求。功能涵盖在线表单、表单设计、流程设计、门户设计、报表与大屏设计、OA办公、AI应用、AI知识库、大模型管理、AI流程编排、AI聊天,支持ChatGPT、DeepSeek、Ollama等多种AI大模型。
|
||||||
|
|
||||||
|
`AI赋能报表:` 积木报表是一款自主研发的强大开源企业级Web报表与大屏工具。它通过零编码的拖拽式操作,赋能用户如同搭积木般轻松构建各类复杂报表和数据大屏,全面满足企业数据可视化与分析需求,助力企业级数据产品的高效打造与应用。
|
||||||
|
|
||||||
JeecgBoot 提供了一系列 `低代码能力`,实现`真正的零代码`在线开发:Online表单开发、Online报表、复杂报表设计、打印设计、在线图表设计、仪表盘设计、大屏设计、移动图表能力、表单设计器、在线设计流程、流程自动化配置、插件能力(可插拔)
|
`AI赋能低代码:` 提供完善成熟的AI应用平台,涵盖AI应用管理、AI模型管理、智能对话助手、知识库问答、流程编排与设计器、AI建表等多项功能。平台兼容多种主流大模型,包括ChatGPT、DeepSeek、Ollama、智普、千问等,助力企业高效构建智能化应用,推动低代码开发与AI深度融合。
|
||||||
|
|
||||||
`AI赋能低代码:` 目前提供了AI应用、AI模型管理、AI流程编排、AI对话助手,AI建表、AI写文章、AI知识库问答、AI字段建议等功能;支持各种AI大模型ChatGPT、DeepSeek、Ollama、智普、千问等.
|
`JEECG宗旨是:` JEECG旨在通过OnlineCoding平台实现简单功能的零代码快速搭建,同时针对复杂功能采用代码生成器生成代码并手工合并,打造智能且灵活的低代码开发模式,有效解决了当前低代码产品普遍缺乏灵活性的问题,提升开发效率的同时兼顾系统的扩展性和定制化能力。
|
||||||
|
|
||||||
`JEECG宗旨是:` 简单功能由OnlineCoding配置实现,做到`零代码开发`;复杂功能由代码生成器生成进行手工Merge 实现`低代码开发`,既保证了`智能`又兼顾`灵活`;实现了低代码开发的同时又支持灵活编码,解决了当前低代码产品普遍不灵活的弊端!
|
`JEECG业务流程:` JEECG业务流程采用BPM工作流引擎实现业务审批,扩展任务接口供开发人员编写业务逻辑,表单提供表单设计器、在线配置表单和编码表单等多种解决方案。通过流程与表单的分离设计(松耦合)及任务节点的灵活配置,既保障了企业流程的安全性与保密性,又大幅降低了开发人员的工作量。
|
||||||
|
|
||||||
`JEECG业务流程:` 采用工作流来实现、扩展出任务接口,供开发编写业务逻辑,表单提供多种解决方案: 表单设计器、online配置表单、编码表单。同时实现了流程与表单的分离设计(松耦合)、并支持任务节点灵活配置,既保证了公司流程的保密性,又减少了开发人员的工作量。
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 视频介绍
|
|
||||||
|
|
||||||
[](https://www.bilibili.com/video/BV1Nk4y1o7Qc)
|
|
||||||
|
|
||||||
|
|
||||||
适用项目
|
适用项目
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
JeecgBoot AI低代码平台,可以应用在任何J2EE项目的开发中,支持信创国产化。尤其适合SAAS项目、企业信息管理系统(MIS)、内部办公系统(OA)、企业资源计划系统(ERP)、客户关系管理系统(CRM)等,其半智能手工Merge的开发方式,可以显著提高开发效率70%以上,极大降低开发成本。
|
JeecgBoot低代码平台兼容所有J2EE项目开发,支持信创国产化,特别适用于SAAS、企业信息管理系统(MIS)、内部办公系统(OA)、企业资源计划系统(ERP)、客户关系管理系统(CRM)及AI知识库等场景。其半智能手工Merge开发模式,可显著提升70%以上的开发效率,极大降低开发成本。同时,JeecgBoot还是一款全栈式AI开发平台,助力企业快速构建和部署个性化AI应用。。
|
||||||
又是一个全栈式 AI 开发平台,快速帮助企业构建和部署个性化的 AI 应用。
|
|
||||||
|
|
||||||
|
|
||||||
信创国产化
|
**信创兼容说明**
|
||||||
-----------------------------------
|
|
||||||
JeecgBoot 是一个开源低代码开发平台,支持全信创环境。它兼容多种国产操作系统和数据库,包括:
|
|
||||||
|
|
||||||
- 操作系统:国产麒麟、银河麒麟等国产系统几乎都是基于 Linux 内核,因此它们具有良好的兼容性。
|
- 操作系统:国产麒麟、银河麒麟等国产系统几乎都是基于 Linux 内核,因此它们具有良好的兼容性。
|
||||||
- 数据库:达梦、人大金仓、TiDB , [转库文档](https://my.oschina.net/jeecg/blog/4905722)
|
- 数据库:达梦、人大金仓、TiDB
|
||||||
- 中间件:东方通 TongWeb、TongRDS,宝兰德 AppServer、CacheDB, [信创配置文档](https://help.jeecg.com/java/tongweb-deploy/)
|
- 中间件:东方通 TongWeb、TongRDS,宝兰德 AppServer、CacheDB, [信创配置文档](https://help.jeecg.com/java/tongweb-deploy/)
|
||||||
|
|
||||||
通过这些适配,JeecgBoot 为使用国产软件和硬件的用户提供了高效的开发解决方案。
|
|
||||||
|
|
||||||
|
版本说明
|
||||||
|
|
||||||
项目说明
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
| 项目名 | 说明 |
|
|下载 | JDK17 + SpringBoot3.3 + Shiro |JDK17 + SpringBoot3.3+ SpringAuthorizationServer | JDK17/JDK8 + SpringBoot2.7 |
|
||||||
|--------------------|------------------------|
|
|------|----------------------------------------------------|--------------------------------------------|--------------------------------------------|
|
||||||
| `jeecg-boot` | 后端源码JAVA(SpringBoot微服务架构) |
|
| Github | [`springboot3`](https://github.com/jeecgboot/JeecgBoot/tree/springboot3) | [`springboot3_sas`](https://github.com/jeecgboot/JeecgBoot/tree/springboot3_sas) 分支 |[`master`](https://github.com/jeecgboot/JeecgBoot) 分支|
|
||||||
| `jeecgboot-vue3` | 前端源码VUE3(vue3+vite6+ts最新技术栈) |
|
| Gitee | [`springboot3`](https://gitee.com/jeecg/JeecgBoot/tree/springboot3/) | [`springboot3_sas`](https://gitee.com/jeecg/JeecgBoot/tree/springboot3_sas) 分支 |[`master`](https://gitee.com/jeecg/JeecgBoot) 分支 |
|
||||||
| `JeecgUniapp` | [配套APP框架](https://github.com/jeecgboot/JeecgUniapp) 适配多个终端,支持APP、小程序、H5 |
|
|
||||||
|
|
||||||
|
|
||||||
|
- `jeecg-boot` 是后端JAVA源码项目Springboot3+SpringCloudAlibaba(支持单体和微服务切换).
|
||||||
|
- `jeecgboot-vue3` 是前端VUE3源码项目(vue3+vite6+ts最新技术栈).
|
||||||
|
- `JeecgUniapp` 是[配套APP框架](https://github.com/jeecgboot/JeecgUniapp) 适配多个终端,支持APP、小程序、H5、鸿蒙、鸿蒙Next.
|
||||||
|
- 参考 [文档](https://help.jeecg.com/ui/2dev/mini) 可以删除不需要的demo,制作一个精简版本
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -74,131 +68,120 @@ JeecgBoot 是一个开源低代码开发平台,支持全信创环境。它兼
|
|||||||
启动项目
|
启动项目
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- [IDEA启动前后端项目](https://help.jeecg.com/java/setup/idea/startup)
|
> 默认账号密码: admin/123456
|
||||||
- [Docker一键启动前后端](https://help.jeecg.com/java/docker/quick)
|
|
||||||
|
|
||||||
|
- [开发环境搭建](https://help.jeecg.com/java/setup/tools)
|
||||||
|
- [IDEA启动前后端(单体模式)](https://help.jeecg.com/java/setup/idea/startup)
|
||||||
|
- [Docker一键启动(单体模式)](https://help.jeecg.com/java/docker/quick)
|
||||||
|
- [IDEA启动前后端(微服务方式)](https://help.jeecg.com/java/springcloud/switchcloud/monomer)
|
||||||
|
- [Docker一键启动(微服务方式)](https://help.jeecg.com/java/docker/quickcloud)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
在线体验
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
> JeecgBoot vs 敲敲云
|
|
||||||
> - JeecgBoot是低代码产品拥有很多低代码能力,比如流程设计、表单设计、大屏设计,代码生成器,适合半开发模式(开发+低代码结合),也可以集成零代码的应用管理模块;
|
|
||||||
> - 敲敲云是零代码产品,完全不写代码,通过配置搭建业务系统,其在jeecgboot基础上研发而成,删除了online、代码生成、OA等很多需要编码的功能,只保留了应用管理和聊天、流程、日程、文件四个标准OA功能
|
|
||||||
|
|
||||||
|
|
||||||
- JeecgBoot低代码: https://boot3.jeecg.com
|
|
||||||
- 敲敲云零代码:https://app.qiaoqiaoyun.com
|
|
||||||
- APP演示: http://jeecg.com/appIndex
|
|
||||||
|
|
||||||
技术文档
|
技术文档
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- 官方网站: [http://www.jeecg.com](http://www.jeecg.com)
|
- 官方网站: [http://www.jeecg.com](http://www.jeecg.com)
|
||||||
- 开发文档: [文档中心](https://help.jeecg.com) | [AIGC大模块](https://help.jeecg.com/aigc) | [低代码初体验一分钟](https://jeecg.blog.csdn.net/article/details/106079007)
|
- 在线演示: [平台演示](https://boot3.jeecg.com) | [APP演示](https://jeecg.com/appIndex)
|
||||||
- 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [入门视频](http://jeecg.com/doc/video) | [反馈问题](https://github.com/jeecgboot/JeecgBoot/issues/new?template=bug_report.md)
|
- 入门指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [代码生成使用](https://help.jeecg.com/java/codegen/online) | [开发文档](https://help.jeecg.com) | [AI应用手册](https://help.jeecg.com/aigc) | [视频教程](http://jeecg.com/doc/video)
|
||||||
- QQ交流群 : ⑩716488839、⑨808791225(满)、其他(满)
|
- 技术支持: [反馈问题](https://github.com/jeecgboot/JeecgBoot/issues/new?template=bug_report.md) | [低代码体验一分钟](https://jeecg.blog.csdn.net/article/details/106079007)
|
||||||
|
- QQ交流群 : 964611995、⑩716488839(满)、⑨808791225(满)、其他(满)
|
||||||
|
|
||||||
|
|
||||||
|
AI 应用平台介绍
|
||||||
AIGC应用平台介绍
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发平台`+`知识库问答`,是一款基于LLM大语言模型AI应用平台和 RAG 的知识库问答系统。
|
一个全栈式 AI 开发平台,旨在帮助开发者快速构建和部署个性化的 AI 应用。
|
||||||
|
|
||||||
|
JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类似`Dify`的`AIGC应用开发平台`+`知识库问答`,是一款基于LLM大语言模型AI应用平台和 RAG 的知识库问答系统。
|
||||||
其直观的界面结合了 AI 流程编排、RAG 管道、知识库管理、模型管理、对接向量库、实时运行可观察等,让您可以快速从原型到生产,拥有AI服务能力。
|
其直观的界面结合了 AI 流程编排、RAG 管道、知识库管理、模型管理、对接向量库、实时运行可观察等,让您可以快速从原型到生产,拥有AI服务能力。
|
||||||
|
|
||||||
> JDK说明:AI流程编排引擎暂时不支持jdk21,所以目前只能使用jdk8或者jdk17启动项目。
|
- [详细专题介绍,请点击查看](README-AI.md)
|
||||||
|
|
||||||
- [AIGC专题介绍页](README-AI.md)
|
- AI视频介绍
|
||||||
- [AIGC开发文档](https://help.jeecg.com/aigc)
|
|
||||||
- [配置向量库PGVector](https://help.jeecg.com/aigc/config)
|
|
||||||
|
|
||||||
|
|
||||||
##### AI视频介绍
|
|
||||||
|
|
||||||
[](https://www.bilibili.com/video/BV1zmd7YFE4w)
|
[](https://www.bilibili.com/video/BV1zmd7YFE4w)
|
||||||
|
|
||||||
|
|
||||||
|
为什么选择JeecgBoot?
|
||||||
|
-----------------------------------
|
||||||
##### Dify `VS` JEECG AI
|
- 1.采用最新主流前后分离框架(Spring Boot3 + MyBatis + Ant Design4 + Vue3),容易上手;代码生成器依赖性低,灵活的扩展能力,可快速实现二次开发。
|
||||||
|
- 2.前端大版本换代,最新版采用 Vue3.0 + TypeScript + Vite6 + Ant Design Vue4 等新技术方案。
|
||||||
> JEECG AI与Dify相比,在多个方面展现出显著的优势,特别是在文档处理、格式和图片保持方面。以下是一些具体的优点:
|
- 3.支持微服务Spring Cloud Alibaba(Nacos、Gateway、Sentinel、Skywalking),提供简易机制,支持单体和微服务自由切换(这样可以满足各类项目需求)。
|
||||||
> - Markdown文档库导入:
|
- 4.开发效率高,支持在线建表和AI建表,提供强大代码生成器,单表、树列表、一对多、一对一等数据模型,增删改查功能一键生成,菜单配置直接使用。
|
||||||
> JEECG AI允许用户直接导入整个Markdown文档库,这不仅保留markdown格式,还支持图片的导入,确保文档内容的完整性和可视化效果。
|
- 5.代码生成器提供强大模板机制,支持自定义模板,目前提供四套风格模板(单表两套、树模型一套、一对多三套)。
|
||||||
> - 对话回复格式美观:
|
- 6.提供强大的报表和大屏可视化工具,支持丰富的数据源连接,能够通过拖拉拽方式快速制作报表、大屏和门户设计;支持多种图表类型:柱形图、折线图、散点图、饼图、环形图、面积图、漏斗图、进度图、仪表盘、雷达图、地图等。
|
||||||
> 在对话过程中,JEECG AI能够保持回复内容的原格式,也不丢失图片,使得输出的文章更加美观,不会出现格式错乱的情况,还支持图片的渲染。
|
- 7.低代码能力:在线表单(无需编码,通过在线配置表单,实现表单的增删改查,支持单表、树、一对多、一对一等模型,实现人人皆可编码),在线配置零代码开发、所见即所得支持23种类控件。
|
||||||
> - PDF文档导入与格式转换:
|
- 8.低代码能力:在线报表、在线图表(无需编码,通过在线配置方式,实现数据报表和图形报表,可以快速抽取数据,减轻开发压力,实现人人皆可编码)。
|
||||||
> JEECG AI在处理PDF文档时,能够更好地保持原始格式和图片,确保转换后的内容与原始文档一致。这个功能在许多AI产品中表现不佳,而JEECG AI在这方面做出了显著的优化
|
- 9.Online支持在线增强开发,提供在线代码编辑器,支持代码高亮、代码提示等功能,支持多种语言(Java、SQL、JavaScript等)。
|
||||||
|
- 10.封装完善的用户、角色、菜单、组织机构、数据字典、在线定时任务等基础功能,支持访问授权、按钮权限、数据权限等功能。
|
||||||
##### 功能大模块
|
- 11.前端UI提供丰富的组件库,支持各种常用组件,如表格、树形控件、下拉框、日期选择器等,满足各种复杂的业务需求 [UI组件库文档](https://help.jeecg.com/category/ui%E7%BB%84%E4%BB%B6%E5%BA%93)。
|
||||||
|
- 12.提供APP配套框架,一份多代码多终端适配,一份代码多终端适配,小程序、H5、安卓、iOS、鸿蒙Next。
|
||||||
- AI应用开发平台
|
- 13.新版APP框架采用Uniapp、Vue3.0、Vite、Wot-design-uni、TypeScript等最新技术栈,包括二次封装组件、路由拦截、请求拦截等功能。实现了与JeecgBoot完美对接:目前已经实现登录、用户信息、通讯录、公告、移动首页、九宫格、聊天、Online表单、仪表盘等功能,提供了丰富的组件。
|
||||||
- AI知识库系统
|
- 14.提供了一套成熟的AI应用平台功能,从AI模型、知识库到AI应用搭建,助力企业快速落地AI服务,加速智能化升级。
|
||||||
- AI大模型管理
|
- 15.AI能力:目前JeecgBoot支持AI大模型chatgpt和deepseek,现在最新版默认使用deepseek,速度更快质量更高。目前提供了AI对话助手、AI知识库、AI应用、AI建表、AI报表等功能。
|
||||||
- AI流程编排
|
- 16.提供新行编辑表格JVXETable,轻松满足各种复杂ERP布局,拥有更高的性能、更灵活的扩展、更强大的功能。
|
||||||
- AI对话支持图片
|
- 17.平台首页风格,提供多种组合模式,支持自定义风格;支持门户设计,支持自定义首页。
|
||||||
- AI对话助手(智能问答)
|
- 18.常用共通封装,各种工具类(定时任务、短信接口、邮件发送、Excel导入导出等),基本满足80%项目需求。
|
||||||
- AI建表(Online表单)
|
- 19.简易Excel导入导出,支持单表导出和一对多表模式导出,生成的代码自带导入导出功能。
|
||||||
- AI写文章(CMS)
|
- 20.集成智能报表工具,报表打印、图像报表和数据导出非常方便,可极其方便地生成PDF、Excel、Word等报表。
|
||||||
- AI表单字段建议(表单设计器)
|
- 21.采用前后分离技术,页面UI风格精美,针对常用组件做了封装:时间、行表格控件、截取显示控件、报表组件、编辑器等。
|
||||||
|
- 22.查询过滤器:查询功能自动生成,后台动态拼SQL追加查询条件;支持多种匹配方式(全匹配/模糊查询/包含查询/不匹配查询)。
|
||||||
##### AI大模型支持
|
- 23.数据权限(精细化数据权限控制,控制到行级、列表级、表单字段级,实现不同人看不同数据,不同人对同一个页面操作不同字段)。
|
||||||
|
- 24.接口安全机制,可细化控制接口授权,非常简便实现不同客户端只看自己数据等控制;也提供了基于AK和SK认证鉴权的OpenAPI功能。
|
||||||
| AI大模型 | 支持 |
|
- 25.活跃的社区支持;近年来,随着网络威胁的日益增加,团队在安全和漏洞管理方面积累了丰富的经验,能够为企业提供全面的安全解决方案。
|
||||||
| --- | --- |
|
- 26.权限控制采用RBAC(Role-Based Access Control,基于角色的访问控制)。
|
||||||
| DeepSeek | √ |
|
- 27.页面校验自动生成(必须输入、数字校验、金额校验、时间空间等)。
|
||||||
| ChatGTP | √ |
|
- 28.支持SaaS服务模式,提供SaaS多租户架构方案。
|
||||||
| Qwq | √ |
|
- 29.分布式文件服务,集成MinIO、阿里OSS等优秀的第三方,提供便捷的文件上传与管理,同时也支持本地存储。
|
||||||
| 智库 | √ |
|
- 30.主流数据库兼容,一套代码完全兼容MySQL、PostgreSQL、Oracle、SQL Server、MariaDB、达梦、人大金仓等主流数据库。
|
||||||
| Ollama本地模型 | √ |
|
- 31.集成工作流Flowable,并实现了只需在页面配置流程转向,可极大简化BPM工作流的开发;用BPM的流程设计器画出了流程走向,一个工作流基本就完成了,只需写很少量的Java代码。
|
||||||
| 等等。。 | √ |
|
- 32.低代码能力:在线流程设计,采用开源Flowable流程引擎,实现在线画流程、自定义表单、表单挂靠、业务流转。
|
||||||
|
- 33.多数据源:极其简易的使用方式,在线配置数据源配置,便捷地从其他数据抓取数据。
|
||||||
|
- 34.提供单点登录CAS集成方案,项目中已经提供完善的对接代码。
|
||||||
|
- 35.低代码能力:表单设计器,支持用户自定义表单布局,支持单表、一对多表单,支持select、radio、checkbox、textarea、date、popup、列表、宏等控件。
|
||||||
|
- 36.专业接口对接机制,统一采用RESTful接口方式,集成Swagger-UI在线接口文档,JWT token安全验证,方便客户端对接。
|
||||||
|
- 37.高级组合查询功能,在线配置支持主子表关联查询,可保存查询历史。
|
||||||
|
- 38.提供各种系统监控,实时跟踪系统运行情况(监控Redis、Tomcat、JVM、服务器信息、请求追踪、SQL监控)。
|
||||||
|
- 39.消息中心(支持短信、邮件、微信推送等);集成WebSocket消息通知机制。
|
||||||
|
- 40.支持多语言,提供国际化方案。
|
||||||
|
- 41.数据变更记录日志,可记录数据每次变更内容,通过版本对比功能查看历史变化。
|
||||||
|
- 42.提供简单易用的打印插件,支持谷歌、火狐、IE11+等各种浏览器。
|
||||||
|
- 43.后端采用Maven分模块开发方式;前端支持菜单动态路由。
|
||||||
|
- 44.提供丰富的示例代码,涵盖了常用的业务场景,便于学习和参考。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
技术架构:
|
技术架构:
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
#### 前端
|
||||||
|
|
||||||
|
- 前端环境要求:Node.js要求`Node 20+` 版本以上、pnpm 要求`9+` 版本以上
|
||||||
|
- 依赖管理:node、npm、pnpm
|
||||||
|
- 前端IDE建议:IDEA、WebStorm、Vscode
|
||||||
|
- 采用 Vue3.0+TypeScript+Vite6+Ant-Design-Vue4等新技术方案,包括二次封装组件、utils、hooks、动态菜单、权限校验、按钮级别权限控制等功能
|
||||||
|
- 最新技术栈:Vue3.0 + TypeScript + Vite6 + ant-design-vue4 + pinia + echarts + unocss + vxe-table + qiankun + es6
|
||||||
|
|
||||||
|
|
||||||
#### 后端
|
#### 后端
|
||||||
|
|
||||||
- IDE建议: IDEA (必须安装lombok插件 )
|
- IDE建议: IDEA (必须安装lombok插件 )
|
||||||
- 语言:Java 默认jdk17(支持jdk8、jdk21)
|
- 语言:Java 默认jdk17(jdk21)
|
||||||
- 依赖管理:Maven
|
- 依赖管理:Maven
|
||||||
- 基础框架:Spring Boot 2.7.18
|
- 基础框架:Spring Boot 3.5.5
|
||||||
- 微服务框架: Spring Cloud Alibaba 2021.0.6.2
|
- 微服务框架: Spring Cloud Alibaba 2023.0.3.3
|
||||||
- 持久层框架:MybatisPlus 3.5.3.2
|
- 持久层框架:MybatisPlus 3.5.12
|
||||||
- 报表工具: JimuReport 1.9.5
|
- 报表工具: JimuReport 2.1.3
|
||||||
- 安全框架:Apache Shiro 1.13.0,Jwt 4.5.0
|
- 安全框架:Apache Shiro 2.0.4,Jwt 4.5.0
|
||||||
- 微服务技术栈:Spring Cloud Alibaba、Nacos、Gateway、Sentinel、Skywalking
|
- 微服务技术栈:Spring Cloud Alibaba、Nacos、Gateway、Sentinel、Skywalking
|
||||||
- 数据库连接池:阿里巴巴Druid 1.1.24
|
- 数据库连接池:阿里巴巴Druid 1.2.24
|
||||||
- AI大模型:支持 `ChatGPT` `DeepSeek`切换
|
- AI大模型:支持 `ChatGPT` `DeepSeek` `千问`等各种常规模式
|
||||||
- 日志打印:logback
|
- 日志打印:logback
|
||||||
- 缓存:Redis
|
- 缓存:Redis
|
||||||
- 其他:autopoi, fastjson,poi,Swagger-ui,quartz, lombok(简化代码)等。
|
- 其他:autopoi, fastjson,poi,Swagger-ui,quartz, lombok(简化代码)等。
|
||||||
- 默认数据库脚本:MySQL5.7+
|
- 默认提供MySQL5.7+数据库脚本
|
||||||
- [其他数据库,需要自己转](https://my.oschina.net/jeecg/blog/4905722)
|
|
||||||
|
|
||||||
|
#### 数据库支持
|
||||||
#### 前端
|
|
||||||
|
|
||||||
- 前端IDE建议:WebStorm、Vscode
|
|
||||||
- 采用 Vue3.0+TypeScript+Vite6+Ant-Design-Vue等新技术方案,包括二次封装组件、utils、hooks、动态菜单、权限校验、按钮级别权限控制等功能
|
|
||||||
- 最新技术栈:Vue3.0 + TypeScript + Vite6 + ant-design-vue4 + pinia + echarts + unocss + vxe-table + qiankun + es6
|
|
||||||
- 依赖管理:node、npm、pnpm
|
|
||||||
|
|
||||||
|
|
||||||
#### 前端环境要求
|
|
||||||
|
|
||||||
* 本地环境安装 `Node.js 、npm 、pnpm`
|
|
||||||
* pnpm 要求`9+` 版本以上
|
|
||||||
* Node.js 版本建议`v20.15.0`,要求`Node 20+` 版本以上
|
|
||||||
|
|
||||||
` ( 因为Vite6 需要 Node.js 18 / 20+ )`
|
|
||||||
|
|
||||||
|
|
||||||
#### 平台支持数据库
|
|
||||||
|
|
||||||
> jeecgboot平台支持以下数据库,默认我们只提供mysql脚本,其他数据库可以参考[转库文档](https://my.oschina.net/jeecg/blog/4905722)自己转。
|
> jeecgboot平台支持以下数据库,默认我们只提供mysql脚本,其他数据库可以参考[转库文档](https://my.oschina.net/jeecg/blog/4905722)自己转。
|
||||||
|
|
||||||
@ -216,8 +199,8 @@ JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 微服务解决方案
|
|
||||||
|
|
||||||
|
## 微服务解决方案
|
||||||
|
|
||||||
- 1、服务注册和发现 Nacos √
|
- 1、服务注册和发现 Nacos √
|
||||||
- 2、统一配置中心 Nacos √
|
- 2、统一配置中心 Nacos √
|
||||||
@ -236,62 +219,23 @@ JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
- 15、CAS 单点登录 √
|
- 15、CAS 单点登录 √
|
||||||
- 16、路由限流 √
|
- 16、路由限流 √
|
||||||
|
|
||||||
|
|
||||||
#### 微服务方式启动
|
|
||||||
|
|
||||||
- [单体快速切换微服务](https://help.jeecg.com/java/springcloud/switchcloud/monomer)
|
|
||||||
- [Docker一键启动微服务前后端](https://help.jeecg.com/java/docker/quickcloud)
|
|
||||||
|
|
||||||
|
|
||||||
#### 微服务架构图
|
#### 微服务架构图
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
为什么选择JeecgBoot?
|
|
||||||
|
|
||||||
|
开源版与企业版区别?
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
* 1.采用最新主流前后分离框架(Springboot+Mybatis+antd+vue3),容易上手; 代码生成器依赖性低,灵活的扩展能力,可快速实现二次开发;
|
|
||||||
* 2.支持微服务SpringCloud Alibaba(Nacos、Gateway、Sentinel、Skywalking),提供切换机制支持单体和微服务自由切换
|
- JeecgBoot开源版采用 [Apache-2.0 license](LICENSE) 协议附加补充条款:允许商用使用,不会造成侵权行为,允许基于本平台软件开展业务系统开发(但在任何情况下,您不得使用本软件开发可能被认为与本软件竞争的软件).
|
||||||
* 3.开发效率高,采用代码生成器,单表、树列表、一对多、一对一等数据模型,增删改查功能一键生成,菜单配置直接使用;引入AI能力,支持自动建表等功能;
|
- 商业版与开源版主要区别在于商业版提供了技术支持 和 更多的企业级功能(例如:Online图表、流程监控、流程设计、流程审批、表单设计器、表单视图、积木报表企业版、OA办公、商业APP、零代码应用、Online模块源码等功能). [更多商业功能介绍,点击查看](README-Enterprise.md)
|
||||||
* 4.代码生成器提供强大模板机制,支持自定义模板,目前提供四套风格模板(单表两套、树模型一套、一对多三套)
|
- JeecgBoot未来发展方向是:零代码平台的建设,也就是团队的另外一款产品 [敲敲云零代码](https://www.qiaoqiaoyun.com) ,无需编码即可通过拖拽快速搭建企业级应用,与JeecgBoot低代码平台形成互补,满足从简单业务到复杂系统的全场景开发需求,目前已经开源,[欢迎下载](https://qiaoqiaoyun.com/downloadCode)
|
||||||
* 5.代码生成器非常智能,在线业务建模、在线配置、所见即所得支持23种类控件,一键生成前后端代码,大幅度提升开发效率,不再为重复工作发愁。
|
|
||||||
* 6.AI能力:目前JeecgBoot支持AI大模型chatgpt和deepseek,现在最新版默认使用deepseek,速度更快质量更高。目前提供了AI对话助手、AI建表、AI报表等功能。
|
|
||||||
* 6.低代码能力:Online在线表单(无需编码,通过在线配置表单,实现表单的增删改查,支持单表、树、一对多、一对一等模型,实现人人皆可编码)
|
|
||||||
* 7.低代码能力:Online在线报表、Online在线图表(无需编码,通过在线配置方式,实现数据报表和图形报表,可以快速抽取数据,减轻开发压力,实现人人皆可编码)
|
|
||||||
* 9.封装完善的用户、角色、菜单、组织机构、数据字典、在线定时任务等基础功能,支持访问授权、按钮权限、数据权限等功能
|
|
||||||
* 10.常用共通封装,各种工具类(定时任务,短信接口,邮件发送,Excel导入导出等),基本满足80%项目需求
|
|
||||||
* 11.简易Excel导入导出,支持单表导出和一对多表模式导出,生成的代码自带导入导出功能
|
|
||||||
* 12.集成简易报表工具,图像报表和数据导出非常方便,可极其方便的生成图形报表、pdf、excel、word等报表;
|
|
||||||
* 13.采用前后分离技术,页面UI风格精美,针对常用组件做了封装:时间、行表格控件、截取显示控件、报表组件,编辑器等等
|
|
||||||
* 14.查询过滤器:查询功能自动生成,后台动态拼SQL追加查询条件;支持多种匹配方式(全匹配/模糊查询/包含查询/不匹配查询);
|
|
||||||
* 15.数据权限(精细化数据权限控制,控制到行级,列表级,表单字段级,实现不同人看不同数据,不同人对同一个页面操作不同字段
|
|
||||||
* 16.页面校验自动生成(必须输入、数字校验、金额校验、时间空间等);
|
|
||||||
* 17.支持SAAS服务模式,提供SaaS多租户架构方案。
|
|
||||||
* 18.分布式文件服务,集成minio、阿里OSS等优秀的第三方,提供便捷的文件上传与管理,同时也支持本地存储。
|
|
||||||
* 19.主流数据库兼容,一套代码完全兼容Mysql、Postgresql、Oracle、Sqlserver、MariaDB、达梦、人大金仓等主流数据库。
|
|
||||||
* 20.集成工作流flowable,并实现了只需在页面配置流程转向,可极大的简化bpm工作流的开发;用bpm的流程设计器画出了流程走向,一个工作流基本就完成了,只需写很少量的java代码;
|
|
||||||
* 21.低代码能力:在线流程设计,采用开源flowable流程引擎,实现在线画流程,自定义表单,表单挂靠,业务流转
|
|
||||||
* 22.多数据源:及其简易的使用方式,在线配置数据源配置,便捷的从其他数据抓取数据;
|
|
||||||
* 23.提供单点登录CAS集成方案,项目中已经提供完善的对接代码
|
|
||||||
* 24.低代码能力:表单设计器,支持用户自定义表单布局,支持单表,一对多表单、支持select、radio、checkbox、textarea、date、popup、列表、宏等控件
|
|
||||||
* 25.专业接口对接机制,统一采用restful接口方式,集成swagger-ui在线接口文档,Jwt token安全验证,方便客户端对接
|
|
||||||
* 26.接口安全机制,可细化控制接口授权,非常简便实现不同客户端只看自己数据等控制
|
|
||||||
* 27.高级组合查询功能,在线配置支持主子表关联查询,可保存查询历史
|
|
||||||
* 28.提供各种系统监控,实时跟踪系统运行情况(监控 Redis、Tomcat、jvm、服务器信息、请求追踪、SQL监控)
|
|
||||||
* 29.消息中心(支持短信、邮件、微信推送等等)
|
|
||||||
* 30.集成Websocket消息通知机制
|
|
||||||
* 31.移动自适应效果优秀,提供APP发布方案:
|
|
||||||
* 32.支持多语言,提供国际化方案;
|
|
||||||
* 33.数据变更记录日志,可记录数据每次变更内容,通过版本对比功能查看历史变化
|
|
||||||
* 34.平台UI强大,实现了移动自适应
|
|
||||||
* 35.平台首页风格,提供多种组合模式,支持自定义风格
|
|
||||||
* 36.提供简单易用的打印插件,支持谷歌、火狐、IE11+ 等各种浏览器
|
|
||||||
* 37.示例代码丰富,提供很多学习案例参考
|
|
||||||
* 38.采用maven分模块开发方式
|
|
||||||
* 39.支持菜单动态路由
|
|
||||||
* 40.权限控制采用 RBAC(Role-Based Access Control,基于角色的访问控制)
|
|
||||||
* 41.提供新行编辑表格JVXETable,轻松满足各种复杂ERP布局,拥有更高的性能、更灵活的扩展、更强大的功能
|
|
||||||
* 42.提供仪表盘设计器,类大屏设计支持移动端,免费的数据可视化设计工具,支持丰富的数据源连接,能够通过拖拉拽方式快速制作图表和门户设计;目前支持多种图表类型:柱形图、折线图、散点图、饼图、环形图、面积图、漏斗图、进度图、仪表盘、雷达图、地图等等;
|
|
||||||
|
|
||||||
|
|
||||||
### Jeecg Boot 产品功能蓝图
|
### Jeecg Boot 产品功能蓝图
|
||||||
@ -299,47 +243,19 @@ JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### 系统功能架构图
|
||||||
|
|
||||||
### 分支说明
|

|
||||||
|
|
||||||
> 主干master更稳定,如果你对最新技术栈无要求,建议采用主干
|
|
||||||
|
|
||||||
#### springboot3分支
|
|
||||||
- 源码地址:https://github.com/jeecgboot/JeecgBoot/tree/springboot3
|
|
||||||
- 架构说明:升级Spring Boot3 & JDK 17 + Undertow + springdoc + fastjson2
|
|
||||||
|
|
||||||
#### springboot3_sas分支
|
|
||||||
- 源码地址:https://github.com/jeecgboot/JeecgBoot/tree/springboot3_sas
|
|
||||||
- 架构说明:在springboot3分支基础上,采用SpringAuthorizationServer替换Shiro
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 功能模块
|
### 开源版功能清单
|
||||||
```
|
```
|
||||||
├─AI开发
|
|
||||||
│ ├─支持AI大模型ChatGPT和DeepSeek
|
|
||||||
│ ├─AI对话助手
|
|
||||||
│ ├─AI建表
|
|
||||||
│ ├─AI写文章
|
|
||||||
│ ├─AI流程编排
|
|
||||||
│ ├─AI知识库问答系统
|
|
||||||
│ ├─AI应用开发平台
|
|
||||||
│ ├─AI聊天窗口支持嵌入第三方
|
|
||||||
├─Online在线开发(低代码)
|
|
||||||
│ ├─Online在线表单
|
|
||||||
│ ├─Online代码生成器
|
|
||||||
│ ├─Online在线报表
|
|
||||||
│ ├─仪表盘设计器
|
|
||||||
│ ├─系统编码规则
|
|
||||||
│ ├─系统校验规则
|
|
||||||
├─积木报表设计器
|
|
||||||
│ ├─打印设计器
|
|
||||||
│ ├─数据报表设计
|
|
||||||
│ ├─图形报表设计(支持echart)
|
|
||||||
├─系统管理
|
├─系统管理
|
||||||
│ ├─用户管理
|
│ ├─用户管理
|
||||||
│ ├─角色管理
|
│ ├─角色管理
|
||||||
│ ├─菜单管理
|
│ ├─菜单管理
|
||||||
|
│ ├─首页配置
|
||||||
│ ├─权限设置(支持按钮权限、数据权限)
|
│ ├─权限设置(支持按钮权限、数据权限)
|
||||||
│ ├─表单权限(控制字段禁用、隐藏)
|
│ ├─表单权限(控制字段禁用、隐藏)
|
||||||
│ ├─部门管理
|
│ ├─部门管理
|
||||||
@ -350,7 +266,36 @@ JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
│ └─职务管理
|
│ └─职务管理
|
||||||
│ └─通讯录
|
│ └─通讯录
|
||||||
│ ├─多数据源管理
|
│ ├─多数据源管理
|
||||||
│ └─多租户管理(租户管理、租户角色、我的租户)
|
│ ├─白名单管理
|
||||||
|
│ ├─第三方配置(对接钉钉和企业微信)
|
||||||
|
│ └─多租户管理(租户管理、租户角色、我的租户、租户默认套餐管理)
|
||||||
|
├─Online在线开发(低代码)
|
||||||
|
│ ├─Online在线表单
|
||||||
|
│ ├─Online代码生成器
|
||||||
|
│ ├─Online在线报表
|
||||||
|
│ ├─仪表盘设计器
|
||||||
|
│ ├─系统编码规则
|
||||||
|
│ ├─系统校验规则
|
||||||
|
│ ├─APP版本管理
|
||||||
|
├─AI应用平台
|
||||||
|
│ ├─AI知识库问答系统
|
||||||
|
│ ├─AI大模型管理
|
||||||
|
│ ├─AI流程编排
|
||||||
|
│ ├─AI流程设计器
|
||||||
|
│ ├─AI对话支持图片
|
||||||
|
│ ├─AI对话助手(智能问答)
|
||||||
|
│ ├─AI建表(Online表单)
|
||||||
|
│ ├─AI聊天窗口支持嵌入第三方
|
||||||
|
│ ├─AI聊天窗口支持移动端
|
||||||
|
│ ├─支持常见大模型ChatGPT和DeepSeek、ollama等等
|
||||||
|
│ ├─AI OCR示例
|
||||||
|
├─数据可视化
|
||||||
|
│ ├─报表设计器(支持打印设计)
|
||||||
|
│ ├─大屏设和仪表盘设计
|
||||||
|
├─OpenAPI(基于AK和SK认证鉴权)
|
||||||
|
│ ├─接口管理
|
||||||
|
│ ├─接口授权
|
||||||
|
│ ├─接口文档
|
||||||
├─消息中心
|
├─消息中心
|
||||||
│ ├─消息管理
|
│ ├─消息管理
|
||||||
│ ├─模板管理
|
│ ├─模板管理
|
||||||
@ -362,8 +307,12 @@ JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
│ ├─高级查询器(弹窗自动组合查询条件)
|
│ ├─高级查询器(弹窗自动组合查询条件)
|
||||||
│ ├─Excel导入导出工具集成(支持单表,一对多 导入导出)
|
│ ├─Excel导入导出工具集成(支持单表,一对多 导入导出)
|
||||||
│ ├─平台移动自适应支持
|
│ ├─平台移动自适应支持
|
||||||
|
│ ├─提供新版uniapp3的代码生成器模板
|
||||||
├─系统监控
|
├─系统监控
|
||||||
│ ├─Gateway路由网关
|
│ ├─Gateway路由网关
|
||||||
|
│ ├─基于AK和SK认证鉴权OpenAPI功能
|
||||||
|
│ ├─定时任务
|
||||||
|
│ ├─数据源管理
|
||||||
│ ├─性能扫描监控
|
│ ├─性能扫描监控
|
||||||
│ │ ├─监控 Redis
|
│ │ ├─监控 Redis
|
||||||
│ │ ├─Tomcat
|
│ │ ├─Tomcat
|
||||||
@ -371,13 +320,11 @@ JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
│ │ ├─服务器信息
|
│ │ ├─服务器信息
|
||||||
│ │ ├─请求追踪
|
│ │ ├─请求追踪
|
||||||
│ │ ├─磁盘监控
|
│ │ ├─磁盘监控
|
||||||
│ ├─定时任务
|
|
||||||
│ ├─系统日志
|
│ ├─系统日志
|
||||||
│ ├─消息中心(支持短信、邮件、微信推送等等)
|
│ ├─消息中心(支持短信、邮件、微信推送等等)
|
||||||
│ ├─数据日志(记录数据快照,可对比快照,查看数据变更情况)
|
│ ├─数据日志(记录数据快照,可对比快照,查看数据变更情况)
|
||||||
│ ├─系统通知
|
|
||||||
│ ├─SQL监控
|
│ ├─SQL监控
|
||||||
│ ├─swagger-ui(在线接口文档)
|
│ ├─在线用户
|
||||||
│─报表示例
|
│─报表示例
|
||||||
│ ├─曲线图
|
│ ├─曲线图
|
||||||
│ └─饼状图
|
│ └─饼状图
|
||||||
@ -442,46 +389,16 @@ JeecgBoot 平台的AIGC功能模块,是一套类似`Dify`的`AIGC应用开发
|
|||||||
│ ├─提供单点登录CAS集成方案
|
│ ├─提供单点登录CAS集成方案
|
||||||
│ ├─提供APP发布方案
|
│ ├─提供APP发布方案
|
||||||
│ ├─集成Websocket消息通知机制
|
│ ├─集成Websocket消息通知机制
|
||||||
│─更多商业功能
|
│ ├─支持electron桌面应用打包(支持windows、linux、macOS三大平台)
|
||||||
│ ├─流程设计器
|
│ ├─docker容器支持
|
||||||
│ ├─表单设计器
|
│ ├─提供移动APP框架及源码(Uniapp3版本)支持H5、小程序、APP、鸿蒙Next
|
||||||
│ ├─大屏设计器
|
│ ├─提供移动APP低代码设计(Online表单、仪表盘)
|
||||||
│ └─我的任务
|
|
||||||
│ └─历史流程
|
|
||||||
│ └─历史流程
|
|
||||||
│ └─流程实例管理
|
|
||||||
│ └─流程监听管理
|
|
||||||
│ └─流程表达式
|
|
||||||
│ └─我发起的流程
|
|
||||||
│ └─我的抄送
|
|
||||||
│ └─流程委派、抄送、跳转
|
|
||||||
│ └─OA办公组件
|
|
||||||
│ └─。。。
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 系统效果
|
### 系统效果
|
||||||
|
|
||||||
|
|
||||||
##### AI功能
|
|
||||||
|
|
||||||
AI聊天助手
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
AI建表
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
AI写文章
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
##### PC端
|
##### PC端
|
||||||

|

|
||||||
|
|
||||||
@ -501,6 +418,22 @@ AI写文章
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
##### AI功能
|
||||||
|
|
||||||
|
AI聊天助手
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
AI建表
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
AI写文章
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
##### 仪表盘设计器
|
##### 仪表盘设计器
|
||||||
|
|
||||||
@ -567,28 +500,6 @@ AI写文章
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
##### 流程设计
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### 表单设计器
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
216
check_jeecgenv.py
Normal file
216
check_jeecgenv.py
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from typing import Tuple, Optional
|
||||||
|
|
||||||
|
def run_command(cmd: str) -> Tuple[int, str]:
|
||||||
|
"""执行命令并返回退出码和输出"""
|
||||||
|
try:
|
||||||
|
result = subprocess.run(cmd, shell=True, check=False,
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||||
|
text=True)
|
||||||
|
return result.returncode, result.stdout.strip()
|
||||||
|
except Exception as e:
|
||||||
|
return -1, str(e)
|
||||||
|
|
||||||
|
def check_java() -> bool:
|
||||||
|
"""检查JDK 17+是否安装"""
|
||||||
|
print("\n检查JDK 17+...")
|
||||||
|
rc, output = run_command("java -version 2>&1")
|
||||||
|
if rc != 0:
|
||||||
|
print("❌ 未检测到Java,请安装JDK 17+")
|
||||||
|
return False
|
||||||
|
|
||||||
|
version_pattern = r'"(\d+)(?:\.\d+)*(?:_\d+)?'
|
||||||
|
match = re.search(version_pattern, output)
|
||||||
|
if not match:
|
||||||
|
print("❌ 无法解析Java版本")
|
||||||
|
return False
|
||||||
|
|
||||||
|
version = int(match.group(1))
|
||||||
|
if version >= 17:
|
||||||
|
print(f"✅ JDK版本 {version} (满足17+要求)")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
print(f"❌ JDK版本 {version} (需要17+)")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def check_maven() -> bool:
|
||||||
|
"""检查Maven是否安装"""
|
||||||
|
print("\n检查Maven...")
|
||||||
|
rc, output = run_command("mvn -v")
|
||||||
|
if rc == 0:
|
||||||
|
print("✅ Maven已安装")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
print("❌ Maven未安装")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def check_node() -> bool:
|
||||||
|
"""检查Node.js 20+是否安装"""
|
||||||
|
print("\n检查Node.js 20+...")
|
||||||
|
rc, output = run_command("node -v")
|
||||||
|
if rc != 0:
|
||||||
|
print("❌ Node.js未安装")
|
||||||
|
return False
|
||||||
|
|
||||||
|
version_pattern = r'v(\d+)\.\d+\.\d+'
|
||||||
|
match = re.search(version_pattern, output)
|
||||||
|
if not match:
|
||||||
|
print("❌ 无法解析Node.js版本")
|
||||||
|
return False
|
||||||
|
|
||||||
|
version = int(match.group(1))
|
||||||
|
if version >= 20:
|
||||||
|
print(f"✅ Node.js版本 {version} (满足20+要求)")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
print(f"❌ Node.js版本 {version} (需要20+)")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def check_pnpm() -> bool:
|
||||||
|
"""检查PNPM 9+是否安装"""
|
||||||
|
print("\n检查PNPM 9+...")
|
||||||
|
rc, output = run_command("pnpm -v")
|
||||||
|
if rc != 0:
|
||||||
|
print("❌ PNPM未安装")
|
||||||
|
return False
|
||||||
|
|
||||||
|
try:
|
||||||
|
# 处理可能的版本号格式:v9.0.0 或 9.0.0 或 9
|
||||||
|
version_str = output.strip().lstrip('v').split('.')[0]
|
||||||
|
version = int(version_str)
|
||||||
|
|
||||||
|
if version >= 9:
|
||||||
|
print(f"✅ PNPM版本 {output.strip()} (满足9+要求)")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
print(f"❌ PNPM版本 {output.strip()} (需要9+)")
|
||||||
|
return False
|
||||||
|
except (ValueError, IndexError):
|
||||||
|
print(f"❌ 无法解析PNPM版本: {output.strip()}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def check_redis_connection() -> bool:
|
||||||
|
"""检查Redis连接"""
|
||||||
|
print("\n检查Redis连接...")
|
||||||
|
print("⚠️ 请确保已配置Redis连接信息并在jeecg-boot项目中正确配置")
|
||||||
|
print("⚠️ 此检查需要根据实际项目配置进行验证")
|
||||||
|
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||||
|
return True
|
||||||
|
|
||||||
|
def check_mysql_connection() -> bool:
|
||||||
|
"""检查MySQL连接"""
|
||||||
|
print("\n检查MySQL连接...")
|
||||||
|
print("⚠️ 请确保已配置MySQL连接信息并在jeecg-boot项目中正确配置")
|
||||||
|
print("⚠️ 此检查需要根据实际项目配置进行验证")
|
||||||
|
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||||
|
return True
|
||||||
|
|
||||||
|
def print_mysql_config():
|
||||||
|
"""打印MySQL配置并提示需要修改的位置"""
|
||||||
|
print("\nMySQL配置参考 (请检查以下配置是否正确):")
|
||||||
|
print("""
|
||||||
|
spring.datasource.dynamic.datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
username: root # ← 可能需要修改
|
||||||
|
password: root # ← 可能需要修改
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
""")
|
||||||
|
|
||||||
|
def check_ai_vector_db() -> bool:
|
||||||
|
"""检查AI向量库(pgvector)配置"""
|
||||||
|
print("\n检查AI知识库向量库配置...")
|
||||||
|
print("⚠️ 如果需要使用AI知识库功能,请配置pgvector向量库")
|
||||||
|
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||||
|
print("\n配置参考:")
|
||||||
|
print("""
|
||||||
|
jeecg.ai-rag:
|
||||||
|
embed-store:
|
||||||
|
host: 127.0.0.1 # ← 可能需要修改
|
||||||
|
port: 5432 # ← 可能需要修改
|
||||||
|
database: postgres # ← 可能需要修改
|
||||||
|
user: postgres # ← 可能需要修改
|
||||||
|
password: postgres # ← 可能需要修改
|
||||||
|
table: embeddings # ← 可能需要修改
|
||||||
|
""")
|
||||||
|
print("⚠️ 注意: 请确保已安装PostgreSQL并添加pgvector扩展!docker安装参考:https://help.jeecg.com/aigc/config")
|
||||||
|
return True
|
||||||
|
|
||||||
|
def check_ai_config() -> bool:
|
||||||
|
"""检查AI账号配置"""
|
||||||
|
print("\n检查AI功能配置...")
|
||||||
|
print("⚠️ 如果需要使用AI聊天功能,请配置AI账号信息")
|
||||||
|
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||||
|
print("\n配置参考:")
|
||||||
|
print("""
|
||||||
|
jeecg:
|
||||||
|
# AI集成
|
||||||
|
ai-chat:
|
||||||
|
enabled: true # ← 启用AI功能
|
||||||
|
model: deepseek-chat # ← 模型名称
|
||||||
|
apiKey: ?? # ← 必须修改为您的API Key
|
||||||
|
apiHost: https://api.deepseek.com/v1 # ← API地址
|
||||||
|
timeout: 60 # ← 超时时间(秒)
|
||||||
|
""")
|
||||||
|
print("⚠️ 注意: 请确保已获取有效的API Key并正确配置!AI账号注册获取参考: https://help.jeecg.com/java/deepSeekSupport")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def print_redis_config():
|
||||||
|
"""打印Redis配置并提示需要修改的位置"""
|
||||||
|
print("\nRedis配置参考 (请检查以下配置是否正确):")
|
||||||
|
print("""
|
||||||
|
spring.redis:
|
||||||
|
database: 0
|
||||||
|
host: 127.0.0.1 # ← 可能需要修改
|
||||||
|
port: 6379 # ← 可能需要修改
|
||||||
|
password: '' # ← 如果需要密码请修改
|
||||||
|
""")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("="*50)
|
||||||
|
print("JeecgBoot 运行环境检查脚本")
|
||||||
|
print("="*50)
|
||||||
|
|
||||||
|
all_checks_passed = True
|
||||||
|
|
||||||
|
# 检查各项依赖
|
||||||
|
if not check_java():
|
||||||
|
all_checks_passed = False
|
||||||
|
|
||||||
|
if not check_maven():
|
||||||
|
all_checks_passed = False
|
||||||
|
|
||||||
|
if not check_node():
|
||||||
|
all_checks_passed = False
|
||||||
|
|
||||||
|
if not check_pnpm():
|
||||||
|
all_checks_passed = False
|
||||||
|
|
||||||
|
# 数据库提示
|
||||||
|
print("="*50)
|
||||||
|
check_redis_connection()
|
||||||
|
print_redis_config()
|
||||||
|
print("="*50)
|
||||||
|
check_mysql_connection()
|
||||||
|
print_mysql_config()
|
||||||
|
print("="*50)
|
||||||
|
check_ai_config()
|
||||||
|
print("="*50)
|
||||||
|
check_ai_vector_db()
|
||||||
|
|
||||||
|
print("\n" + "="*50)
|
||||||
|
if all_checks_passed:
|
||||||
|
print("✅ 所有基础环境检查通过")
|
||||||
|
print("⚠️ 注意: 请确保Redis和MySQL、AI账号、向量库pgvector 已正确配置并连接成功")
|
||||||
|
else:
|
||||||
|
print("❌ 部分环境检查未通过,请根据上述提示解决问题")
|
||||||
|
|
||||||
|
print("="*50)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
input("\n按回车键退出...") # 等待用户输入
|
||||||
@ -18,20 +18,33 @@ services:
|
|||||||
--max_allowed_packet=128M
|
--max_allowed_packet=128M
|
||||||
--default-authentication-plugin=caching_sha2_password
|
--default-authentication-plugin=caching_sha2_password
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 13306:3306
|
||||||
networks:
|
networks:
|
||||||
- jeecg-boot
|
- jeecg-boot
|
||||||
|
|
||||||
jeecg-boot-redis:
|
jeecg-boot-redis:
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
|
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
|
||||||
ports:
|
# ports:
|
||||||
- 6379:6379
|
# - 6379:6379
|
||||||
restart: always
|
restart: always
|
||||||
hostname: jeecg-boot-redis
|
hostname: jeecg-boot-redis
|
||||||
container_name: jeecg-boot-redis
|
container_name: jeecg-boot-redis
|
||||||
networks:
|
networks:
|
||||||
- jeecg-boot
|
- jeecg-boot
|
||||||
|
|
||||||
|
jeecg-boot-pgvector:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/pgvector
|
||||||
|
container_name: jeecg-boot-pgvector
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: vector_db
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- jeecg-boot
|
||||||
|
|
||||||
jeecg-boot-nacos:
|
jeecg-boot-nacos:
|
||||||
restart: always
|
restart: always
|
||||||
build:
|
build:
|
||||||
@ -121,6 +134,7 @@ services:
|
|||||||
jeecg-vue:
|
jeecg-vue:
|
||||||
build:
|
build:
|
||||||
context: ./jeecgboot-vue3
|
context: ./jeecgboot-vue3
|
||||||
|
dockerfile: Dockerfile.cloud
|
||||||
container_name: jeecgboot-vue3-nginx
|
container_name: jeecgboot-vue3-nginx
|
||||||
image: jeecgboot-vue3
|
image: jeecgboot-vue3
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -18,20 +18,33 @@ services:
|
|||||||
--max_allowed_packet=128M
|
--max_allowed_packet=128M
|
||||||
--default-authentication-plugin=caching_sha2_password
|
--default-authentication-plugin=caching_sha2_password
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 13306:3306
|
||||||
networks:
|
networks:
|
||||||
- jeecg-boot
|
- jeecg-boot
|
||||||
|
|
||||||
jeecg-boot-redis:
|
jeecg-boot-redis:
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
|
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
|
||||||
ports:
|
# ports:
|
||||||
- 6379:6379
|
# - 3792:6379
|
||||||
restart: always
|
restart: always
|
||||||
hostname: jeecg-boot-redis
|
hostname: jeecg-boot-redis
|
||||||
container_name: jeecg-boot-redis
|
container_name: jeecg-boot-redis
|
||||||
networks:
|
networks:
|
||||||
- jeecg-boot
|
- jeecg-boot
|
||||||
|
|
||||||
|
jeecg-boot-pgvector:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/pgvector
|
||||||
|
container_name: jeecg-boot-pgvector
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: vector_db
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- jeecg-boot
|
||||||
|
|
||||||
jeecg-boot-system:
|
jeecg-boot-system:
|
||||||
build:
|
build:
|
||||||
context: ./jeecg-boot/jeecg-module-system/jeecg-system-start
|
context: ./jeecg-boot/jeecg-module-system/jeecg-system-start
|
||||||
|
|||||||
@ -2,12 +2,12 @@
|
|||||||
JeecgBoot 低代码开发平台
|
JeecgBoot 低代码开发平台
|
||||||
===============
|
===============
|
||||||
|
|
||||||
当前最新版本: 3.8.0(发布日期:2025-04-21)
|
当前最新版本: 3.8.2(发布日期:2025-08-04)
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
||||||
[](http://jeecg.com/aboutusIndex)
|
[](http://jeecg.com/aboutusIndex)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ JeecgBoot 是一款基于代码生成器的`低代码开发平台`!前后端
|
|||||||
|
|
||||||
- 官方网站: [http://www.jeecg.com](http://www.jeecg.com)
|
- 官方网站: [http://www.jeecg.com](http://www.jeecg.com)
|
||||||
- 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart)
|
- 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart)
|
||||||
- QQ交流群 : ⑩716488839、⑨808791225、其他(满)
|
- QQ交流群 : 964611995、⑩716488839(满)、⑨808791225(满)、其他(满)
|
||||||
- 在线演示 : [在线演示](http://boot3.jeecg.com) | [APP演示](http://jeecg.com/appIndex)
|
- 在线演示 : [在线演示](http://boot3.jeecg.com) | [APP演示](http://jeecg.com/appIndex)
|
||||||
> 演示系统的登录账号密码,请点击 [获取账号密码](http://jeecg.com/doc/demo) 获取
|
> 演示系统的登录账号密码,请点击 [获取账号密码](http://jeecg.com/doc/demo) 获取
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@ use `nacos`;
|
|||||||
Target Server Version : 50738 (5.7.38)
|
Target Server Version : 50738 (5.7.38)
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 28/05/2025 15:48:34
|
Date: 22/07/2025 10:02:59
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
@ -50,7 +50,7 @@ CREATE TABLE `config_info` (
|
|||||||
-- Records of config_info
|
-- Records of config_info
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `config_info` VALUES (1, 'jeecg-dev.yaml', 'DEFAULT_GROUP', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', '68112d529219e88a44245402ccf54676', '2021-03-03 13:01:11', '2025-05-28 07:47:53', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
INSERT INTO `config_info` VALUES (1, 'jeecg-dev.yaml', 'DEFAULT_GROUP', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', '68112d529219e88a44245402ccf54676', '2021-03-03 13:01:11', '2025-05-28 07:47:53', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
||||||
INSERT INTO `config_info` VALUES (2, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '20596e678c211d4322ead0000c0ffdbc', '2021-03-03 13:01:42', '2025-05-19 09:51:57', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
INSERT INTO `config_info` VALUES (2, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n decode-url: true\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '70bdbfdeb2651673aea0d06ed40b4ac1', '2021-03-03 13:01:42', '2025-07-22 02:00:34', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
||||||
INSERT INTO `config_info` VALUES (3, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/drag/**\",\n \"_genkey_6\": \"/actuator/**\",\n \"_genkey_7\": \"/airag/**\",\n \"_genkey_8\": \"/jimubi/**\",\n \"_genkey_9\": \"/openapi/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '856da7f7ff7931c6b1932e89d87b83ba', '2021-03-03 13:02:14', '2025-05-21 05:41:09', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'json', '', '');
|
INSERT INTO `config_info` VALUES (3, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/drag/**\",\n \"_genkey_6\": \"/actuator/**\",\n \"_genkey_7\": \"/airag/**\",\n \"_genkey_8\": \"/jimubi/**\",\n \"_genkey_9\": \"/openapi/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '856da7f7ff7931c6b1932e89d87b83ba', '2021-03-03 13:02:14', '2025-05-21 05:41:09', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'json', '', '');
|
||||||
INSERT INTO `config_info` VALUES (11, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n username: root\n password: root\n type: com.alibaba.druid.pool.DruidDataSource\n props:\n sql-show: true\n rules:\n sharding:\n binding-tables: sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n tables:\n sys_log:\n actual-data-nodes: ds0.sys_log$->{0..1}\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', 'a93fa455c32cd37ca84631d2bbe13005', '2022-04-13 03:12:28', '2022-08-07 13:13:57', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', NULL);
|
INSERT INTO `config_info` VALUES (11, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n username: root\n password: root\n type: com.alibaba.druid.pool.DruidDataSource\n props:\n sql-show: true\n rules:\n sharding:\n binding-tables: sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n tables:\n sys_log:\n actual-data-nodes: ds0.sys_log$->{0..1}\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', 'a93fa455c32cd37ca84631d2bbe13005', '2022-04-13 03:12:28', '2022-08-07 13:13:57', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', NULL);
|
||||||
INSERT INTO `config_info` VALUES (20, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '98e211c54b43a73f7189d92f1c77f815', '2022-08-04 16:36:11', '2024-06-11 16:13:15', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
INSERT INTO `config_info` VALUES (20, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '98e211c54b43a73f7189d92f1c77f815', '2022-08-04 16:36:11', '2024-06-11 16:13:15', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
||||||
@ -68,7 +68,7 @@ INSERT INTO `config_info` VALUES (40, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 's
|
|||||||
INSERT INTO `config_info` VALUES (41, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '19d7cd93eeb85a582c8a6942d499c7f7', '2024-02-29 09:10:12', '2024-06-11 16:26:12', NULL, '0:0:0:0:0:0:0:1', '', 'efc4e412-b1a1-498f-ba01-b31807649a9a', '', '', '', 'yaml', '', '');
|
INSERT INTO `config_info` VALUES (41, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '19d7cd93eeb85a582c8a6942d499c7f7', '2024-02-29 09:10:12', '2024-06-11 16:26:12', NULL, '0:0:0:0:0:0:0:1', '', 'efc4e412-b1a1-498f-ba01-b31807649a9a', '', '', '', 'yaml', '', '');
|
||||||
INSERT INTO `config_info` VALUES (42, 'jeecg-sharding-multi.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0,ds1\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n type: com.alibaba.druid.pool.DruidDataSource\n username: root\n password: root\n ds1:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n type: com.alibaba.druid.pool.DruidDataSource\n username: root\n password: root\n props:\n sql-show: true\n rules:\n replica-query:\n load-balancers:\n round-robin:\n type: ROUND_ROBIN\n props:\n default: 0\n data-sources:\n prds:\n primary-data-source-name: ds0\n replica-data-source-names: ds1\n load-balancer-name: round_robin\n sharding:\n binding-tables:\n - sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n database-inline:\n type: INLINE\n props:\n algorithm-expression: ds$->{operate_type % 2}\n tables:\n sys_log:\n actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}\n database-strategy:\n standard:\n sharding-column: operate_type\n sharding-algorithm-name: database-inline\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', '0fc2b030ca8c0008f148c84ecbd2a8c7', '2024-02-29 09:10:12', '2024-02-29 09:10:12', NULL, '0:0:0:0:0:0:0:1', '', 'efc4e412-b1a1-498f-ba01-b31807649a9a', '', NULL, NULL, 'yaml', NULL, '');
|
INSERT INTO `config_info` VALUES (42, 'jeecg-sharding-multi.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0,ds1\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n type: com.alibaba.druid.pool.DruidDataSource\n username: root\n password: root\n ds1:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n type: com.alibaba.druid.pool.DruidDataSource\n username: root\n password: root\n props:\n sql-show: true\n rules:\n replica-query:\n load-balancers:\n round-robin:\n type: ROUND_ROBIN\n props:\n default: 0\n data-sources:\n prds:\n primary-data-source-name: ds0\n replica-data-source-names: ds1\n load-balancer-name: round_robin\n sharding:\n binding-tables:\n - sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n database-inline:\n type: INLINE\n props:\n algorithm-expression: ds$->{operate_type % 2}\n tables:\n sys_log:\n actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}\n database-strategy:\n standard:\n sharding-column: operate_type\n sharding-algorithm-name: database-inline\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', '0fc2b030ca8c0008f148c84ecbd2a8c7', '2024-02-29 09:10:12', '2024-02-29 09:10:12', NULL, '0:0:0:0:0:0:0:1', '', 'efc4e412-b1a1-498f-ba01-b31807649a9a', '', NULL, NULL, 'yaml', NULL, '');
|
||||||
INSERT INTO `config_info` VALUES (43, 'jeecg-dev.yaml', 'DEFAULT_GROUP', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\n clean-disabled: true\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ?? \n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: false\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', 'dff588d1a47f42650e691b6621a401a8', '2024-06-22 15:11:57', '2025-05-19 09:48:01', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', '', '', 'yaml', '', '');
|
INSERT INTO `config_info` VALUES (43, 'jeecg-dev.yaml', 'DEFAULT_GROUP', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\n clean-disabled: true\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ?? \n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: false\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', 'dff588d1a47f42650e691b6621a401a8', '2024-06-22 15:11:57', '2025-05-19 09:48:01', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', '', '', 'yaml', '', '');
|
||||||
INSERT INTO `config_info` VALUES (44, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n # max-http-post-size: 10MB\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: metrics,httpexchanges,jeecghttptrace\n # include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '3a9678386fcd1b29874f358115b209d3', '2024-06-22 15:11:57', '2025-05-15 12:13:38', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', '', '', 'yaml', '', '');
|
INSERT INTO `config_info` VALUES (44, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n # max-http-post-size: 10MB\n decode-url: true\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: metrics,httpexchanges,jeecghttptrace\n # include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', 'ee6593a5dbd94d90e841a466e1eee018', '2024-06-22 15:11:57', '2025-07-22 02:00:50', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', '', '', 'yaml', '', '');
|
||||||
INSERT INTO `config_info` VALUES (45, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/oauth2/**\",\n \"_genkey_6\": \"/drag/**\",\n \"_genkey_7\": \"/actuator/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '9794beb09d30bc6b835f2ee870781587', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'json', NULL, '');
|
INSERT INTO `config_info` VALUES (45, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/oauth2/**\",\n \"_genkey_6\": \"/drag/**\",\n \"_genkey_7\": \"/actuator/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '9794beb09d30bc6b835f2ee870781587', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'json', NULL, '');
|
||||||
INSERT INTO `config_info` VALUES (46, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n username: root\n password: root\n type: com.alibaba.druid.pool.DruidDataSource\n props:\n sql-show: true\n rules:\n sharding:\n binding-tables: sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n tables:\n sys_log:\n actual-data-nodes: ds0.sys_log$->{0..1}\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', 'a93fa455c32cd37ca84631d2bbe13005', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'yaml', NULL, '');
|
INSERT INTO `config_info` VALUES (46, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n username: root\n password: root\n type: com.alibaba.druid.pool.DruidDataSource\n props:\n sql-show: true\n rules:\n sharding:\n binding-tables: sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n tables:\n sys_log:\n actual-data-nodes: ds0.sys_log$->{0..1}\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', 'a93fa455c32cd37ca84631d2bbe13005', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'yaml', NULL, '');
|
||||||
INSERT INTO `config_info` VALUES (47, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '19d7cd93eeb85a582c8a6942d499c7f7', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'yaml', NULL, '');
|
INSERT INTO `config_info` VALUES (47, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '19d7cd93eeb85a582c8a6942d499c7f7', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'yaml', NULL, '');
|
||||||
@ -214,7 +214,7 @@ CREATE TABLE `his_config_info` (
|
|||||||
INDEX `idx_gmt_create`(`gmt_create`) USING BTREE,
|
INDEX `idx_gmt_create`(`gmt_create`) USING BTREE,
|
||||||
INDEX `idx_gmt_modified`(`gmt_modified`) USING BTREE,
|
INDEX `idx_gmt_modified`(`gmt_modified`) USING BTREE,
|
||||||
INDEX `idx_did`(`data_id`) USING BTREE
|
INDEX `idx_did`(`data_id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '多租户改造' ROW_FORMAT = DYNAMIC;
|
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '多租户改造' ROW_FORMAT = DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of his_config_info
|
-- Records of his_config_info
|
||||||
@ -225,6 +225,8 @@ INSERT INTO `his_config_info` VALUES (2, 5, 'jeecg.yaml', 'DEFAULT_GROUP', '', '
|
|||||||
INSERT INTO `his_config_info` VALUES (1, 6, 'jeecg-dev.yaml', 'DEFAULT_GROUP', '', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n elasticsearch:\n cluster-name: jeecg-ES\n cluster-nodes: jeecg-boot-es:9200\n check-enabled: false\n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', '057a1634c9b1ebda338515520bd3924a', '2010-05-05 00:00:00', '2025-05-19 12:08:56', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
INSERT INTO `his_config_info` VALUES (1, 6, 'jeecg-dev.yaml', 'DEFAULT_GROUP', '', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n elasticsearch:\n cluster-name: jeecg-ES\n cluster-nodes: jeecg-boot-es:9200\n check-enabled: false\n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', '057a1634c9b1ebda338515520bd3924a', '2010-05-05 00:00:00', '2025-05-19 12:08:56', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||||
INSERT INTO `his_config_info` VALUES (3, 7, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/drag/**\",\n \"_genkey_6\": \"/actuator/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '708c0948118bdb96bdfaa87200a14432', '2010-05-05 00:00:00', '2025-05-21 05:41:09', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
INSERT INTO `his_config_info` VALUES (3, 7, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/drag/**\",\n \"_genkey_6\": \"/actuator/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '708c0948118bdb96bdfaa87200a14432', '2010-05-05 00:00:00', '2025-05-21 05:41:09', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||||
INSERT INTO `his_config_info` VALUES (1, 8, 'jeecg-dev.yaml', 'DEFAULT_GROUP', '', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', 'f1d8102a50c7b1f59458e8f9a0112012', '2010-05-05 00:00:00', '2025-05-28 07:47:53', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
INSERT INTO `his_config_info` VALUES (1, 8, 'jeecg-dev.yaml', 'DEFAULT_GROUP', '', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', 'f1d8102a50c7b1f59458e8f9a0112012', '2010-05-05 00:00:00', '2025-05-28 07:47:53', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||||
|
INSERT INTO `his_config_info` VALUES (2, 9, 'jeecg.yaml', 'DEFAULT_GROUP', '', 'server:\n undertow:\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '20596e678c211d4322ead0000c0ffdbc', '2010-05-05 00:00:00', '2025-07-22 02:00:34', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||||
|
INSERT INTO `his_config_info` VALUES (44, 10, 'jeecg.yaml', 'DEFAULT_GROUP', '', 'server:\n undertow:\n # max-http-post-size: 10MB\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: metrics,httpexchanges,jeecghttptrace\n # include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '3a9678386fcd1b29874f358115b209d3', '2010-05-05 00:00:00', '2025-07-22 02:00:50', NULL, '0:0:0:0:0:0:0:1', 'U', 'springboot3', '');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for permissions
|
-- Table structure for permissions
|
||||||
|
|||||||
BIN
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.dmp
Normal file
BIN
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.dmp
Normal file
Binary file not shown.
22621
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.sql
Normal file
22621
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.sql
Normal file
File diff suppressed because one or more lines are too long
18944
jeecg-boot/db/其他数据库脚本/jeecgboot-postgresql17.sql
Normal file
18944
jeecg-boot/db/其他数据库脚本/jeecgboot-postgresql17.sql
Normal file
File diff suppressed because one or more lines are too long
40804
jeecg-boot/db/其他数据库脚本/jeecgboot-sqlserver2017.sql
Normal file
40804
jeecg-boot/db/其他数据库脚本/jeecgboot-sqlserver2017.sql
Normal file
File diff suppressed because one or more lines are too long
5
jeecg-boot/db/其他数据库脚本/oracle11g dmp说明.txt
Normal file
5
jeecg-boot/db/其他数据库脚本/oracle11g dmp说明.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
oracle导出编码: export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
|
||||||
|
|
||||||
|
导出用户: jeecgbootos
|
||||||
|
|
||||||
|
导入命令: imp scott/tiger@orcl file=jeecgboot-oracle11g.dmp
|
||||||
@ -3,6 +3,7 @@
|
|||||||
> JeecgBoot属于平台级产品,每次升级改动较大,目前做不到平滑升级。
|
> JeecgBoot属于平台级产品,每次升级改动较大,目前做不到平滑升级。
|
||||||
|
|
||||||
### 增量升级方案
|
### 增量升级方案
|
||||||
|
|
||||||
#### 1.代码合并
|
#### 1.代码合并
|
||||||
本地通过svn或git做好主干,在分支上做业务开发,jeecg每次版本发布,可以手工覆盖主干的代码,对比合并代码;
|
本地通过svn或git做好主干,在分支上做业务开发,jeecg每次版本发布,可以手工覆盖主干的代码,对比合并代码;
|
||||||
|
|
||||||
@ -11,5 +12,12 @@
|
|||||||
- 其他库请手工执行SQL, 目录: `jeecg-module-system\jeecg-system-start\src\main\resources\flyway\sql\mysql`
|
- 其他库请手工执行SQL, 目录: `jeecg-module-system\jeecg-system-start\src\main\resources\flyway\sql\mysql`
|
||||||
> 注意: 升级sql只提供mysql版本;如果有权限升级, 还需要手工角色授权,退出重新登录才好使。
|
> 注意: 升级sql只提供mysql版本;如果有权限升级, 还需要手工角色授权,退出重新登录才好使。
|
||||||
|
|
||||||
#### 3.兼容问题
|
#### 3.其他数据库脚本说明
|
||||||
|
原先官方默认提供oracle和SqlServer的脚本,但是维护成本太高,未提供脚本的数据库,可以参考下面的文档自己转
|
||||||
|
https://my.oschina.net/jeecg/blog/4905722
|
||||||
|
(注意:定时任务的表qrtz_*,需要删掉用原始的脚本重新执行一下)
|
||||||
|
quartz-2.2.3-distribution.tar.gz放到百度网盘中,大家自己下载,执行所需数据库脚本
|
||||||
|
https://pan.baidu.com/s/1WrmZdUuAPg3iBwJ-LoHWyg?pwd=8mdz
|
||||||
|
|
||||||
|
#### 4.兼容问题
|
||||||
每次发版,会针对不兼容地方重点说明。
|
每次发版,会针对不兼容地方重点说明。
|
||||||
@ -18,7 +18,7 @@ services:
|
|||||||
--max_allowed_packet=128M
|
--max_allowed_packet=128M
|
||||||
--default-authentication-plugin=caching_sha2_password
|
--default-authentication-plugin=caching_sha2_password
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 13306:3306
|
||||||
networks:
|
networks:
|
||||||
- jeecg-boot
|
- jeecg-boot
|
||||||
|
|
||||||
@ -32,6 +32,19 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- jeecg-boot
|
- jeecg-boot
|
||||||
|
|
||||||
|
jeecg-boot-pgvector:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/pgvector
|
||||||
|
container_name: jeecg-boot-pgvector
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: vector_db
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- jeecg-boot
|
||||||
|
|
||||||
jeecg-boot-system:
|
jeecg-boot-system:
|
||||||
build:
|
build:
|
||||||
context: ./jeecg-module-system/jeecg-system-start
|
context: ./jeecg-module-system/jeecg-system-start
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-parent</artifactId>
|
<artifactId>jeecg-boot-parent</artifactId>
|
||||||
<version>3.8.0</version>
|
<version>3.8.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>jeecg-boot-base-core</artifactId>
|
<artifactId>jeecg-boot-base-core</artifactId>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<!--jeecg-tools-->
|
<!--jeecg-tools-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-common</artifactId>
|
<artifactId>jeecg-boot-common3</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--集成springmvc框架并实现自动配置 -->
|
<!--集成springmvc框架并实现自动配置 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -108,21 +108,31 @@
|
|||||||
<!-- mybatis-plus -->
|
<!-- mybatis-plus -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||||
<version>${mybatis-plus.version}</version>
|
<version>${mybatis-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-jsqlparser-4.9</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- minidao -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jeecgframework.boot3</groupId>
|
||||||
|
<artifactId>minidao-spring-boot-starter-jsqlparser-4.9</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- druid -->
|
<!-- druid -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-starter</artifactId>
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||||
<version>${druid.version}</version>
|
<version>${druid.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 动态数据源 -->
|
<!-- 动态数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
||||||
<version>${dynamic-datasource-spring-boot-starter.version}</version>
|
<version>${dynamic-datasource-spring-boot-starter.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -191,7 +201,50 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-spring-boot-starter</artifactId>
|
<artifactId>shiro-spring-boot-starter</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
<version>${shiro.version}</version>
|
<version>${shiro.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-spring</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-spring</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
|
<version>${shiro.version}</version>
|
||||||
|
<!-- 排除仍使用了javax.servlet的依赖 -->
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<!-- 引入适配jakarta的依赖包 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
|
<version>${shiro.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
|
<version>${shiro.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- shiro-redis -->
|
<!-- shiro-redis -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -210,12 +263,23 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- knife4j -->
|
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||||
|
<version>${knife4j-spring-boot-starter.version}</version>
|
||||||
|
</dependency>-->
|
||||||
|
<!-- knife4j 升级springboot3.4.5报错 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
|
<artifactId>knife4j-openapi3-ui</artifactId>
|
||||||
<version>${knife4j-spring-boot-starter.version}</version>
|
<version>${knife4j-spring-boot-starter.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springdoc</groupId>
|
||||||
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||||
|
<version>2.7.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 代码生成器 -->
|
<!-- 代码生成器 -->
|
||||||
<!-- 如下载失败,请参考此文档 https://help.jeecg.com/java/setup/maven.html -->
|
<!-- 如下载失败,请参考此文档 https://help.jeecg.com/java/setup/maven.html -->
|
||||||
@ -237,7 +301,7 @@
|
|||||||
|
|
||||||
<!-- AutoPoi Excel工具类-->
|
<!-- AutoPoi Excel工具类-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework</groupId>
|
<groupId>org.jeecgframework.boot3</groupId>
|
||||||
<artifactId>autopoi-web</artifactId>
|
<artifactId>autopoi-web</artifactId>
|
||||||
<version>${autopoi-web.version}</version>
|
<version>${autopoi-web.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
@ -286,6 +350,16 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xkcoding.justauth</groupId>
|
<groupId>com.xkcoding.justauth</groupId>
|
||||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
@ -312,12 +386,7 @@
|
|||||||
<!-- chatgpt -->
|
<!-- chatgpt -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-starter-chatgpt</artifactId>
|
<artifactId>jeecg-boot-starter3-chatgpt</artifactId>
|
||||||
</dependency>
|
|
||||||
<!-- minidao -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jeecgframework</groupId>
|
|
||||||
<artifactId>minidao-spring-boot-starter</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@ -2,7 +2,7 @@ package org.jeecg.common.api.dto;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -92,6 +92,12 @@ public class MessageDTO implements Serializable {
|
|||||||
|
|
||||||
//---【邮件相关参数】-------------------------------------------------------------
|
//---【邮件相关参数】-------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 枚举:org.jeecg.common.constant.enums.NoticeTypeEnum
|
||||||
|
* 通知类型(system:系统消息、file:知识库、flow:流程、plan:日程计划、meeting:会议)
|
||||||
|
*/
|
||||||
|
private String noticeType;
|
||||||
|
|
||||||
public MessageDTO(){
|
public MessageDTO(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package org.jeecg.common.api.vo;
|
package org.jeecg.common.api.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|||||||
@ -20,14 +20,14 @@ import org.jeecg.common.system.vo.LoginUser;
|
|||||||
import org.jeecg.common.util.IpUtils;
|
import org.jeecg.common.util.IpUtils;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
|
import org.springframework.core.StandardReflectionParameterNameDiscoverer;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ public class AutoLogAspect {
|
|||||||
// 请求的方法参数值
|
// 请求的方法参数值
|
||||||
Object[] args = joinPoint.getArgs();
|
Object[] args = joinPoint.getArgs();
|
||||||
// 请求的方法参数名称
|
// 请求的方法参数名称
|
||||||
LocalVariableTableParameterNameDiscoverer u = new LocalVariableTableParameterNameDiscoverer();
|
StandardReflectionParameterNameDiscoverer u=new StandardReflectionParameterNameDiscoverer();
|
||||||
String[] paramNames = u.getParameterNames(method);
|
String[] paramNames = u.getParameterNames(method);
|
||||||
if (args != null && paramNames != null) {
|
if (args != null && paramNames != null) {
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@ -303,6 +303,11 @@ public interface CommonConstant {
|
|||||||
*/
|
*/
|
||||||
String SYS_USER_ID_MAPPING_CACHE = "sys:cache:user:id_mapping";
|
String SYS_USER_ID_MAPPING_CACHE = "sys:cache:user:id_mapping";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统角色管理员编码
|
||||||
|
*/
|
||||||
|
String SYS_ROLE_ADMIN = "admin";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 考勤补卡业务状态 (1:同意 2:不同意)
|
* 考勤补卡业务状态 (1:同意 2:不同意)
|
||||||
*/
|
*/
|
||||||
@ -428,6 +433,11 @@ public interface CommonConstant {
|
|||||||
*/
|
*/
|
||||||
String NOTICE_MSG_BUS_TYPE = "NOTICE_MSG_BUS_TYPE";
|
String NOTICE_MSG_BUS_TYPE = "NOTICE_MSG_BUS_TYPE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知类型,用于区分来源 file 知识 flow 流程 plan 日程 system 系统消息
|
||||||
|
*/
|
||||||
|
String NOTICE_TYPE = "noticeType";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮箱消息中地址登录时地址后携带的token,需要替换成真实的token值
|
* 邮箱消息中地址登录时地址后携带的token,需要替换成真实的token值
|
||||||
*/
|
*/
|
||||||
@ -629,4 +639,24 @@ public interface CommonConstant {
|
|||||||
* 修改手机号验证码请求次数超出
|
* 修改手机号验证码请求次数超出
|
||||||
*/
|
*/
|
||||||
Integer PHONE_SMS_FAIL_CODE = 40002;
|
Integer PHONE_SMS_FAIL_CODE = 40002;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义首页关联关系(ROLE:表示角色 USER:表示用户)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
String HOME_RELATION_ROLE = "ROLE";
|
||||||
|
String HOME_RELATION_USER = "USER";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否置顶(0否 1是)
|
||||||
|
*/
|
||||||
|
Integer IZ_TOP_1 = 1;
|
||||||
|
Integer IZ_TOP_0 = 0;
|
||||||
|
|
||||||
|
|
||||||
|
//关注流程缓存前缀
|
||||||
|
String FLOW_FOCUS_NOTICE_PREFIX = "flow:runtimeData:focus:notice:";
|
||||||
|
//任务缓办时间缓存前缀
|
||||||
|
String FLOW_TASK_DELAY_PREFIX = "flow:runtimeData:task:delay:";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,20 @@ package org.jeecg.common.constant;
|
|||||||
* @author: jeecg-boot
|
* @author: jeecg-boot
|
||||||
*/
|
*/
|
||||||
public interface DataBaseConstant {
|
public interface DataBaseConstant {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内置的系统变量键列表
|
||||||
|
*/
|
||||||
|
public static final String[] SYSTEM_KEYS = {
|
||||||
|
DataBaseConstant.SYS_ORG_CODE, DataBaseConstant.SYS_ORG_CODE_TABLE, DataBaseConstant.SYS_MULTI_ORG_CODE,
|
||||||
|
DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE, DataBaseConstant.SYS_ORG_ID, DataBaseConstant.SYS_ORG_ID_TABLE,
|
||||||
|
DataBaseConstant.SYS_ROLE_CODE, DataBaseConstant.SYS_ROLE_CODE_TABLE, DataBaseConstant.SYS_USER_CODE,
|
||||||
|
DataBaseConstant.SYS_USER_CODE_TABLE, DataBaseConstant.SYS_USER_ID, DataBaseConstant.SYS_USER_ID_TABLE,
|
||||||
|
DataBaseConstant.SYS_USER_NAME, DataBaseConstant.SYS_USER_NAME_TABLE, DataBaseConstant.SYS_DATE,
|
||||||
|
DataBaseConstant.SYS_DATE_TABLE, DataBaseConstant.SYS_TIME, DataBaseConstant.SYS_TIME_TABLE,
|
||||||
|
DataBaseConstant.SYS_BASE_PATH
|
||||||
|
};
|
||||||
|
|
||||||
//*********数据库类型****************************************
|
//*********数据库类型****************************************
|
||||||
|
|
||||||
/**MYSQL数据库*/
|
/**MYSQL数据库*/
|
||||||
|
|||||||
@ -13,6 +13,10 @@ public enum EmailTemplateEnum {
|
|||||||
* 流程催办
|
* 流程催办
|
||||||
*/
|
*/
|
||||||
BPM_CUIBAN_EMAIL("bpm_cuiban_email", "/templates/email/bpm_cuiban_email.ftl"),
|
BPM_CUIBAN_EMAIL("bpm_cuiban_email", "/templates/email/bpm_cuiban_email.ftl"),
|
||||||
|
/**
|
||||||
|
* 流程抄送
|
||||||
|
*/
|
||||||
|
BPM_CC_EMAIL("bpm_cc_email", "/templates/email/bpm_cc_email.ftl"),
|
||||||
/**
|
/**
|
||||||
* 流程新任务
|
* 流程新任务
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -0,0 +1,75 @@
|
|||||||
|
package org.jeecg.common.constant.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 文件类型枚举类
|
||||||
|
*
|
||||||
|
* @author: wangshuai
|
||||||
|
* @date: 2025/6/26 17:29
|
||||||
|
*/
|
||||||
|
public enum NoticeTypeEnum {
|
||||||
|
|
||||||
|
//VUE3专用
|
||||||
|
NOTICE_TYPE_FILE("知识库消息","file"),
|
||||||
|
NOTICE_TYPE_FLOW("工作流消息","flow"),
|
||||||
|
NOTICE_TYPE_PLAN("日程消息","plan"),
|
||||||
|
//暂时没用到
|
||||||
|
NOTICE_TYPE_MEETING("会议消息","meeting"),
|
||||||
|
NOTICE_TYPE_SYSTEM("系统消息","system");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型值
|
||||||
|
*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
NoticeTypeEnum(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取聊天通知类型
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getChatNoticeType(String value){
|
||||||
|
return value + "Notice";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取通知名称
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getNoticeNameByValue(String value){
|
||||||
|
value = value.replace("Notice","");
|
||||||
|
for (NoticeTypeEnum e : NoticeTypeEnum.values()) {
|
||||||
|
if (e.getValue().equals(value)) {
|
||||||
|
return e.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "系统消息";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
package org.jeecg.common.exception;
|
package org.jeecg.common.exception;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import io.undertow.server.RequestTooBigException;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
@ -30,10 +33,9 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
|||||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
import org.springframework.web.multipart.MaxUploadSizeExceededException;
|
import org.springframework.web.multipart.MaxUploadSizeExceededException;
|
||||||
|
import org.springframework.web.multipart.MultipartException;
|
||||||
import org.springframework.web.servlet.NoHandlerFoundException;
|
import org.springframework.web.servlet.NoHandlerFoundException;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -166,6 +168,27 @@ public class JeecgBootExceptionHandler {
|
|||||||
return Result.error("文件大小超出10MB限制, 请压缩或降低文件质量! ");
|
return Result.error("文件大小超出10MB限制, 请压缩或降低文件质量! ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理文件过大异常.
|
||||||
|
* jdk17中的MultipartException异常类已经被拆分成了MultipartException和MaxUploadSizeExceededException
|
||||||
|
* for [QQYUN-11716]上传大图片失败没有精确提示
|
||||||
|
* @param e
|
||||||
|
* @return
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/8 16:13
|
||||||
|
*/
|
||||||
|
@ExceptionHandler(MultipartException.class)
|
||||||
|
public Result<?> handleMaxUploadSizeExceededException(MultipartException e) {
|
||||||
|
Throwable cause = e.getCause();
|
||||||
|
if (cause instanceof IllegalStateException && cause.getCause() instanceof RequestTooBigException) {
|
||||||
|
log.error("文件大小超出限制: {}", cause.getMessage(), e);
|
||||||
|
addSysLog(e);
|
||||||
|
return Result.error("文件大小超出限制, 请压缩或降低文件质量!");
|
||||||
|
} else {
|
||||||
|
return handleException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ExceptionHandler(DataIntegrityViolationException.class)
|
@ExceptionHandler(DataIntegrityViolationException.class)
|
||||||
public Result<?> handleDataIntegrityViolationException(DataIntegrityViolationException e) {
|
public Result<?> handleDataIntegrityViolationException(DataIntegrityViolationException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
@ -221,11 +244,16 @@ public class JeecgBootExceptionHandler {
|
|||||||
} catch (NullPointerException | BeansException ignored) {
|
} catch (NullPointerException | BeansException ignored) {
|
||||||
}
|
}
|
||||||
if (null != request) {
|
if (null != request) {
|
||||||
|
//update-begin---author:chenrui ---date:20250408 for:[QQYUN-11716]上传大图片失败没有精确提示------------
|
||||||
//请求的参数
|
//请求的参数
|
||||||
|
if (!isTooBigException(e)) {
|
||||||
|
// 文件上传过大异常时不能获取参数,否则会报错
|
||||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||||
if(!CollectionUtils.isEmpty(parameterMap)) {
|
if(!CollectionUtils.isEmpty(parameterMap)) {
|
||||||
log.setMethod(oConvertUtils.mapToString(request.getParameterMap()));
|
log.setMethod(oConvertUtils.mapToString(request.getParameterMap()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//update-end---author:chenrui ---date:20250408 for:[QQYUN-11716]上传大图片失败没有精确提示------------
|
||||||
// 请求地址
|
// 请求地址
|
||||||
log.setRequestUrl(request.getRequestURI());
|
log.setRequestUrl(request.getRequestURI());
|
||||||
//设置IP地址
|
//设置IP地址
|
||||||
@ -251,4 +279,26 @@ public class JeecgBootExceptionHandler {
|
|||||||
}
|
}
|
||||||
//update-end---author:chenrui ---date:20240423 for:[QQYUN-8732]把错误的日志都抓取了 方便后续处理,单独弄个日志类型------------
|
//update-end---author:chenrui ---date:20240423 for:[QQYUN-8732]把错误的日志都抓取了 方便后续处理,单独弄个日志类型------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否文件过大异常
|
||||||
|
* for [QQYUN-11716]上传大图片失败没有精确提示
|
||||||
|
* @param e
|
||||||
|
* @return
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/8 20:21
|
||||||
|
*/
|
||||||
|
private static boolean isTooBigException(Throwable e) {
|
||||||
|
boolean isTooBigException = false;
|
||||||
|
if(e instanceof MultipartException){
|
||||||
|
Throwable cause = e.getCause();
|
||||||
|
if (cause instanceof IllegalStateException && cause.getCause() instanceof RequestTooBigException){
|
||||||
|
isTooBigException = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(e instanceof MaxUploadSizeExceededException){
|
||||||
|
isTooBigException = true;
|
||||||
|
}
|
||||||
|
return isTooBigException;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,9 +23,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package org.jeecg.common.system.base.entity;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
@ -10,9 +9,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: Entity基类
|
* @Description: Entity基类
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
import org.apache.commons.beanutils.PropertyUtils;
|
import org.apache.commons.beanutils.PropertyUtils;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.DataBaseConstant;
|
import org.jeecg.common.constant.DataBaseConstant;
|
||||||
@ -257,7 +258,68 @@ public class QueryGenerator {
|
|||||||
if(parameterMap!=null&& parameterMap.containsKey(ORDER_TYPE)) {
|
if(parameterMap!=null&& parameterMap.containsKey(ORDER_TYPE)) {
|
||||||
order = parameterMap.get(ORDER_TYPE)[0];
|
order = parameterMap.get(ORDER_TYPE)[0];
|
||||||
}
|
}
|
||||||
log.debug("排序规则>>列:" + column + ",排序方式:" + order);
|
|
||||||
|
if(oConvertUtils.isNotEmpty(column)){
|
||||||
|
log.info("单字段排序规则>> column:" + column + ",排序方式:" + order);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1. 列表多字段排序优先
|
||||||
|
if(parameterMap!=null&& parameterMap.containsKey("sortInfoString")) {
|
||||||
|
// 多字段排序
|
||||||
|
String sortInfoString = parameterMap.get("sortInfoString")[0];
|
||||||
|
log.info("多字段排序规则>> sortInfoString:" + sortInfoString);
|
||||||
|
List<OrderItem> orderItemList = SqlConcatUtil.getQueryConditionOrders(column, order, sortInfoString);
|
||||||
|
log.info(orderItemList.toString());
|
||||||
|
if (orderItemList != null && !orderItemList.isEmpty()) {
|
||||||
|
for (OrderItem item : orderItemList) {
|
||||||
|
// 一、获取排序数据库字段
|
||||||
|
String columnName = item.getColumn();
|
||||||
|
// 1.字典字段,去掉字典翻译文本后缀
|
||||||
|
if(columnName.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) {
|
||||||
|
columnName = columnName.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX));
|
||||||
|
}
|
||||||
|
// 2.实体驼峰字段转为数据库字段
|
||||||
|
columnName = SqlInjectionUtil.getSqlInjectSortField(columnName);
|
||||||
|
|
||||||
|
// 二、设置字段排序规则
|
||||||
|
if (item.isAsc()) {
|
||||||
|
queryWrapper.orderByAsc(columnName);
|
||||||
|
} else {
|
||||||
|
queryWrapper.orderByDesc(columnName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 列表单字段默认排序
|
||||||
|
if(oConvertUtils.isEmpty(column) && parameterMap!=null&& parameterMap.containsKey("defSortString")) {
|
||||||
|
// 多字段排序
|
||||||
|
String sortInfoString = parameterMap.get("defSortString")[0];
|
||||||
|
log.info("默认多字段排序规则>> defSortString:" + sortInfoString);
|
||||||
|
List<OrderItem> orderItemList = SqlConcatUtil.getQueryConditionOrders(column, order, sortInfoString);
|
||||||
|
log.info(orderItemList.toString());
|
||||||
|
if (orderItemList != null && !orderItemList.isEmpty()) {
|
||||||
|
for (OrderItem item : orderItemList) {
|
||||||
|
// 一、获取排序数据库字段
|
||||||
|
String columnName = item.getColumn();
|
||||||
|
// 1.字典字段,去掉字典翻译文本后缀
|
||||||
|
if(columnName.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) {
|
||||||
|
columnName = columnName.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX));
|
||||||
|
}
|
||||||
|
// 2.实体驼峰字段转为数据库字段
|
||||||
|
columnName = SqlInjectionUtil.getSqlInjectSortField(columnName);
|
||||||
|
|
||||||
|
// 二、设置字段排序规则
|
||||||
|
if (item.isAsc()) {
|
||||||
|
queryWrapper.orderByAsc(columnName);
|
||||||
|
} else {
|
||||||
|
queryWrapper.orderByDesc(columnName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//update-begin-author:scott date:2022-11-07 for:避免用户自定义表无默认字段{创建时间},导致排序报错
|
//update-begin-author:scott date:2022-11-07 for:避免用户自定义表无默认字段{创建时间},导致排序报错
|
||||||
//TODO 避免用户自定义表无默认字段创建时间,导致排序报错
|
//TODO 避免用户自定义表无默认字段创建时间,导致排序报错
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import org.jeecg.common.system.vo.SysUserCacheInfo;
|
|||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@ -6,16 +6,18 @@ import com.auth0.jwt.algorithms.Algorithm;
|
|||||||
import com.auth0.jwt.exceptions.JWTDecodeException;
|
import com.auth0.jwt.exceptions.JWTDecodeException;
|
||||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.google.common.base.Joiner;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.servlet.ServletResponse;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
|||||||
@ -1,13 +1,22 @@
|
|||||||
package org.jeecg.common.system.util;
|
package org.jeecg.common.system.util;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.DataBaseConstant;
|
import org.jeecg.common.constant.DataBaseConstant;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
|
import org.jeecg.common.exception.JeecgBootException;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
import org.jeecg.common.util.CommonUtils;
|
import org.jeecg.common.util.CommonUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -240,4 +249,46 @@ public class SqlConcatUtil {
|
|||||||
return CommonUtils.getDatabaseType();
|
return CommonUtils.getDatabaseType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取前端传过来的 "多字段排序信息: sortInfoString"
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<OrderItem> getQueryConditionOrders(String column, String order, String queryInfoString){
|
||||||
|
List<OrderItem> list = new ArrayList<>();
|
||||||
|
if(oConvertUtils.isEmpty(queryInfoString)){
|
||||||
|
//默认以创建时间倒序查询
|
||||||
|
if(CommonConstant.ORDER_TYPE_DESC.equalsIgnoreCase(order)){
|
||||||
|
list.add(OrderItem.desc(column));
|
||||||
|
}else{
|
||||||
|
list.add(OrderItem.asc(column));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// 【TV360X-967】URL解码(微服务下需要)
|
||||||
|
if (queryInfoString.contains("%22column%22")) {
|
||||||
|
log.info("queryInfoString 原生 = {}", queryInfoString);
|
||||||
|
try {
|
||||||
|
queryInfoString = URLDecoder.decode(queryInfoString, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new JeecgBootException(e);
|
||||||
|
}
|
||||||
|
log.info("queryInfoString 解码 = {}", queryInfoString);
|
||||||
|
}
|
||||||
|
JSONArray array = JSONArray.parseArray(queryInfoString);
|
||||||
|
Iterator it = array.iterator();
|
||||||
|
while(it.hasNext()){
|
||||||
|
JSONObject json = (JSONObject)it.next();
|
||||||
|
String tempColumn = json.getString("column");
|
||||||
|
if(oConvertUtils.isNotEmpty(tempColumn)){
|
||||||
|
String tempOrder = json.getString("order");
|
||||||
|
if(CommonConstant.ORDER_TYPE_DESC.equalsIgnoreCase(tempOrder)){
|
||||||
|
list.add(OrderItem.desc(tempColumn));
|
||||||
|
}else{
|
||||||
|
list.add(OrderItem.asc(tempColumn));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,6 +68,12 @@ public class LoginUser {
|
|||||||
@SensitiveField
|
@SensitiveField
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工号
|
||||||
|
*/
|
||||||
|
@SensitiveField
|
||||||
|
private String workNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生日
|
* 生日
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import java.util.Map;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
|||||||
import org.springframework.util.FileCopyUtils;
|
import org.springframework.util.FileCopyUtils;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package org.jeecg.common.util;
|
package org.jeecg.common.util;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.jeecg.common.exception.JeecgBootException;
|
import org.jeecg.common.exception.JeecgBootException;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
|
|||||||
@ -4,13 +4,13 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
import org.jeecg.common.handler.IFillRuleHandler;
|
import org.jeecg.common.handler.IFillRuleHandler;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package org.jeecg.common.util;
|
package org.jeecg.common.util;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|||||||
@ -36,6 +36,7 @@ public class RestUtil {
|
|||||||
}
|
}
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getPath() {
|
private static String getPath() {
|
||||||
if (path == null) {
|
if (path == null) {
|
||||||
path = SpringContextUtils.getApplicationContext().getEnvironment().getProperty("server.servlet.context-path");
|
path = SpringContextUtils.getApplicationContext().getEnvironment().getProperty("server.servlet.context-path");
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
package org.jeecg.common.util;
|
package org.jeecg.common.util;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.ServiceNameConstants;
|
import org.jeecg.common.constant.ServiceNameConstants;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
@ -16,6 +17,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|||||||
* @Description: spring上下文工具类
|
* @Description: spring上下文工具类
|
||||||
* @author: jeecg-boot
|
* @author: jeecg-boot
|
||||||
*/
|
*/
|
||||||
|
@Lazy(false)
|
||||||
@Component
|
@Component
|
||||||
public class SpringContextUtils implements ApplicationContextAware {
|
public class SpringContextUtils implements ApplicationContextAware {
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
import org.jeecg.common.exception.JeecgSqlInjectionException;
|
import org.jeecg.common.exception.JeecgSqlInjectionException;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.jeecg.common.exception.JeecgBoot401Exception;
|
|||||||
import org.jeecg.common.system.util.JwtUtil;
|
import org.jeecg.common.system.util.JwtUtil;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author scott
|
* @Author scott
|
||||||
|
|||||||
@ -68,6 +68,13 @@ public class DbTypeUtils {
|
|||||||
return dbTypeIf(dbType, DbType.ORACLE, DbType.ORACLE_12C, DbType.DM);
|
return dbTypeIf(dbType, DbType.ORACLE, DbType.ORACLE_12C, DbType.DM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是达梦
|
||||||
|
*/
|
||||||
|
public static boolean dbTypeIsDm(DbType dbType) {
|
||||||
|
return dbTypeIf(dbType, DbType.DM);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean dbTypeIsSqlServer(DbType dbType) {
|
public static boolean dbTypeIsSqlServer(DbType dbType) {
|
||||||
return dbTypeIf(dbType, DbType.SQL_SERVER, DbType.SQL_SERVER2005);
|
return dbTypeIf(dbType, DbType.SQL_SERVER, DbType.SQL_SERVER2005);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package org.jeecg.common.util.encryption;
|
package org.jeecg.common.util.encryption;
|
||||||
|
|
||||||
import org.apache.shiro.codec.Base64;
|
import org.apache.shiro.lang.codec.Base64;
|
||||||
|
|
||||||
import javax.crypto.Cipher;
|
import javax.crypto.Cipher;
|
||||||
import javax.crypto.spec.IvParameterSpec;
|
import javax.crypto.spec.IvParameterSpec;
|
||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|||||||
@ -34,6 +34,7 @@ public class SsrfFileTypeFilter {
|
|||||||
FILE_TYPE_WHITE_LIST.add("bmp");
|
FILE_TYPE_WHITE_LIST.add("bmp");
|
||||||
FILE_TYPE_WHITE_LIST.add("svg");
|
FILE_TYPE_WHITE_LIST.add("svg");
|
||||||
FILE_TYPE_WHITE_LIST.add("ico");
|
FILE_TYPE_WHITE_LIST.add("ico");
|
||||||
|
FILE_TYPE_WHITE_LIST.add("heic");
|
||||||
|
|
||||||
//文本文件
|
//文本文件
|
||||||
FILE_TYPE_WHITE_LIST.add("txt");
|
FILE_TYPE_WHITE_LIST.add("txt");
|
||||||
|
|||||||
@ -7,9 +7,10 @@ import org.apache.commons.io.IOUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
|
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
@ -1134,4 +1135,13 @@ public class oConvertUtils {
|
|||||||
return isIn(obj, objs);
|
return isIn(obj, objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断租户ID是否有效
|
||||||
|
* @param tenantId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean isEffectiveTenant(String tenantId) {
|
||||||
|
return MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL && isNotEmpty(tenantId) && !("0").equals(tenantId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package org.jeecg.config;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
import org.jeecg.common.api.CommonAPI;
|
import org.jeecg.common.api.CommonAPI;
|
||||||
import org.jeecg.common.system.vo.DictModel;
|
import org.jeecg.common.system.vo.DictModel;
|
||||||
|
|||||||
@ -2,7 +2,9 @@ package org.jeecg.config;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.*;
|
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure;
|
||||||
|
import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties;
|
||||||
|
import jakarta.servlet.*;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
@ -11,8 +13,6 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
|
|
||||||
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
|
|
||||||
import com.alibaba.druid.util.Utils;
|
import com.alibaba.druid.util.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @author eightmonth@qq.com
|
||||||
* 启动程序修改DruidWallConfig配置
|
* 启动程序修改DruidWallConfig配置
|
||||||
* 允许SELECT语句的WHERE子句是一个永真条件
|
* 允许SELECT语句的WHERE子句是一个永真条件
|
||||||
* @author eightmonth
|
* @author eightmonth
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
package org.jeecg.config;
|
package org.jeecg.config;
|
||||||
|
|
||||||
import org.jeecg.config.vo.*;
|
import org.jeecg.config.vo.*;
|
||||||
|
import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Role;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
@ -11,6 +14,7 @@ import org.springframework.stereotype.Component;
|
|||||||
*/
|
*/
|
||||||
@Component("jeecgBaseConfig")
|
@Component("jeecgBaseConfig")
|
||||||
@ConfigurationProperties(prefix = "jeecg")
|
@ConfigurationProperties(prefix = "jeecg")
|
||||||
|
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||||
public class JeecgBaseConfig {
|
public class JeecgBaseConfig {
|
||||||
/**
|
/**
|
||||||
* 签名密钥串(字典等敏感接口)
|
* 签名密钥串(字典等敏感接口)
|
||||||
@ -72,6 +76,11 @@ public class JeecgBaseConfig {
|
|||||||
*/
|
*/
|
||||||
private BaiduApi baiduApi;
|
private BaiduApi baiduApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高德开放API配置
|
||||||
|
*/
|
||||||
|
private GaoDeApi gaoDeApi;
|
||||||
|
|
||||||
public String getCustomResourcePrefixPath() {
|
public String getCustomResourcePrefixPath() {
|
||||||
return customResourcePrefixPath;
|
return customResourcePrefixPath;
|
||||||
}
|
}
|
||||||
@ -168,4 +177,11 @@ public class JeecgBaseConfig {
|
|||||||
this.baiduApi = baiduApi;
|
this.baiduApi = baiduApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GaoDeApi getGaoDeApi() {
|
||||||
|
return gaoDeApi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGaoDeApi(GaoDeApi gaoDeApi) {
|
||||||
|
this.gaoDeApi = gaoDeApi;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
//package org.jeecg.config;
|
//package org.jeecg.config;
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
//import io.swagger.v3.oas.annotations.Operation;
|
||||||
//import org.jeecg.common.constant.CommonConstant;
|
//import org.jeecg.common.constant.CommonConstant;
|
||||||
|
//import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
//import org.springframework.beans.BeansException;
|
//import org.springframework.beans.BeansException;
|
||||||
//import org.springframework.beans.factory.config.BeanPostProcessor;
|
//import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||||
//import org.springframework.context.annotation.Bean;
|
//import org.springframework.context.annotation.Bean;
|
||||||
@ -18,15 +19,13 @@
|
|||||||
//import springfox.documentation.builders.ParameterBuilder;
|
//import springfox.documentation.builders.ParameterBuilder;
|
||||||
//import springfox.documentation.builders.PathSelectors;
|
//import springfox.documentation.builders.PathSelectors;
|
||||||
//import springfox.documentation.builders.RequestHandlerSelectors;
|
//import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
//import springfox.documentation.oas.annotations.EnableOpenApi;
|
|
||||||
//import springfox.documentation.schema.ModelRef;
|
//import springfox.documentation.schema.ModelRef;
|
||||||
//import springfox.documentation.service.*;
|
//import springfox.documentation.service.*;
|
||||||
//import springfox.documentation.spi.DocumentationType;
|
//import springfox.documentation.spi.DocumentationType;
|
||||||
//import springfox.documentation.spi.service.contexts.SecurityContext;
|
//import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||||
//import springfox.documentation.spring.web.plugins.Docket;
|
//import springfox.documentation.spring.web.plugins.Docket;
|
||||||
//import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
|
|
||||||
//import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
|
//import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
|
||||||
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
//import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||||
//
|
//
|
||||||
//import java.lang.reflect.Field;
|
//import java.lang.reflect.Field;
|
||||||
//import java.util.ArrayList;
|
//import java.util.ArrayList;
|
||||||
@ -38,8 +37,7 @@
|
|||||||
// * @Author scott
|
// * @Author scott
|
||||||
// */
|
// */
|
||||||
//@Configuration
|
//@Configuration
|
||||||
//@EnableSwagger2 //开启 Swagger2
|
//@EnableSwagger2WebMvc
|
||||||
//@EnableKnife4j //开启 knife4j,可以不写
|
|
||||||
//@Import(BeanValidatorPluginsConfiguration.class)
|
//@Import(BeanValidatorPluginsConfiguration.class)
|
||||||
//public class Swagger2Config implements WebMvcConfigurer {
|
//public class Swagger2Config implements WebMvcConfigurer {
|
||||||
//
|
//
|
||||||
@ -97,6 +95,14 @@
|
|||||||
// List<Parameter> pars = new ArrayList<>();
|
// List<Parameter> pars = new ArrayList<>();
|
||||||
// tokenPar.name(CommonConstant.X_ACCESS_TOKEN).description("token").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
|
// tokenPar.name(CommonConstant.X_ACCESS_TOKEN).description("token").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
|
||||||
// pars.add(tokenPar.build());
|
// pars.add(tokenPar.build());
|
||||||
|
// //update-begin-author:liusq---date:2024-08-15--for: 开启多租户时,全局参数增加租户id
|
||||||
|
// if(MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL){
|
||||||
|
// ParameterBuilder tenantPar = new ParameterBuilder();
|
||||||
|
// tenantPar.name(CommonConstant.TENANT_ID).description("租户ID").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
|
||||||
|
// pars.add(tenantPar.build());
|
||||||
|
// }
|
||||||
|
// //update-end-author:liusq---date:2024-08-15--for: 开启多租户时,全局参数增加租户id
|
||||||
|
//
|
||||||
// return pars;
|
// return pars;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
@ -151,7 +157,7 @@
|
|||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||||
// if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
|
// if (bean instanceof WebMvcRequestHandlerProvider) {
|
||||||
// customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
|
// customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
|
||||||
// }
|
// }
|
||||||
// return bean;
|
// return bean;
|
||||||
|
|||||||
@ -10,11 +10,13 @@ import io.swagger.v3.oas.models.security.SecurityRequirement;
|
|||||||
import io.swagger.v3.oas.models.security.SecurityScheme;
|
import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.springdoc.core.customizers.GlobalOpenApiCustomizer;
|
import org.springdoc.core.customizers.OperationCustomizer;
|
||||||
import org.springdoc.core.filters.GlobalOpenApiMethodFilter;
|
import org.springdoc.core.filters.GlobalOpenApiMethodFilter;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.method.HandlerMethod;
|
||||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
@ -61,42 +63,71 @@ public class Swagger3Config implements WebMvcConfigurer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public GlobalOpenApiCustomizer globalOpenApiCustomizer() {
|
public OperationCustomizer operationCustomizer() {
|
||||||
return openApi -> {
|
return (operation, handlerMethod) -> {
|
||||||
// 全局添加鉴权参数
|
String path = getFullPath(handlerMethod);
|
||||||
if (openApi.getPaths() != null) {
|
if (!isExcludedPath(path)) {
|
||||||
openApi.getPaths().forEach((path, pathItem) -> {
|
operation.addSecurityItem(new SecurityRequirement().addList(CommonConstant.X_ACCESS_TOKEN));
|
||||||
//log.debug("path: {}", path);
|
}else{
|
||||||
// 检查当前路径是否在排除列表中
|
log.info("忽略加入 X_ACCESS_TOKEN 的 PATH:" + path);
|
||||||
boolean isExcluded = excludedPaths.stream().anyMatch(excludedPath ->
|
|
||||||
excludedPath.equals(path) ||
|
|
||||||
(excludedPath.endsWith("**") && path.startsWith(excludedPath.substring(0, excludedPath.length() - 2)))
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!isExcluded) {
|
|
||||||
// 接口添加鉴权参数
|
|
||||||
pathItem.readOperations()
|
|
||||||
.forEach(operation ->
|
|
||||||
operation.addSecurityItem(new SecurityRequirement().addList(CommonConstant.X_ACCESS_TOKEN))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
return operation;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getFullPath(HandlerMethod handlerMethod) {
|
||||||
|
StringBuilder fullPath = new StringBuilder();
|
||||||
|
|
||||||
|
// 获取类级别的路径
|
||||||
|
RequestMapping classMapping = handlerMethod.getBeanType().getAnnotation(RequestMapping.class);
|
||||||
|
if (classMapping != null && classMapping.value().length > 0) {
|
||||||
|
fullPath.append(classMapping.value()[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取方法级别的路径
|
||||||
|
RequestMapping methodMapping = handlerMethod.getMethodAnnotation(RequestMapping.class);
|
||||||
|
if (methodMapping != null && methodMapping.value().length > 0) {
|
||||||
|
String methodPath = methodMapping.value()[0];
|
||||||
|
// 确保路径正确拼接,处理斜杠
|
||||||
|
if (!fullPath.toString().endsWith("/") && !methodPath.startsWith("/")) {
|
||||||
|
fullPath.append("/");
|
||||||
|
}
|
||||||
|
fullPath.append(methodPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return fullPath.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean isExcludedPath(String path) {
|
||||||
|
return excludedPaths.stream()
|
||||||
|
.anyMatch(pattern -> {
|
||||||
|
if (pattern.endsWith("/**")) {
|
||||||
|
// 处理通配符匹配
|
||||||
|
String basePath = pattern.substring(0, pattern.length() - 3);
|
||||||
|
return path.startsWith(basePath);
|
||||||
|
}
|
||||||
|
// 精确匹配
|
||||||
|
return pattern.equals(path);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OpenAPI customOpenAPI() {
|
public OpenAPI customOpenAPI() {
|
||||||
return new OpenAPI()
|
return new OpenAPI()
|
||||||
.info(new Info()
|
.info(new Info()
|
||||||
.title("JeecgBoot 后台服务API接口文档")
|
.title("JeecgBoot 后台服务API接口文档")
|
||||||
.version("3.8.0")
|
.version("3.8.2")
|
||||||
.contact(new Contact().name("北京国炬信息技术有限公司").url("www.jeccg.com").email("jeecgos@163.com"))
|
.contact(new Contact().name("北京国炬信息技术有限公司").url("www.jeccg.com").email("jeecgos@163.com"))
|
||||||
.description("后台API接口")
|
.description("后台API接口")
|
||||||
.termsOfService("NO terms of service")
|
.termsOfService("NO terms of service")
|
||||||
.license(new License().name("Apache 2.0").url("http://www.apache.org/licenses/LICENSE-2.0.html")))
|
.license(new License().name("Apache 2.0").url("http://www.apache.org/licenses/LICENSE-2.0.html")))
|
||||||
.addSecurityItem(new SecurityRequirement().addList(CommonConstant.X_ACCESS_TOKEN))
|
.addSecurityItem(new SecurityRequirement().addList(CommonConstant.X_ACCESS_TOKEN))
|
||||||
.components(new Components().addSecuritySchemes(CommonConstant.X_ACCESS_TOKEN,
|
.components(new Components().addSecuritySchemes(CommonConstant.X_ACCESS_TOKEN,
|
||||||
new SecurityScheme().name(CommonConstant.X_ACCESS_TOKEN).type(SecurityScheme.Type.HTTP)));
|
new SecurityScheme()
|
||||||
|
.name(CommonConstant.X_ACCESS_TOKEN)
|
||||||
|
.type(SecurityScheme.Type.APIKEY)
|
||||||
|
.in(SecurityScheme.In.HEADER) // 关键:指定为 header
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.config;
|
||||||
|
|
||||||
|
import io.undertow.server.DefaultByteBufferPool;
|
||||||
|
import io.undertow.websockets.jsr.WebSocketDeploymentInfo;
|
||||||
|
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
|
||||||
|
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UndertowCustomizer implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
|
||||||
|
@Override
|
||||||
|
public void customize(UndertowServletWebServerFactory factory) {
|
||||||
|
factory.addDeploymentInfoCustomizers(deploymentInfo -> {
|
||||||
|
WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
|
||||||
|
webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 1024));
|
||||||
|
deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,7 +10,10 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
|||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||||
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
import io.micrometer.prometheusmetrics.PrometheusMeterRegistry;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
import org.springframework.beans.factory.ObjectProvider;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -23,6 +26,7 @@ import org.springframework.context.annotation.Primary;
|
|||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.http.CacheControl;
|
import org.springframework.http.CacheControl;
|
||||||
import org.springframework.http.converter.HttpMessageConverter;
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
|
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
import org.springframework.web.cors.CorsConfiguration;
|
import org.springframework.web.cors.CorsConfiguration;
|
||||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||||
@ -32,7 +36,6 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
|
|||||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -88,7 +91,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addViewControllers(ViewControllerRegistry registry) {
|
public void addViewControllers(ViewControllerRegistry registry) {
|
||||||
registry.addViewController("/").setViewName("doc.html");
|
registry.addViewController("/").setViewName("redirect:/doc.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package org.jeecg.config.filter;
|
|||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.config.sign.util.BodyReaderHttpServletRequestWrapper;
|
import org.jeecg.config.sign.util.BodyReaderHttpServletRequestWrapper;
|
||||||
|
|
||||||
import javax.servlet.*;
|
import jakarta.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.common.util.TokenUtils;
|
import org.jeecg.common.util.TokenUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
|
||||||
import javax.servlet.*;
|
import jakarta.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -8,12 +8,14 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
@Configuration
|
@Configuration
|
||||||
public class LowCodeModeConfiguration implements WebMvcConfigurer {
|
public class LowCodeModeConfiguration implements WebMvcConfigurer {
|
||||||
|
|
||||||
public LowCodeModeInterceptor payInterceptor() {
|
private final LowCodeModeInterceptor lowCodeModeInterceptor;
|
||||||
return new LowCodeModeInterceptor();
|
|
||||||
|
public LowCodeModeConfiguration(LowCodeModeInterceptor lowCodeModeInterceptor) {
|
||||||
|
this.lowCodeModeInterceptor = lowCodeModeInterceptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
registry.addInterceptor(payInterceptor()).addPathPatterns(LowCodeUrlsEnum.getLowCodeInterceptUrls());
|
registry.addInterceptor(lowCodeModeInterceptor).addPathPatterns(LowCodeUrlsEnum.getLowCodeInterceptUrls());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,12 +11,12 @@ import org.jeecg.common.system.vo.LoginUser;
|
|||||||
import org.jeecg.common.util.CommonUtils;
|
import org.jeecg.common.util.CommonUtils;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import org.jeecg.config.JeecgBaseConfig;
|
import org.jeecg.config.JeecgBaseConfig;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -38,6 +38,7 @@ import java.util.Set;
|
|||||||
* @date 20230904
|
* @date 20230904
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Component
|
||||||
public class LowCodeModeInterceptor implements HandlerInterceptor {
|
public class LowCodeModeInterceptor implements HandlerInterceptor {
|
||||||
/**
|
/**
|
||||||
* 低代码开发模式
|
* 低代码开发模式
|
||||||
@ -47,18 +48,22 @@ public class LowCodeModeInterceptor implements HandlerInterceptor {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private JeecgBaseConfig jeecgBaseConfig;
|
private JeecgBaseConfig jeecgBaseConfig;
|
||||||
@Autowired
|
|
||||||
private CommonAPI commonAPI;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在请求处理之前进行调用
|
* 在请求处理之前进行调用
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
|
||||||
|
CommonAPI commonAPI = null;
|
||||||
|
log.info("低代码模式,拦截请求路径:" + request.getRequestURI());
|
||||||
|
|
||||||
//1、验证是否开启低代码开发模式控制
|
//1、验证是否开启低代码开发模式控制
|
||||||
if (jeecgBaseConfig == null) {
|
if (jeecgBaseConfig == null) {
|
||||||
jeecgBaseConfig = SpringContextUtils.getBean(JeecgBaseConfig.class);
|
jeecgBaseConfig = SpringContextUtils.getBean(JeecgBaseConfig.class);
|
||||||
}
|
}
|
||||||
|
if (commonAPI == null) {
|
||||||
|
commonAPI = SpringContextUtils.getBean(CommonAPI.class);
|
||||||
|
}
|
||||||
|
|
||||||
if (jeecgBaseConfig.getFirewall()!=null && LowCodeModeInterceptor.LOW_CODE_MODE_PROD.equals(jeecgBaseConfig.getFirewall().getLowCodeMode())) {
|
if (jeecgBaseConfig.getFirewall()!=null && LowCodeModeInterceptor.LOW_CODE_MODE_PROD.equals(jeecgBaseConfig.getFirewall().getLowCodeMode())) {
|
||||||
String requestURI = request.getRequestURI().substring(request.getContextPath().length());
|
String requestURI = request.getRequestURI().substring(request.getContextPath().length());
|
||||||
|
|||||||
@ -1,11 +1,18 @@
|
|||||||
package org.jeecg.config.mybatis;
|
package org.jeecg.config.mybatis;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.toolkit.JdbcUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import me.zhyd.oauth.log.Log;
|
||||||
|
import net.sf.jsqlparser.expression.Expression;
|
||||||
|
import net.sf.jsqlparser.expression.LongValue;
|
||||||
import org.jeecg.common.config.TenantContext;
|
import org.jeecg.common.config.TenantContext;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.TenantConstant;
|
import org.jeecg.common.constant.TenantConstant;
|
||||||
@ -13,25 +20,26 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.common.util.TokenUtils;
|
import org.jeecg.common.util.TokenUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
import javax.sql.DataSource;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
import java.sql.SQLException;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
import java.util.ArrayList;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
import java.util.List;
|
||||||
|
|
||||||
import net.sf.jsqlparser.expression.Expression;
|
|
||||||
import net.sf.jsqlparser.expression.LongValue;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单数据源配置(jeecg.datasource.open = false时生效)
|
* 单数据源配置(jeecg.datasource.open = false时生效)
|
||||||
* @Author zhoujf
|
* @Author zhoujf
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
@MapperScan(value={"org.jeecg.**.mapper*"})
|
@MapperScan(value={"org.jeecg.**.mapper*"})
|
||||||
public class MybatisPlusSaasConfig {
|
public class MybatisPlusSaasConfig {
|
||||||
|
@Autowired
|
||||||
|
private DataSource dataSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否开启系统模块的租户隔离
|
* 是否开启系统模块的租户隔离
|
||||||
@ -122,7 +130,23 @@ public class MybatisPlusSaasConfig {
|
|||||||
//update-begin-author:zyf date:20220425 for:【VUEN-606】注入动态表名适配拦截器解决多表名问题
|
//update-begin-author:zyf date:20220425 for:【VUEN-606】注入动态表名适配拦截器解决多表名问题
|
||||||
interceptor.addInnerInterceptor(dynamicTableNameInnerInterceptor());
|
interceptor.addInnerInterceptor(dynamicTableNameInnerInterceptor());
|
||||||
//update-end-author:zyf date:20220425 for:【VUEN-606】注入动态表名适配拦截器解决多表名问题
|
//update-end-author:zyf date:20220425 for:【VUEN-606】注入动态表名适配拦截器解决多表名问题
|
||||||
|
|
||||||
|
//update-begin---author:scott ---date:2025-08-02 for:【issues/8666】升级mybatisPlus后SqlServer分页使用OFFSET ? ROWS FETCH NEXT ? ROWS ONLY,导致online报表报错---
|
||||||
|
DbType dbType = null;
|
||||||
|
try {
|
||||||
|
dbType = JdbcUtils.getDbType(dataSource.getConnection().getMetaData().getURL());
|
||||||
|
log.info("当前数据库类型: {}", dbType);
|
||||||
|
} catch (SQLException e) {
|
||||||
|
Log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
if (dbType!=null && (dbType == DbType.SQL_SERVER || dbType == DbType.SQL_SERVER2005)) {
|
||||||
|
// 如果是SQL Server则覆盖为2005分页方式
|
||||||
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.SQL_SERVER2005));
|
||||||
|
} else {
|
||||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
||||||
|
}
|
||||||
|
//update-end---author:scott ---date::2025-08-02 for:【issues/8666】升级mybatisPlus后SqlServer分页使用OFFSET ? ROWS FETCH NEXT ? ROWS ONLY,导致online报表报错---
|
||||||
|
|
||||||
//【jeecg-boot/issues/3847】增加@Version乐观锁支持
|
//【jeecg-boot/issues/3847】增加@Version乐观锁支持
|
||||||
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
||||||
return interceptor;
|
return interceptor;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.config.mybatis.ThreadLocalDataHelper;
|
import org.jeecg.config.mybatis.ThreadLocalDataHelper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态数据源切换拦截器
|
* 动态数据源切换拦截器
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.jeecg.config.oss;
|
package org.jeecg.config.oss;
|
||||||
|
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
@ -26,7 +27,7 @@ public class MinioConfig {
|
|||||||
@Value(value = "${jeecg.minio.bucketName}")
|
@Value(value = "${jeecg.minio.bucketName}")
|
||||||
private String bucketName;
|
private String bucketName;
|
||||||
|
|
||||||
@Bean
|
@PostConstruct
|
||||||
public void initMinio(){
|
public void initMinio(){
|
||||||
if(!minioUrl.startsWith(CommonConstant.STR_HTTP)){
|
if(!minioUrl.startsWith(CommonConstant.STR_HTTP)){
|
||||||
minioUrl = "http://" + minioUrl;
|
minioUrl = "http://" + minioUrl;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.jeecg.config.oss;
|
package org.jeecg.config.oss;
|
||||||
|
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
import org.jeecg.common.util.oss.OssBootUtil;
|
import org.jeecg.common.util.oss.OssBootUtil;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
@ -26,7 +27,7 @@ public class OssConfiguration {
|
|||||||
private String staticDomain;
|
private String staticDomain;
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@PostConstruct
|
||||||
public void initOssBootConfiguration() {
|
public void initOssBootConfiguration() {
|
||||||
OssBootUtil.setEndPoint(endpoint);
|
OssBootUtil.setEndPoint(endpoint);
|
||||||
OssBootUtil.setAccessKeyId(accessKeyId);
|
OssBootUtil.setAccessKeyId(accessKeyId);
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package org.jeecg.config.shiro;
|
package org.jeecg.config.shiro;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.DispatcherType;
|
||||||
|
import jakarta.servlet.Filter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
|
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
|
||||||
import org.apache.shiro.mgt.DefaultSessionStorageEvaluator;
|
import org.apache.shiro.mgt.DefaultSessionStorageEvaluator;
|
||||||
@ -8,6 +11,7 @@ import org.apache.shiro.mgt.SecurityManager;
|
|||||||
import org.apache.shiro.spring.LifecycleBeanPostProcessor;
|
import org.apache.shiro.spring.LifecycleBeanPostProcessor;
|
||||||
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
|
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
|
||||||
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
||||||
|
import org.apache.shiro.spring.web.ShiroUrlPathHelper;
|
||||||
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
|
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
|
||||||
import org.crazycake.shiro.*;
|
import org.crazycake.shiro.*;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
@ -17,25 +21,20 @@ import org.jeecg.config.shiro.filters.CustomShiroFilterFactoryBean;
|
|||||||
import org.jeecg.config.shiro.filters.JwtFilter;
|
import org.jeecg.config.shiro.filters.JwtFilter;
|
||||||
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
|
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.beans.factory.config.BeanDefinition;
|
import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
|
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
import org.springframework.context.annotation.*;
|
import org.springframework.context.annotation.*;
|
||||||
import org.springframework.core.annotation.AnnotationUtils;
|
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
import org.springframework.core.type.filter.AnnotationTypeFilter;
|
|
||||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||||
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.filter.DelegatingFilterProxy;
|
import org.springframework.web.filter.DelegatingFilterProxy;
|
||||||
|
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
||||||
import redis.clients.jedis.HostAndPort;
|
import redis.clients.jedis.HostAndPort;
|
||||||
import redis.clients.jedis.JedisCluster;
|
import redis.clients.jedis.JedisCluster;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.DispatcherType;
|
|
||||||
import javax.servlet.Filter;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,6 +45,7 @@ import java.util.*;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||||
public class ShiroConfig {
|
public class ShiroConfig {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -109,7 +109,7 @@ public class ShiroConfig {
|
|||||||
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
|
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
|
||||||
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
|
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
|
||||||
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
|
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
|
||||||
|
filterChainDefinitionMap.put("/openapi/call/**", "anon"); // 开放平台接口排除
|
||||||
|
|
||||||
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
||||||
filterChainDefinitionMap.put("/", "anon");
|
filterChainDefinitionMap.put("/", "anon");
|
||||||
@ -153,7 +153,11 @@ public class ShiroConfig {
|
|||||||
filterChainDefinitionMap.put("/drag/share/view/**", "anon");
|
filterChainDefinitionMap.put("/drag/share/view/**", "anon");
|
||||||
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getAllChartData", "anon");
|
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getAllChartData", "anon");
|
||||||
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getTotalData", "anon");
|
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getTotalData", "anon");
|
||||||
|
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getMapDataByCode", "anon");
|
||||||
|
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getTotalDataByCompId", "anon");
|
||||||
filterChainDefinitionMap.put("/drag/mock/json/**", "anon");
|
filterChainDefinitionMap.put("/drag/mock/json/**", "anon");
|
||||||
|
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getDictByCodes", "anon");
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/jimubi/view", "anon");
|
filterChainDefinitionMap.put("/jimubi/view", "anon");
|
||||||
filterChainDefinitionMap.put("/jimubi/share/view/**", "anon");
|
filterChainDefinitionMap.put("/jimubi/share/view/**", "anon");
|
||||||
|
|
||||||
@ -169,6 +173,10 @@ public class ShiroConfig {
|
|||||||
filterChainDefinitionMap.put("/websocket/**", "anon");//系统通知和公告
|
filterChainDefinitionMap.put("/websocket/**", "anon");//系统通知和公告
|
||||||
filterChainDefinitionMap.put("/newsWebsocket/**", "anon");//CMS模块
|
filterChainDefinitionMap.put("/newsWebsocket/**", "anon");//CMS模块
|
||||||
filterChainDefinitionMap.put("/vxeSocket/**", "anon");//JVxeTable无痕刷新示例
|
filterChainDefinitionMap.put("/vxeSocket/**", "anon");//JVxeTable无痕刷新示例
|
||||||
|
//App vue3版本查询版本接口
|
||||||
|
filterChainDefinitionMap.put("/sys/version/app3version", "anon");
|
||||||
|
//仪表盘(按钮通信)
|
||||||
|
filterChainDefinitionMap.put("/dragChannelSocket/**","anon");
|
||||||
|
|
||||||
//性能监控——安全隐患泄露TOEKN(durid连接池也有)
|
//性能监控——安全隐患泄露TOEKN(durid连接池也有)
|
||||||
//filterChainDefinitionMap.put("/actuator/**", "anon");
|
//filterChainDefinitionMap.put("/actuator/**", "anon");
|
||||||
@ -180,8 +188,6 @@ public class ShiroConfig {
|
|||||||
// 企业微信证书排除
|
// 企业微信证书排除
|
||||||
filterChainDefinitionMap.put("/WW_verify*", "anon");
|
filterChainDefinitionMap.put("/WW_verify*", "anon");
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/openapi/call/**", "anon");
|
|
||||||
|
|
||||||
// 添加自己的过滤器并且取名为jwt
|
// 添加自己的过滤器并且取名为jwt
|
||||||
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
||||||
//如果cloudServer为空 则说明是单体 需要加载跨域配置【微服务跨域切换】
|
//如果cloudServer为空 则说明是单体 需要加载跨域配置【微服务跨域切换】
|
||||||
@ -221,6 +227,7 @@ public class ShiroConfig {
|
|||||||
registration.addUrlPatterns("/airag/flow/debug");
|
registration.addUrlPatterns("/airag/flow/debug");
|
||||||
registration.addUrlPatterns("/airag/chat/send");
|
registration.addUrlPatterns("/airag/chat/send");
|
||||||
registration.addUrlPatterns("/airag/app/debug");
|
registration.addUrlPatterns("/airag/app/debug");
|
||||||
|
registration.addUrlPatterns("/airag/app/prompt/generate");
|
||||||
//支持异步
|
//支持异步
|
||||||
registration.setAsyncSupported(true);
|
registration.setAsyncSupported(true);
|
||||||
registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC);
|
registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC);
|
||||||
@ -353,6 +360,18 @@ public class ShiroConfig {
|
|||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解决 ShiroRequestMappingConfig 获取 requestMappingHandlerMapping Bean 冲突
|
||||||
|
* spring-boot-autoconfigure:3.4.5 和 spring-boot-actuator-autoconfigure:3.4.5
|
||||||
|
*/
|
||||||
|
@Primary
|
||||||
|
@Bean
|
||||||
|
public RequestMappingHandlerMapping overridedRequestMappingHandlerMapping() {
|
||||||
|
RequestMappingHandlerMapping mapping = new RequestMappingHandlerMapping();
|
||||||
|
mapping.setUrlPathHelper(new ShiroUrlPathHelper());
|
||||||
|
return mapping;
|
||||||
|
}
|
||||||
|
|
||||||
private List<String> rebuildUrl(String[] bases, String[] uris) {
|
private List<String> rebuildUrl(String[] bases, String[] uris) {
|
||||||
List<String> urls = new ArrayList<>();
|
List<String> urls = new ArrayList<>();
|
||||||
for (String base : bases) {
|
for (String base : bases) {
|
||||||
|
|||||||
@ -20,11 +20,13 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.common.util.TokenUtils;
|
import org.jeecg.common.util.TokenUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
|
import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.context.annotation.Role;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,6 +37,7 @@ import java.util.Set;
|
|||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||||
public class ShiroRealm extends AuthorizingRealm {
|
public class ShiroRealm extends AuthorizingRealm {
|
||||||
@Lazy
|
@Lazy
|
||||||
@Resource
|
@Resource
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import org.apache.shiro.web.servlet.AbstractShiroFilter;
|
|||||||
import org.apache.shiro.mgt.SecurityManager;
|
import org.apache.shiro.mgt.SecurityManager;
|
||||||
import org.springframework.beans.factory.BeanInitializationException;
|
import org.springframework.beans.factory.BeanInitializationException;
|
||||||
|
|
||||||
import javax.servlet.Filter;
|
import jakarta.servlet.Filter;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -13,10 +13,10 @@ import org.springframework.http.HttpHeaders;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 鉴权登录拦截器
|
* @Description: 鉴权登录拦截器
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package org.jeecg.config.shiro.filters;
|
package org.jeecg.config.shiro.filters;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.apache.shiro.web.filter.AccessControlFilter;
|
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名 拦截器配置
|
* 签名 拦截器配置
|
||||||
|
|||||||
@ -4,8 +4,8 @@ package org.jeecg.config.sign.interceptor;
|
|||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package org.jeecg.config.sign.util;
|
package org.jeecg.config.sign.util;
|
||||||
|
|
||||||
import javax.servlet.ReadListener;
|
import jakarta.servlet.ReadListener;
|
||||||
import javax.servlet.ServletInputStream;
|
import jakarta.servlet.ServletInputStream;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import jakarta.servlet.http.HttpServletRequestWrapper;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import java.util.Map;
|
|||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
|
|||||||
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.config.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 高德开放api配置
|
||||||
|
*
|
||||||
|
* @author: wangshuai
|
||||||
|
* @date: 2025/7/17 20:32
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GaoDeApi {
|
||||||
|
/**应用key*/
|
||||||
|
private String apiKey;
|
||||||
|
/**应用秘钥*/
|
||||||
|
private String secretKey;
|
||||||
|
}
|
||||||
@ -14,8 +14,8 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,3 +1,2 @@
|
|||||||
springdoc.auto-tag-classes: false
|
springdoc.auto-tag-classes: false
|
||||||
springdoc.packages-to-scan: org.jeecg
|
springdoc.packages-to-scan: org.jeecg
|
||||||
springdoc.default-flat-param-object: true
|
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="box-content">
|
||||||
|
<div class="info-top">
|
||||||
|
<img src="https://www.jeecg.com/images/logo.png" style="float: left; margin: 0 10px 0 0; width: 32px;height:32px" /><div style="color:#fff"><strong>【重要】流程抄送的通知</strong></div>
|
||||||
|
</div>
|
||||||
|
<div class="info-wrap">
|
||||||
|
<div class="tips" style="padding:15px;">
|
||||||
|
<p style="margin: 10px 0;">
|
||||||
|
您好,您有一个新的流程抄送任务亟待查看,任务内容如下::
|
||||||
|
</p>
|
||||||
|
<table style="width: 400px; border-spacing: 0px; border-collapse: collapse; border: none; margin-top: 20px;"><tbody>
|
||||||
|
<tr style="height: 45px;">
|
||||||
|
<td style="width: 150px; height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
流程名称
|
||||||
|
</td>
|
||||||
|
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
${bpm_name}<a style="color: #006eff;" href="${url}" target="_blank" rel="noopener">[立刻查看]</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="height: 45px;">
|
||||||
|
<td style="width: 150px;height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
抄送任务
|
||||||
|
</td>
|
||||||
|
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
${bpm_task}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="height: 45px;">
|
||||||
|
<td style="width: 150px; height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
抄送时间
|
||||||
|
</td>
|
||||||
|
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
${datetime}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="height: 45px;">
|
||||||
|
<td style="width: 150px; height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
抄送内容
|
||||||
|
</td>
|
||||||
|
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||||
|
${remark}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="footer">北京国炬平台</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 60px;margin-bottom: 10px;">
|
||||||
|
<span style="font-size: 13px; font-weight: bold; color: #666;">温馨提醒</span>
|
||||||
|
<div style="line-height: 24px; margin-top: 10px;">
|
||||||
|
<div style="font-size: 13px; color: #666;">使用过程中如有任何问题,请联系系统管理员。</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 600px; margin: 0 auto; margin-top: 50px; font-size: 12px; -webkit-font-smoothing: subpixel-antialiased; text-size-adjust: 100%;">
|
||||||
|
<p style="text-align: center; line-height: 20.4px; text-size-adjust: 100%; font-family: 'Microsoft YaHei'!important; padding: 0px !important; margin: 0px !important; color: #7e8890 !important;">
|
||||||
|
<span class="appleLinks">Copyright © 2023-2024 北京国炬信息技术有限公司. 保留所有权利。</span>
|
||||||
|
</p>
|
||||||
|
<p style="text-align: center;line-height: 20.4px; text-size-adjust: 100%; font-family: 'Microsoft YaHei'!important; padding: 0px !important; margin: 0px; color: #7e8890 !important; margin-top: 10px;">
|
||||||
|
<span class="appleLinks">邮件由系统自动发送,请勿直接回复本邮件!</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.box-content{
|
||||||
|
width: 80%;
|
||||||
|
margin: 20px auto;
|
||||||
|
max-width: 800px;
|
||||||
|
min-width: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-top{
|
||||||
|
padding: 15px 25px;
|
||||||
|
border-top-left-radius: 10px;
|
||||||
|
border-top-right-radius: 10px;
|
||||||
|
background: #4ea3f2;
|
||||||
|
color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-wrap{
|
||||||
|
border-bottom-left-radius: 10px;
|
||||||
|
border-bottom-right-radius: 10px;
|
||||||
|
border:1px solid #ddd;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 15px 15px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer{
|
||||||
|
text-align: right;
|
||||||
|
color: #999;
|
||||||
|
padding: 0 15px 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</html>
|
||||||
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-module</artifactId>
|
<artifactId>jeecg-boot-module</artifactId>
|
||||||
<version>3.8.0</version>
|
<version>3.8.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>jeecg-boot-module-airag</artifactId>
|
<artifactId>jeecg-boot-module-airag</artifactId>
|
||||||
@ -53,19 +53,29 @@
|
|||||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||||
</dependency>-->
|
</dependency>-->
|
||||||
|
|
||||||
|
<!-- aiflow依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot3</groupId>
|
||||||
<artifactId>jeecg-aiflow</artifactId>
|
<artifactId>jeecg-aiflow</artifactId>
|
||||||
<version>1.0.4</version>
|
<version>1.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- aiflow 脚本依赖 -->
|
<!-- beigin 这两个依赖太多每个包50M左右,如果你发布需要使用,请把<scope>provided</scope>删掉 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-scripting-jsr223</artifactId>
|
||||||
|
<version>${kotlin.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.yomahub</groupId>
|
<groupId>com.yomahub</groupId>
|
||||||
<artifactId>liteflow-script-graaljs</artifactId>
|
<artifactId>liteflow-script-graaljs</artifactId>
|
||||||
<version>${liteflow.version}</version>
|
<version>${liteflow.version}</version>
|
||||||
<scope>runtime</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- end 这两个依赖太多每个包50M左右,如果你发布需要使用,请把<scope>provided</scope>删掉 -->
|
||||||
|
|
||||||
|
<!-- aiflow 脚本依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.yomahub</groupId>
|
<groupId>com.yomahub</groupId>
|
||||||
<artifactId>liteflow-script-groovy</artifactId>
|
<artifactId>liteflow-script-groovy</artifactId>
|
||||||
@ -141,9 +151,9 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- langChain4j vextor support -->
|
<!-- langChain4j vextor support -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.langchain4j</groupId>
|
<groupId>org.jeecgframework</groupId>
|
||||||
<artifactId>langchain4j-pgvector</artifactId>
|
<artifactId>langchain4j-pgvector</artifactId>
|
||||||
<version>${langchain4j.version}</version>
|
<version>0.35.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- langChain4j Document Parser -->
|
<!-- langChain4j Document Parser -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -16,6 +16,10 @@ public class AiAppConsts {
|
|||||||
* 状态:禁用
|
* 状态:禁用
|
||||||
*/
|
*/
|
||||||
public static final String STATUS_DISABLE = "disable";
|
public static final String STATUS_DISABLE = "disable";
|
||||||
|
/**
|
||||||
|
* 状态:发布
|
||||||
|
*/
|
||||||
|
public static final String STATUS_RELEASE = "release";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.util.AssertUtils;
|
import org.jeecg.common.util.AssertUtils;
|
||||||
|
import org.jeecg.common.util.TokenUtils;
|
||||||
|
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
import org.jeecg.config.shiro.IgnoreAuth;
|
import org.jeecg.config.shiro.IgnoreAuth;
|
||||||
import org.jeecg.modules.airag.app.consts.AiAppConsts;
|
import org.jeecg.modules.airag.app.consts.AiAppConsts;
|
||||||
import org.jeecg.modules.airag.app.entity.AiragApp;
|
import org.jeecg.modules.airag.app.entity.AiragApp;
|
||||||
@ -18,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,6 +67,7 @@ public class AiragAppController extends JeecgController<AiragApp, IAiragAppServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
|
@RequiresPermissions("airag:app:edit")
|
||||||
public Result<String> edit(@RequestBody AiragApp airagApp) {
|
public Result<String> edit(@RequestBody AiragApp airagApp) {
|
||||||
AssertUtils.assertNotEmpty("参数异常", airagApp);
|
AssertUtils.assertNotEmpty("参数异常", airagApp);
|
||||||
AssertUtils.assertNotEmpty("请输入应用名称", airagApp.getName());
|
AssertUtils.assertNotEmpty("请输入应用名称", airagApp.getName());
|
||||||
@ -73,6 +77,28 @@ public class AiragAppController extends JeecgController<AiragApp, IAiragAppServi
|
|||||||
return Result.OK("保存完成!", airagApp.getId());
|
return Result.OK("保存完成!", airagApp.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布应用
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/release", method = RequestMethod.POST)
|
||||||
|
public Result<String> release(@RequestParam(name = "id") String id, @RequestParam(name = "release") Boolean release) {
|
||||||
|
AssertUtils.assertNotEmpty("id必须填写", id);
|
||||||
|
if (release == null) {
|
||||||
|
release = true;
|
||||||
|
}
|
||||||
|
AiragApp airagApp = new AiragApp();
|
||||||
|
airagApp.setId(id);
|
||||||
|
if (release) {
|
||||||
|
airagApp.setStatus(AiAppConsts.STATUS_RELEASE);
|
||||||
|
} else {
|
||||||
|
airagApp.setStatus(AiAppConsts.STATUS_ENABLE);
|
||||||
|
}
|
||||||
|
airagAppService.updateById(airagApp);
|
||||||
|
return Result.OK(release ? "发布成功" : "取消发布成功");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
@ -80,23 +106,23 @@ public class AiragAppController extends JeecgController<AiragApp, IAiragAppServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
@RequiresPermissions("airag:app:delete")
|
||||||
|
public Result<String> delete(HttpServletRequest request,@RequestParam(name = "id", required = true) String id) {
|
||||||
|
//update-begin---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
|
//如果是saas隔离的情况下,判断当前租户id是否是当前租户下的
|
||||||
|
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||||
|
AiragApp app = airagAppService.getById(id);
|
||||||
|
//获取当前租户
|
||||||
|
String currentTenantId = TokenUtils.getTenantIdByRequest(request);
|
||||||
|
if (null == app || !app.getTenantId().equals(currentTenantId)) {
|
||||||
|
return Result.error("删除AI应用失败,不能删除其他租户的AI应用!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//update-end---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
airagAppService.removeById(id);
|
airagAppService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
|
||||||
this.airagAppService.removeByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1,16 +1,24 @@
|
|||||||
package org.jeecg.modules.airag.app.controller;
|
package org.jeecg.modules.airag.app.controller;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
import org.jeecg.common.util.CommonUtils;
|
||||||
import org.jeecg.config.shiro.IgnoreAuth;
|
import org.jeecg.config.shiro.IgnoreAuth;
|
||||||
import org.jeecg.modules.airag.app.service.IAiragChatService;
|
import org.jeecg.modules.airag.app.service.IAiragChatService;
|
||||||
import org.jeecg.modules.airag.app.vo.ChatConversation;
|
import org.jeecg.modules.airag.app.vo.ChatConversation;
|
||||||
import org.jeecg.modules.airag.app.vo.ChatSendParams;
|
import org.jeecg.modules.airag.app.vo.ChatSendParams;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* airag应用-chat
|
* airag应用-chat
|
||||||
*
|
*
|
||||||
@ -25,6 +33,15 @@ public class AiragChatController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
IAiragChatService chatService;
|
IAiragChatService chatService;
|
||||||
|
|
||||||
|
@Value(value = "${jeecg.path.upload}")
|
||||||
|
private String uploadpath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本地:local minio:minio 阿里:alioss
|
||||||
|
*/
|
||||||
|
@Value(value="${jeecg.uploadType}")
|
||||||
|
private String uploadType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送消息
|
* 发送消息
|
||||||
@ -59,6 +76,19 @@ public class AiragChatController {
|
|||||||
return chatService.send(chatSendParams);
|
return chatService.send(chatSendParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有对话
|
||||||
|
*
|
||||||
|
* @return 返回一个Result对象,包含所有对话的信息
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/2/25 11:42
|
||||||
|
*/
|
||||||
|
@IgnoreAuth
|
||||||
|
@GetMapping(value = "/init")
|
||||||
|
public Result<?> initChat(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
return chatService.initChat(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有对话
|
* 获取所有对话
|
||||||
*
|
*
|
||||||
@ -141,4 +171,36 @@ public class AiragChatController {
|
|||||||
return chatService.stop(requestId);
|
return chatService.stop(requestId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
* for [QQYUN-12135]AI聊天,上传图片提示非法token
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/25 11:04
|
||||||
|
*/
|
||||||
|
@IgnoreAuth
|
||||||
|
@PostMapping(value = "/upload")
|
||||||
|
public Result<?> upload(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
String bizPath = "airag";
|
||||||
|
|
||||||
|
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||||
|
// 获取上传文件对象
|
||||||
|
MultipartFile file = multipartRequest.getFile("file");
|
||||||
|
String savePath;
|
||||||
|
if (CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
|
||||||
|
savePath = CommonUtils.uploadLocal(file, bizPath, uploadpath);
|
||||||
|
} else {
|
||||||
|
savePath = CommonUtils.upload(file, bizPath, uploadType);
|
||||||
|
}
|
||||||
|
Result<?> result = new Result<>();
|
||||||
|
result.setMessage(savePath);
|
||||||
|
result.setSuccess(true);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,12 +39,13 @@ public class AiragApp implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@Schema(description = "主键")
|
@Schema(description = "主键")
|
||||||
private String id;
|
private java.lang.String id;
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "创建人")
|
@Schema(description = "创建人")
|
||||||
private String createBy;
|
@Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname")
|
||||||
|
private java.lang.String createBy;
|
||||||
/**
|
/**
|
||||||
* 创建日期
|
* 创建日期
|
||||||
*/
|
*/
|
||||||
@ -56,7 +57,7 @@ public class AiragApp implements Serializable {
|
|||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "更新人")
|
@Schema(description = "更新人")
|
||||||
private String updateBy;
|
private java.lang.String updateBy;
|
||||||
/**
|
/**
|
||||||
* 更新日期
|
* 更新日期
|
||||||
*/
|
*/
|
||||||
@ -68,95 +69,95 @@ public class AiragApp implements Serializable {
|
|||||||
* 所属部门
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
private String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
/**
|
/**
|
||||||
* 租户id
|
* 租户id
|
||||||
*/
|
*/
|
||||||
@Excel(name = "租户id", width = 15)
|
@Excel(name = "租户id", width = 15)
|
||||||
@Schema(description = "租户id")
|
@Schema(description = "租户id")
|
||||||
private String tenantId;
|
private java.lang.String tenantId;
|
||||||
/**
|
/**
|
||||||
* 应用名称
|
* 应用名称
|
||||||
*/
|
*/
|
||||||
@Excel(name = "应用名称", width = 15)
|
@Excel(name = "应用名称", width = 15)
|
||||||
@Schema(description = "应用名称")
|
@Schema(description = "应用名称")
|
||||||
private String name;
|
private java.lang.String name;
|
||||||
/**
|
/**
|
||||||
* 应用描述
|
* 应用描述
|
||||||
*/
|
*/
|
||||||
@Excel(name = "应用描述", width = 15)
|
@Excel(name = "应用描述", width = 15)
|
||||||
@Schema(description = "应用描述")
|
@Schema(description = "应用描述")
|
||||||
private String descr;
|
private java.lang.String descr;
|
||||||
/**
|
/**
|
||||||
* 应用图标
|
* 应用图标
|
||||||
*/
|
*/
|
||||||
@Excel(name = "应用图标", width = 15)
|
@Excel(name = "应用图标", width = 15)
|
||||||
@Schema(description = "应用图标")
|
@Schema(description = "应用图标")
|
||||||
private String icon;
|
private java.lang.String icon;
|
||||||
/**
|
/**
|
||||||
* 应用类型
|
* 应用类型
|
||||||
*/
|
*/
|
||||||
@Excel(name = "应用类型", width = 15, dicCode = "ai_app_type")
|
@Excel(name = "应用类型", width = 15, dicCode = "ai_app_type")
|
||||||
@Dict(dicCode = "ai_app_type")
|
@Dict(dicCode = "ai_app_type")
|
||||||
@Schema(description = "应用类型")
|
@Schema(description = "应用类型")
|
||||||
private String type;
|
private java.lang.String type;
|
||||||
/**
|
/**
|
||||||
* 开场白
|
* 开场白
|
||||||
*/
|
*/
|
||||||
@Excel(name = "开场白", width = 15)
|
@Excel(name = "开场白", width = 15)
|
||||||
@Schema(description = "开场白")
|
@Schema(description = "开场白")
|
||||||
private String prologue;
|
private java.lang.String prologue;
|
||||||
/**
|
/**
|
||||||
* 预设问题
|
* 预设问题
|
||||||
*/
|
*/
|
||||||
@Excel(name = "预设问题", width = 15)
|
@Excel(name = "预设问题", width = 15)
|
||||||
@Schema(description = "预设问题")
|
@Schema(description = "预设问题")
|
||||||
private String presetQuestion;
|
private java.lang.String presetQuestion;
|
||||||
/**
|
/**
|
||||||
* 提示词
|
* 提示词
|
||||||
*/
|
*/
|
||||||
@Excel(name = "提示词", width = 15)
|
@Excel(name = "提示词", width = 15)
|
||||||
@Schema(description = "提示词")
|
@Schema(description = "提示词")
|
||||||
private String prompt;
|
private java.lang.String prompt;
|
||||||
/**
|
/**
|
||||||
* 模型配置
|
* 模型配置
|
||||||
*/
|
*/
|
||||||
@Excel(name = "模型配置", width = 15, dictTable = "airag_model where model_type = 'LLM' ", dicText = "name", dicCode = "id")
|
@Excel(name = "模型配置", width = 15, dictTable = "airag_model where model_type = 'LLM' ", dicText = "name", dicCode = "id")
|
||||||
@Dict(dictTable = "airag_model where model_type = 'LLM' ", dicText = "name", dicCode = "id")
|
@Dict(dictTable = "airag_model where model_type = 'LLM' ", dicText = "name", dicCode = "id")
|
||||||
@Schema(description = "模型配置")
|
@Schema(description = "模型配置")
|
||||||
private String modelId;
|
private java.lang.String modelId;
|
||||||
/**
|
/**
|
||||||
* 历史消息数
|
* 历史消息数
|
||||||
*/
|
*/
|
||||||
@Excel(name = "历史消息数", width = 15)
|
@Excel(name = "历史消息数", width = 15)
|
||||||
@Schema(description = "历史消息数")
|
@Schema(description = "历史消息数")
|
||||||
private Integer msgNum;
|
private java.lang.Integer msgNum;
|
||||||
/**
|
/**
|
||||||
* 知识库
|
* 知识库
|
||||||
*/
|
*/
|
||||||
@Excel(name = "知识库", width = 15, dictTable = "airag_knowledge where status = 'enable'", dicText = "name", dicCode = "id")
|
@Excel(name = "知识库", width = 15, dictTable = "airag_knowledge where status = 'enable'", dicText = "name", dicCode = "id")
|
||||||
@Dict(dictTable = "airag_knowledge where status = 'enable'", dicText = "name", dicCode = "id")
|
@Dict(dictTable = "airag_knowledge where status = 'enable'", dicText = "name", dicCode = "id")
|
||||||
@Schema(description = "知识库")
|
@Schema(description = "知识库")
|
||||||
private String knowledgeIds;
|
private java.lang.String knowledgeIds;
|
||||||
/**
|
/**
|
||||||
* 流程
|
* 流程
|
||||||
*/
|
*/
|
||||||
@Excel(name = "流程", width = 15, dictTable = "airag_flow where status = 'enable' ", dicText = "name", dicCode = "id")
|
@Excel(name = "流程", width = 15, dictTable = "airag_flow where status = 'enable' ", dicText = "name", dicCode = "id")
|
||||||
@Dict(dictTable = "airag_flow where status = 'enable' ", dicText = "name", dicCode = "id")
|
@Dict(dictTable = "airag_flow where status = 'enable' ", dicText = "name", dicCode = "id")
|
||||||
@Schema(description = "流程")
|
@Schema(description = "流程")
|
||||||
private String flowId;
|
private java.lang.String flowId;
|
||||||
/**
|
/**
|
||||||
* 快捷指令
|
* 快捷指令
|
||||||
*/
|
*/
|
||||||
@Excel(name = "快捷指令", width = 15)
|
@Excel(name = "快捷指令", width = 15)
|
||||||
@Schema(description = "快捷指令")
|
@Schema(description = "快捷指令")
|
||||||
private String quickCommand;
|
private java.lang.String quickCommand;
|
||||||
/**
|
/**
|
||||||
* 状态
|
* 状态(enable=启用、disable=禁用、release=发布)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "状态", width = 15)
|
@Excel(name = "状态", width = 15)
|
||||||
@Schema(description = "状态")
|
@Schema(description = "状态")
|
||||||
private String status;
|
private java.lang.String status;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -164,7 +165,7 @@ public class AiragApp implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "元数据", width = 15)
|
@Excel(name = "元数据", width = 15)
|
||||||
@Schema(description = "元数据")
|
@Schema(description = "元数据")
|
||||||
private String metadata;
|
private java.lang.String metadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 知识库ids
|
* 知识库ids
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.jeecg.modules.airag.app.mapper;
|
package org.jeecg.modules.airag.app.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.jeecg.modules.airag.app.entity.AiragApp;
|
import org.jeecg.modules.airag.app.entity.AiragApp;
|
||||||
|
|
||||||
@ -11,4 +12,14 @@ import org.jeecg.modules.airag.app.entity.AiragApp;
|
|||||||
*/
|
*/
|
||||||
public interface AiragAppMapper extends BaseMapper<AiragApp> {
|
public interface AiragAppMapper extends BaseMapper<AiragApp> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询app信息(忽略租户)
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/21 16:03
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
AiragApp getByIdIgnoreTenant(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,4 +2,8 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.jeecg.modules.airag.app.mapper.AiragAppMapper">
|
<mapper namespace="org.jeecg.modules.airag.app.mapper.AiragAppMapper">
|
||||||
|
|
||||||
|
<select id="getByIdIgnoreTenant" resultType="org.jeecg.modules.airag.app.entity.AiragApp">
|
||||||
|
SELECT * FROM airag_app WHERE id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -92,4 +92,14 @@ public interface IAiragChatService {
|
|||||||
* @date 2025/3/3 19:49
|
* @date 2025/3/3 19:49
|
||||||
*/
|
*/
|
||||||
Result<?> clearMessage(String conversationId);
|
Result<?> clearMessage(String conversationId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化聊天(忽略租户)
|
||||||
|
* [QQYUN-12113]分享之后的聊天,应用、模型、知识库不根据租户查询
|
||||||
|
* @param appId
|
||||||
|
* @return
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/21 14:17
|
||||||
|
*/
|
||||||
|
Result<?> initChat(String appId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import org.jeecg.common.system.util.JwtUtil;
|
|||||||
import org.jeecg.common.util.*;
|
import org.jeecg.common.util.*;
|
||||||
import org.jeecg.modules.airag.app.consts.AiAppConsts;
|
import org.jeecg.modules.airag.app.consts.AiAppConsts;
|
||||||
import org.jeecg.modules.airag.app.entity.AiragApp;
|
import org.jeecg.modules.airag.app.entity.AiragApp;
|
||||||
|
import org.jeecg.modules.airag.app.mapper.AiragAppMapper;
|
||||||
import org.jeecg.modules.airag.app.service.IAiragAppService;
|
import org.jeecg.modules.airag.app.service.IAiragAppService;
|
||||||
import org.jeecg.modules.airag.app.service.IAiragChatService;
|
import org.jeecg.modules.airag.app.service.IAiragChatService;
|
||||||
import org.jeecg.modules.airag.app.vo.AppDebugParams;
|
import org.jeecg.modules.airag.app.vo.AppDebugParams;
|
||||||
@ -37,7 +38,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
@ -63,7 +64,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
RedisTemplate redisTemplate;
|
RedisTemplate redisTemplate;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IAiragAppService airagAppService;
|
AiragAppMapper airagAppMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IAiragFlowService airagFlowService;
|
IAiragFlowService airagFlowService;
|
||||||
@ -85,7 +86,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
// 获取app信息
|
// 获取app信息
|
||||||
AiragApp app = null;
|
AiragApp app = null;
|
||||||
if (oConvertUtils.isNotEmpty(chatSendParams.getAppId())) {
|
if (oConvertUtils.isNotEmpty(chatSendParams.getAppId())) {
|
||||||
app = airagAppService.getById(chatSendParams.getAppId());
|
app = airagAppMapper.getByIdIgnoreTenant(chatSendParams.getAppId());
|
||||||
}
|
}
|
||||||
ChatConversation chatConversation = getOrCreateChatConversation(app, conversationId);
|
ChatConversation chatConversation = getOrCreateChatConversation(app, conversationId);
|
||||||
// 更新标题
|
// 更新标题
|
||||||
@ -146,13 +147,19 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
try {
|
try {
|
||||||
// 发送完成事件
|
// 发送完成事件
|
||||||
emitter.send(SseEmitter.event().data(eventData));
|
emitter.send(SseEmitter.event().data(eventData));
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
log.error("终止会话时发生错误", e);
|
log.error("终止会话时发生错误", e);
|
||||||
|
try {
|
||||||
|
// 防止异常冒泡
|
||||||
|
emitter.completeWithError(e);
|
||||||
|
} catch (Exception ignore) {}
|
||||||
} finally {
|
} finally {
|
||||||
// 从缓存中移除emitter
|
// 从缓存中移除emitter
|
||||||
AiragLocalCache.remove(AiragConsts.CACHE_TYPE_SSE, eventData.getRequestId());
|
AiragLocalCache.remove(AiragConsts.CACHE_TYPE_SSE, eventData.getRequestId());
|
||||||
// 关闭emitter
|
// 关闭emitter
|
||||||
|
try {
|
||||||
emitter.complete();
|
emitter.complete();
|
||||||
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,6 +244,12 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<?> initChat(String appId) {
|
||||||
|
AiragApp app = airagAppMapper.getByIdIgnoreTenant(appId);
|
||||||
|
return Result.ok(app);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<?> deleteConversation(String conversationId) {
|
public Result<?> deleteConversation(String conversationId) {
|
||||||
AssertUtils.assertNotEmpty("请选择要删除的会话", conversationId);
|
AssertUtils.assertNotEmpty("请选择要删除的会话", conversationId);
|
||||||
@ -414,8 +427,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
case AiragConsts.MESSAGE_ROLE_USER:
|
case AiragConsts.MESSAGE_ROLE_USER:
|
||||||
List<Content> contents = new ArrayList<>();
|
List<Content> contents = new ArrayList<>();
|
||||||
List<MessageHistory.ImageHistory> images = history.getImages();
|
List<MessageHistory.ImageHistory> images = history.getImages();
|
||||||
if (oConvertUtils.isObjectNotEmpty(images)
|
if (oConvertUtils.isObjectNotEmpty(images) && !images.isEmpty()) {
|
||||||
&& !images.isEmpty()) {
|
|
||||||
contents.addAll(images.stream().map(imageHistory -> {
|
contents.addAll(images.stream().map(imageHistory -> {
|
||||||
if (oConvertUtils.isNotEmpty(imageHistory.getUrl())) {
|
if (oConvertUtils.isNotEmpty(imageHistory.getUrl())) {
|
||||||
return ImageContent.from(imageHistory.getUrl());
|
return ImageContent.from(imageHistory.getUrl());
|
||||||
@ -452,8 +464,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
* @author chenrui
|
* @author chenrui
|
||||||
* @date 2025/2/25 19:05
|
* @date 2025/2/25 19:05
|
||||||
*/
|
*/
|
||||||
private void appendMessage(List<ChatMessage> messages, ChatMessage message, ChatConversation
|
private void appendMessage(List<ChatMessage> messages, ChatMessage message, ChatConversation chatConversation, String topicId) {
|
||||||
chatConversation, String topicId) {
|
|
||||||
|
|
||||||
if (message.type().equals(ChatMessageType.SYSTEM)) {
|
if (message.type().equals(ChatMessageType.SYSTEM)) {
|
||||||
// 系统消息,放到消息列表最前面,并且不记录历史
|
// 系统消息,放到消息列表最前面,并且不记录历史
|
||||||
@ -467,11 +478,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
histories = new ArrayList<>();
|
histories = new ArrayList<>();
|
||||||
}
|
}
|
||||||
// 消息记录
|
// 消息记录
|
||||||
MessageHistory historyMessage = MessageHistory.builder()
|
MessageHistory historyMessage = MessageHistory.builder().conversationId(chatConversation.getId()).topicId(topicId).datetime(DateUtils.now()).build();
|
||||||
.conversationId(chatConversation.getId())
|
|
||||||
.topicId(topicId)
|
|
||||||
.datetime(DateUtils.now())
|
|
||||||
.build();
|
|
||||||
if (message.type().equals(ChatMessageType.USER)) {
|
if (message.type().equals(ChatMessageType.USER)) {
|
||||||
historyMessage.setRole(AiragConsts.MESSAGE_ROLE_USER);
|
historyMessage.setRole(AiragConsts.MESSAGE_ROLE_USER);
|
||||||
StringBuilder textContent = new StringBuilder();
|
StringBuilder textContent = new StringBuilder();
|
||||||
@ -516,8 +523,21 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
// 每次会话都生成一个新的,用来缓存emitter
|
// 每次会话都生成一个新的,用来缓存emitter
|
||||||
String requestId = UUIDGenerator.generate();
|
String requestId = UUIDGenerator.generate();
|
||||||
SseEmitter emitter = new SseEmitter(-0L);
|
SseEmitter emitter = new SseEmitter(-0L);
|
||||||
|
emitter.onError(throwable -> {
|
||||||
|
log.warn("SEE向客户端发送消息失败: {}", throwable.getMessage());
|
||||||
|
AiragLocalCache.remove(AiragConsts.CACHE_TYPE_SSE, requestId);
|
||||||
|
try {
|
||||||
|
emitter.complete();
|
||||||
|
} catch (Exception ignore) {}
|
||||||
|
});
|
||||||
|
EventData eventRequestId = new EventData(requestId, null, EventData.EVENT_INIT_REQUEST_ID, chatConversation.getId(), topicId);
|
||||||
|
eventRequestId.setData(EventMessageData.builder().message("").build());
|
||||||
|
sendMessage2Client(emitter, eventRequestId);
|
||||||
// 缓存emitter
|
// 缓存emitter
|
||||||
AiragLocalCache.put(AiragConsts.CACHE_TYPE_SSE, requestId, emitter);
|
AiragLocalCache.put(AiragConsts.CACHE_TYPE_SSE, requestId, emitter);
|
||||||
|
// 缓存开始发送时间
|
||||||
|
log.info("[AI-CHAT]开始发送消息,requestId:{}", requestId);
|
||||||
|
AiragLocalCache.put(AiragConsts.CACHE_TYPE_SSE_SEND_TIME, requestId, System.currentTimeMillis());
|
||||||
try {
|
try {
|
||||||
// 组装用户消息
|
// 组装用户消息
|
||||||
UserMessage userMessage = aiChatHandler.buildUserMessage(sendParams.getContent(), sendParams.getImages());
|
UserMessage userMessage = aiChatHandler.buildUserMessage(sendParams.getContent(), sendParams.getImages());
|
||||||
@ -589,7 +609,12 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
SseEmitter emitter = AiragLocalCache.get(AiragConsts.CACHE_TYPE_SSE, requestId);
|
SseEmitter emitter = AiragLocalCache.get(AiragConsts.CACHE_TYPE_SSE, requestId);
|
||||||
flowRunParams.setEventCallback(eventData -> {
|
flowRunParams.setEventCallback(eventData -> {
|
||||||
if (EventData.EVENT_FLOW_FINISHED.equals(eventData.getEvent())) {
|
if (EventData.EVENT_FLOW_FINISHED.equals(eventData.getEvent())) {
|
||||||
|
// 打印耗时日志
|
||||||
|
printChatDuration(requestId, "流程执行完毕");
|
||||||
|
// 已经执行完了,删除时间缓存
|
||||||
|
AiragLocalCache.remove(AiragConsts.CACHE_TYPE_SSE_SEND_TIME, requestId);
|
||||||
EventFlowData data = (EventFlowData) eventData.getData();
|
EventFlowData data = (EventFlowData) eventData.getData();
|
||||||
|
if(data.isSuccess()) {
|
||||||
Object outputs = data.getOutputs();
|
Object outputs = data.getOutputs();
|
||||||
if (oConvertUtils.isObjectNotEmpty(outputs)) {
|
if (oConvertUtils.isObjectNotEmpty(outputs)) {
|
||||||
AiMessage aiMessage;
|
AiMessage aiMessage;
|
||||||
@ -602,23 +627,33 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
aiMessage = new AiMessage(JSONObject.toJSONString(outputs));
|
aiMessage = new AiMessage(JSONObject.toJSONString(outputs));
|
||||||
}
|
}
|
||||||
EventData msgEventData = new EventData(requestId, null, EventData.EVENT_MESSAGE, chatConversation.getId(), topicId);
|
EventData msgEventData = new EventData(requestId, null, EventData.EVENT_MESSAGE, chatConversation.getId(), topicId);
|
||||||
EventMessageData messageEventData = EventMessageData.builder()
|
EventMessageData messageEventData = EventMessageData.builder().message(aiMessage.text()).build();
|
||||||
.message(aiMessage.text())
|
|
||||||
.build();
|
|
||||||
msgEventData.setData(messageEventData);
|
msgEventData.setData(messageEventData);
|
||||||
try {
|
msgEventData.setRequestId(requestId);
|
||||||
String eventStr = JSONObject.toJSONString(msgEventData);
|
sendMessage2Client(emitter, msgEventData);
|
||||||
log.debug("[AI应用]接收FLOW返回消息:{}", eventStr);
|
|
||||||
emitter.send(SseEmitter.event().data(eventStr));
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
appendMessage(messages, aiMessage, chatConversation, topicId);
|
appendMessage(messages, aiMessage, chatConversation, topicId);
|
||||||
// 保存会话
|
// 保存会话
|
||||||
saveChatConversation(chatConversation, false, httpRequest);
|
saveChatConversation(chatConversation, false, httpRequest);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
//update-begin---author:chenrui ---date:20250425 for:[QQYUN-12203]AI 聊天,超时或者服务器报错,给个友好提示------------
|
||||||
|
// 失败
|
||||||
|
String message = data.getMessage();
|
||||||
|
if (message != null && message.contains(FlowConsts.FLOW_ERROR_MSG_LLM_TIMEOUT)) {
|
||||||
|
message = "当前用户较多,排队中,请稍后再试!";
|
||||||
|
EventData errEventData = new EventData(requestId, null, EventData.EVENT_MESSAGE, chatConversation.getId(), topicId);
|
||||||
|
errEventData.setData(EventMessageData.builder().message("\n" + message).build());
|
||||||
|
sendMessage2Client(emitter, errEventData);
|
||||||
|
errEventData = new EventData(requestId, null, EventData.EVENT_MESSAGE_END, chatConversation.getId(), topicId);
|
||||||
|
// 如果是超时,主动关闭SSE,防止流程切面中返回异常消息导致前端不能正常展示上面的{普通消息}.
|
||||||
|
closeSSE(emitter, errEventData);
|
||||||
|
}
|
||||||
|
//update-end---author:chenrui ---date:20250425 for:[QQYUN-12203]AI 聊天,超时或者服务器报错,给个友好提示------------
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 打印流程耗时日志
|
||||||
|
printChatDuration(requestId, "开始执行流程");
|
||||||
airagFlowService.runFlow(flowRunParams);
|
airagFlowService.runFlow(flowRunParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -654,19 +689,21 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
aiChatParams.setTemperature(metadata.getDouble("temperature"));
|
aiChatParams.setTemperature(metadata.getDouble("temperature"));
|
||||||
}
|
}
|
||||||
if (metadata.containsKey("topP")) {
|
if (metadata.containsKey("topP")) {
|
||||||
aiChatParams.setTopP(metadata.getDouble("temperature"));
|
aiChatParams.setTopP(metadata.getDouble("topP"));
|
||||||
}
|
}
|
||||||
if (metadata.containsKey("presencePenalty")) {
|
if (metadata.containsKey("presencePenalty")) {
|
||||||
aiChatParams.setPresencePenalty(metadata.getDouble("temperature"));
|
aiChatParams.setPresencePenalty(metadata.getDouble("presencePenalty"));
|
||||||
}
|
}
|
||||||
if (metadata.containsKey("frequencyPenalty")) {
|
if (metadata.containsKey("frequencyPenalty")) {
|
||||||
aiChatParams.setFrequencyPenalty(metadata.getDouble("temperature"));
|
aiChatParams.setFrequencyPenalty(metadata.getDouble("frequencyPenalty"));
|
||||||
}
|
}
|
||||||
if (metadata.containsKey("maxTokens")) {
|
if (metadata.containsKey("maxTokens")) {
|
||||||
aiChatParams.setMaxTokens(metadata.getInteger("temperature"));
|
aiChatParams.setMaxTokens(metadata.getInteger("maxTokens"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 打印流程耗时日志
|
||||||
|
printChatDuration(requestId, "构造应用自定义参数完成");
|
||||||
// 发消息
|
// 发消息
|
||||||
sendWithDefault(requestId, chatConversation, topicId, modelId, messages, aiChatParams);
|
sendWithDefault(requestId, chatConversation, topicId, modelId, messages, aiChatParams);
|
||||||
}
|
}
|
||||||
@ -683,8 +720,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
* @author chenrui
|
* @author chenrui
|
||||||
* @date 2025/2/25 19:24
|
* @date 2025/2/25 19:24
|
||||||
*/
|
*/
|
||||||
private void sendWithDefault(String requestId, ChatConversation chatConversation, String topicId, String modelId,
|
private void sendWithDefault(String requestId, ChatConversation chatConversation, String topicId, String modelId, List<ChatMessage> messages, AIChatParams aiChatParams) {
|
||||||
List<ChatMessage> messages,AIChatParams aiChatParams) {
|
|
||||||
// 调用ai聊天
|
// 调用ai聊天
|
||||||
if (null == aiChatParams) {
|
if (null == aiChatParams) {
|
||||||
aiChatParams = new AIChatParams();
|
aiChatParams = new AIChatParams();
|
||||||
@ -694,6 +730,8 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
HttpServletRequest httpRequest = SpringContextUtils.getHttpServletRequest();
|
HttpServletRequest httpRequest = SpringContextUtils.getHttpServletRequest();
|
||||||
TokenStream chatStream;
|
TokenStream chatStream;
|
||||||
try {
|
try {
|
||||||
|
// 打印流程耗时日志
|
||||||
|
printChatDuration(requestId, "开始向LLM发送消息");
|
||||||
if (oConvertUtils.isNotEmpty(modelId)) {
|
if (oConvertUtils.isNotEmpty(modelId)) {
|
||||||
chatStream = aiChatHandler.chat(modelId, messages, aiChatParams);
|
chatStream = aiChatHandler.chat(modelId, messages, aiChatParams);
|
||||||
} else {
|
} else {
|
||||||
@ -724,25 +762,20 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EventData eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE, chatConversation.getId(), topicId);
|
EventData eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE, chatConversation.getId(), topicId);
|
||||||
EventMessageData messageEventData = EventMessageData.builder()
|
EventMessageData messageEventData = EventMessageData.builder().message(resMessage).build();
|
||||||
.message(resMessage)
|
|
||||||
.build();
|
|
||||||
eventData.setData(messageEventData);
|
eventData.setData(messageEventData);
|
||||||
|
eventData.setRequestId(requestId);
|
||||||
// sse
|
// sse
|
||||||
SseEmitter emitter = AiragLocalCache.get(AiragConsts.CACHE_TYPE_SSE, requestId);
|
SseEmitter emitter = AiragLocalCache.get(AiragConsts.CACHE_TYPE_SSE, requestId);
|
||||||
if (null == emitter) {
|
if (null == emitter) {
|
||||||
log.warn("[AI应用]接收LLM返回会话已关闭");
|
log.warn("[AI应用]接收LLM返回会话已关闭");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
sendMessage2Client(emitter, eventData);
|
||||||
String eventStr = JSONObject.toJSONString(eventData);
|
}).onComplete((responseMessage) -> {
|
||||||
log.debug("[AI应用]接收LLM返回消息:{}", eventStr);
|
// 打印流程耗时日志
|
||||||
emitter.send(SseEmitter.event().data(eventStr));
|
printChatDuration(requestId, "LLM输出消息完成");
|
||||||
} catch (IOException e) {
|
AiragLocalCache.remove(AiragConsts.CACHE_TYPE_SSE_SEND_TIME, requestId);
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.onComplete((responseMessage) -> {
|
|
||||||
// 记录ai的回复
|
// 记录ai的回复
|
||||||
AiMessage aiMessage = responseMessage.content();
|
AiMessage aiMessage = responseMessage.content();
|
||||||
FinishReason finishReason = responseMessage.finishReason();
|
FinishReason finishReason = responseMessage.finishReason();
|
||||||
@ -756,12 +789,6 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
if (FinishReason.STOP.equals(finishReason) || null == finishReason) {
|
if (FinishReason.STOP.equals(finishReason) || null == finishReason) {
|
||||||
// 正常结束
|
// 正常结束
|
||||||
EventData eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE_END, chatConversation.getId(), topicId);
|
EventData eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE_END, chatConversation.getId(), topicId);
|
||||||
try {
|
|
||||||
log.debug("[AI应用]接收LLM返回消息完成:{}", respText);
|
|
||||||
emitter.send(SseEmitter.event().data(eventData));
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
appendMessage(messages, aiMessage, chatConversation, topicId);
|
appendMessage(messages, aiMessage, chatConversation, topicId);
|
||||||
// 保存会话
|
// 保存会话
|
||||||
saveChatConversation(chatConversation, false, httpRequest);
|
saveChatConversation(chatConversation, false, httpRequest);
|
||||||
@ -769,6 +796,14 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
} else if (FinishReason.TOOL_EXECUTION.equals(finishReason)) {
|
} else if (FinishReason.TOOL_EXECUTION.equals(finishReason)) {
|
||||||
// 需要执行工具
|
// 需要执行工具
|
||||||
// TODO author: chenrui for: date:2025/3/7
|
// TODO author: chenrui for: date:2025/3/7
|
||||||
|
} else if (FinishReason.LENGTH.equals(finishReason)) {
|
||||||
|
// 上下文长度超过限制
|
||||||
|
log.error("调用模型异常:上下文长度超过限制:{}", responseMessage.tokenUsage());
|
||||||
|
EventData eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE, chatConversation.getId(), topicId);
|
||||||
|
eventData.setData(EventMessageData.builder().message("\n上下文长度超过限制,请调整模型最大Tokens").build());
|
||||||
|
sendMessage2Client(emitter, eventData);
|
||||||
|
eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE_END, chatConversation.getId(), topicId);
|
||||||
|
closeSSE(emitter, eventData);
|
||||||
} else {
|
} else {
|
||||||
// 异常结束
|
// 异常结束
|
||||||
log.error("调用模型异常:" + respText);
|
log.error("调用模型异常:" + respText);
|
||||||
@ -779,21 +814,53 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
eventData.setData(EventFlowData.builder().success(false).message(respText).build());
|
eventData.setData(EventFlowData.builder().success(false).message(respText).build());
|
||||||
closeSSE(emitter, eventData);
|
closeSSE(emitter, eventData);
|
||||||
}
|
}
|
||||||
})
|
}).onError((Throwable error) -> {
|
||||||
.onError((Throwable error) -> {
|
// 打印流程耗时日志
|
||||||
|
printChatDuration(requestId, "LLM输出消息异常");
|
||||||
|
AiragLocalCache.remove(AiragConsts.CACHE_TYPE_SSE_SEND_TIME, requestId);
|
||||||
// sse
|
// sse
|
||||||
SseEmitter emitter = AiragLocalCache.get(AiragConsts.CACHE_TYPE_SSE, requestId);
|
SseEmitter emitter = AiragLocalCache.get(AiragConsts.CACHE_TYPE_SSE, requestId);
|
||||||
if (null == emitter) {
|
if (null == emitter) {
|
||||||
log.warn("[AI应用]接收LLM返回会话已关闭");
|
log.warn("[AI应用]接收LLM返回会话已关闭{}", requestId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String errMsg = "调用大模型接口失败:" + error.getMessage();
|
log.error(error.getMessage(), error);
|
||||||
log.error(errMsg, error);
|
String errMsg = error.getMessage();
|
||||||
|
if (errMsg != null && errMsg.contains("timeout")) {
|
||||||
|
//update-begin---author:chenrui ---date:20250425 for:[QQYUN-12203]AI 聊天,超时或者服务器报错,给个友好提示------------
|
||||||
|
errMsg = "当前用户较多,排队中,请稍后再试!";
|
||||||
|
EventData eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE, chatConversation.getId(), topicId);
|
||||||
|
eventData.setData(EventMessageData.builder().message("\n" + errMsg).build());
|
||||||
|
sendMessage2Client(emitter, eventData);
|
||||||
|
eventData = new EventData(requestId, null, EventData.EVENT_MESSAGE_END, chatConversation.getId(), topicId);
|
||||||
|
closeSSE(emitter, eventData);
|
||||||
|
//update-end---author:chenrui ---date:20250425 for:[QQYUN-12203]AI 聊天,超时或者服务器报错,给个友好提示------------
|
||||||
|
} else {
|
||||||
|
errMsg = "调用大模型接口失败,详情请查看后台日志。";
|
||||||
EventData eventData = new EventData(requestId, null, EventData.EVENT_FLOW_ERROR, chatConversation.getId(), topicId);
|
EventData eventData = new EventData(requestId, null, EventData.EVENT_FLOW_ERROR, chatConversation.getId(), topicId);
|
||||||
eventData.setData(EventFlowData.builder().success(false).message(errMsg).build());
|
eventData.setData(EventFlowData.builder().success(false).message(errMsg).build());
|
||||||
closeSSE(emitter, eventData);
|
closeSSE(emitter, eventData);
|
||||||
})
|
}
|
||||||
.start();
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息到客户端
|
||||||
|
*
|
||||||
|
* @param emitter
|
||||||
|
* @param eventData
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/22 19:58
|
||||||
|
*/
|
||||||
|
private static void sendMessage2Client(SseEmitter emitter, EventData eventData) {
|
||||||
|
try {
|
||||||
|
log.info("发送消息:{}", eventData.getRequestId());
|
||||||
|
String eventStr = JSONObject.toJSONString(eventData);
|
||||||
|
log.debug("[AI应用]接收LLM返回消息:{}", eventStr);
|
||||||
|
emitter.send(SseEmitter.event().data(eventStr));
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("发送消息失败", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -837,12 +904,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
}
|
}
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
List<ChatMessage> messages = new LinkedList<>();
|
List<ChatMessage> messages = new LinkedList<>();
|
||||||
String systemMsgStr = "根据用户的问题,总结会话标题.\n" +
|
String systemMsgStr = "根据用户的问题,总结会话标题.\n" + "要求如下:\n" + "1. 使用中文回答.\n" + "2. 标题长度控制在5个汉字10个英文字符以内\n" + "3. 直接回复会话标题,不要有其他任何无关描述\n" + "4. 如果无法总结,回复不知道\n";
|
||||||
"要求如下:\n" +
|
|
||||||
"1. 使用中文回答.\n" +
|
|
||||||
"2. 标题长度控制在5个汉字10个英文字符以内\n" +
|
|
||||||
"3. 直接回复会话标题,不要有其他任何无关描述\n" +
|
|
||||||
"4. 如果无法总结,回复不知道\n";
|
|
||||||
messages.add(new SystemMessage(systemMsgStr));
|
messages.add(new SystemMessage(systemMsgStr));
|
||||||
messages.add(new UserMessage(question));
|
messages.add(new UserMessage(question));
|
||||||
String summaryTitle;
|
String summaryTitle;
|
||||||
@ -876,6 +938,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户名
|
* 获取用户名
|
||||||
|
*
|
||||||
* @param httpRequest
|
* @param httpRequest
|
||||||
* @return
|
* @return
|
||||||
* @author chenrui
|
* @author chenrui
|
||||||
@ -898,4 +961,19 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印耗时
|
||||||
|
* @param requestId
|
||||||
|
* @param message
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/28 15:15
|
||||||
|
*/
|
||||||
|
private static void printChatDuration(String requestId,String message) {
|
||||||
|
Long beginTime = AiragLocalCache.get(AiragConsts.CACHE_TYPE_SSE_SEND_TIME, requestId);
|
||||||
|
if (null != beginTime) {
|
||||||
|
log.info("[AI-CHAT]{},requestId:{},耗时:{}s", message, requestId, (System.currentTimeMillis() - beginTime) / 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package org.jeecg.modules.airag.demo;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.exception.JeecgBootBizTipException;
|
||||||
|
import org.jeecg.modules.airag.flow.component.enhance.IAiRagEnhanceJava;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Java增强Demo: Excel数据读取器
|
||||||
|
* for [QQYUN-11718]【AI】积木报表对接AI流程编排接口展示报表
|
||||||
|
* @Author: chenrui
|
||||||
|
* @Date: 2025/4/29 16:51
|
||||||
|
*/
|
||||||
|
@Component("jimuDataReader")
|
||||||
|
@Slf4j
|
||||||
|
public class JimuDataReader implements IAiRagEnhanceJava {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> process(Map<String, Object> inputParams) {
|
||||||
|
// inputParams: {"bizData":"/xxxx/xxxx/xxxx/xxxx.xls"}
|
||||||
|
try {
|
||||||
|
String filePath = (String) inputParams.get("bizData");
|
||||||
|
if (filePath == null || filePath.isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("File path is empty");
|
||||||
|
}
|
||||||
|
|
||||||
|
File excelFile = new File(filePath);
|
||||||
|
if (!excelFile.exists() || !excelFile.isFile()) {
|
||||||
|
throw new IllegalArgumentException("File not found: " + filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Since we don't know the target entity class, we'll read the Excel generically
|
||||||
|
return readExcelData(excelFile);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Error processing Excel file", e);
|
||||||
|
throw new JeecgBootBizTipException("调用java增强失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Excel导入工具方法,基于ExcelImportUtil
|
||||||
|
*
|
||||||
|
* @param file Excel文件
|
||||||
|
* @return Excel读取结果,包含字段和数据
|
||||||
|
* @throws Exception 导入过程中的异常
|
||||||
|
*/
|
||||||
|
public static Map<String, Object> readExcelData(File file) throws Exception {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
|
||||||
|
// 设置导入参数
|
||||||
|
ImportParams params = new ImportParams();
|
||||||
|
params.setTitleRows(0); // 没有标题
|
||||||
|
params.setHeadRows(1); // 第一行是表头
|
||||||
|
|
||||||
|
// 读取Excel数据
|
||||||
|
List<Map<String, Object>> dataList = ExcelImportUtil.importExcel(file, Map.class, params);
|
||||||
|
|
||||||
|
// 如果没有数据,返回空结果
|
||||||
|
if (dataList == null || dataList.isEmpty()) {
|
||||||
|
result.put("fields", new ArrayList<>());
|
||||||
|
result.put("datas", new ArrayList<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从第一行数据中获取字段名
|
||||||
|
List<String> fieldNames = new ArrayList<>(dataList.get(0).keySet());
|
||||||
|
|
||||||
|
result.put("fields", fieldNames);
|
||||||
|
result.put("datas", dataList);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package org.jeecg.modules.airag.demo;
|
||||||
|
|
||||||
|
import org.jeecg.modules.airag.flow.component.enhance.IAiRagEnhanceJava;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: Java增强节点示例类
|
||||||
|
* @Author: chenrui
|
||||||
|
* @Date: 2025/3/6 11:42
|
||||||
|
*/
|
||||||
|
@Component("testAiragEnhance")
|
||||||
|
public class TestAiragEnhance implements IAiRagEnhanceJava {
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> process(Map<String, Object> inputParams) {
|
||||||
|
Object arg1 = inputParams.get("arg1");
|
||||||
|
Object arg2 = inputParams.get("arg2");
|
||||||
|
return Collections.singletonMap("result",arg1.toString()+"java拼接"+arg2.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -35,6 +35,11 @@ public class LLMConsts {
|
|||||||
*/
|
*/
|
||||||
public static final String MODEL_TYPE_LLM = "LLM";
|
public static final String MODEL_TYPE_LLM = "LLM";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向量模型:默认维度
|
||||||
|
*/
|
||||||
|
public static final Integer EMBED_MODEL_DEFAULT_DIMENSION = 1536;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 知识库:文档状态:草稿
|
* 知识库:文档状态:草稿
|
||||||
*/
|
*/
|
||||||
@ -47,7 +52,10 @@ public class LLMConsts {
|
|||||||
* 知识库:文档状态:构建完成
|
* 知识库:文档状态:构建完成
|
||||||
*/
|
*/
|
||||||
public static final String KNOWLEDGE_DOC_STATUS_COMPLETE = "complete";
|
public static final String KNOWLEDGE_DOC_STATUS_COMPLETE = "complete";
|
||||||
|
/**
|
||||||
|
* 知识库:文档状态:构建失败
|
||||||
|
*/
|
||||||
|
public static final String KNOWLEDGE_DOC_STATUS_FAILED = "failed";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 知识库:文档类型:文本
|
* 知识库:文档类型:文本
|
||||||
|
|||||||
@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.util.AssertUtils;
|
import org.jeecg.common.util.AssertUtils;
|
||||||
|
import org.jeecg.common.util.TokenUtils;
|
||||||
|
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
import org.jeecg.modules.airag.common.vo.knowledge.KnowledgeSearchResult;
|
import org.jeecg.modules.airag.common.vo.knowledge.KnowledgeSearchResult;
|
||||||
import org.jeecg.modules.airag.llm.consts.LLMConsts;
|
import org.jeecg.modules.airag.llm.consts.LLMConsts;
|
||||||
import org.jeecg.modules.airag.llm.entity.AiragKnowledge;
|
import org.jeecg.modules.airag.llm.entity.AiragKnowledge;
|
||||||
@ -19,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -74,6 +77,7 @@ public class AiragKnowledgeController {
|
|||||||
* @date 2025/2/18 17:09
|
* @date 2025/2/18 17:09
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
|
@RequiresPermissions("airag:knowledge:add")
|
||||||
public Result<String> add(@RequestBody AiragKnowledge airagKnowledge) {
|
public Result<String> add(@RequestBody AiragKnowledge airagKnowledge) {
|
||||||
airagKnowledge.setStatus(LLMConsts.STATUS_ENABLE);
|
airagKnowledge.setStatus(LLMConsts.STATUS_ENABLE);
|
||||||
airagKnowledgeService.save(airagKnowledge);
|
airagKnowledgeService.save(airagKnowledge);
|
||||||
@ -90,6 +94,7 @@ public class AiragKnowledgeController {
|
|||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
|
@RequiresPermissions("airag:knowledge:edit")
|
||||||
public Result<String> edit(@RequestBody AiragKnowledge airagKnowledge) {
|
public Result<String> edit(@RequestBody AiragKnowledge airagKnowledge) {
|
||||||
AiragKnowledge airagKnowledgeEntity = airagKnowledgeService.getById(airagKnowledge.getId());
|
AiragKnowledge airagKnowledgeEntity = airagKnowledgeService.getById(airagKnowledge.getId());
|
||||||
if (airagKnowledgeEntity == null) {
|
if (airagKnowledgeEntity == null) {
|
||||||
@ -113,6 +118,7 @@ public class AiragKnowledgeController {
|
|||||||
* @date 2025/3/12 17:05
|
* @date 2025/3/12 17:05
|
||||||
*/
|
*/
|
||||||
@PutMapping(value = "/rebuild")
|
@PutMapping(value = "/rebuild")
|
||||||
|
@RequiresPermissions("airag:knowledge:rebuild")
|
||||||
public Result<?> rebuild(@RequestParam("knowIds") String knowIds) {
|
public Result<?> rebuild(@RequestParam("knowIds") String knowIds) {
|
||||||
String[] knowIdArr = knowIds.split(",");
|
String[] knowIdArr = knowIds.split(",");
|
||||||
for (String knowId : knowIdArr) {
|
for (String knowId : knowIdArr) {
|
||||||
@ -131,29 +137,24 @@ public class AiragKnowledgeController {
|
|||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
@RequiresPermissions("airag:knowledge:delete")
|
||||||
|
public Result<String> delete(HttpServletRequest request, @RequestParam(name = "id", required = true) String id) {
|
||||||
|
//update-begin---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
|
//如果是saas隔离的情况下,判断当前租户id是否是当前租户下的
|
||||||
|
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||||
|
AiragKnowledge know = airagKnowledgeService.getById(id);
|
||||||
|
//获取当前租户
|
||||||
|
String currentTenantId = TokenUtils.getTenantIdByRequest(request);
|
||||||
|
if (null == know || !know.getTenantId().equals(currentTenantId)) {
|
||||||
|
return Result.error("删除AI知识库失败,不能删除其他租户的AI知识库!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//update-end---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
airagKnowledgeDocService.removeByKnowIds(Collections.singletonList(id));
|
airagKnowledgeDocService.removeByKnowIds(Collections.singletonList(id));
|
||||||
airagKnowledgeService.removeById(id);
|
airagKnowledgeService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除知识库
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
* @author chenrui
|
|
||||||
* @date 2025/2/18 17:09
|
|
||||||
*/
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
|
||||||
List<String> idsList = Arrays.asList(ids.split(","));
|
|
||||||
airagKnowledgeDocService.removeByKnowIds(idsList);
|
|
||||||
airagKnowledgeService.removeByIds(idsList);
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询知识库
|
* 通过id查询知识库
|
||||||
*
|
*
|
||||||
@ -203,6 +204,7 @@ public class AiragKnowledgeController {
|
|||||||
* @date 2025/2/18 15:47
|
* @date 2025/2/18 15:47
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/doc/edit")
|
@PostMapping(value = "/doc/edit")
|
||||||
|
@RequiresPermissions("airag:knowledge:doc:edit")
|
||||||
public Result<?> addDocument(@RequestBody AiragKnowledgeDoc airagKnowledgeDoc) {
|
public Result<?> addDocument(@RequestBody AiragKnowledgeDoc airagKnowledgeDoc) {
|
||||||
return airagKnowledgeDocService.editDocument(airagKnowledgeDoc);
|
return airagKnowledgeDocService.editDocument(airagKnowledgeDoc);
|
||||||
}
|
}
|
||||||
@ -215,6 +217,7 @@ public class AiragKnowledgeController {
|
|||||||
* @date 2025/3/20 11:29
|
* @date 2025/3/20 11:29
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/doc/import/zip")
|
@PostMapping(value = "/doc/import/zip")
|
||||||
|
@RequiresPermissions("airag:knowledge:doc:zip")
|
||||||
public Result<?> importDocumentFromZip(@RequestParam(name = "knowId", required = true) String knowId,
|
public Result<?> importDocumentFromZip(@RequestParam(name = "knowId", required = true) String knowId,
|
||||||
@RequestParam(name = "file", required = true) MultipartFile file) {
|
@RequestParam(name = "file", required = true) MultipartFile file) {
|
||||||
return airagKnowledgeDocService.importDocumentFromZip(knowId,file);
|
return airagKnowledgeDocService.importDocumentFromZip(knowId,file);
|
||||||
@ -241,6 +244,7 @@ public class AiragKnowledgeController {
|
|||||||
* @date 2025/2/18 15:47
|
* @date 2025/2/18 15:47
|
||||||
*/
|
*/
|
||||||
@PutMapping(value = "/doc/rebuild")
|
@PutMapping(value = "/doc/rebuild")
|
||||||
|
@RequiresPermissions("airag:knowledge:doc:rebuild")
|
||||||
public Result<?> rebuildDocument(@RequestParam("docIds") String docIds) {
|
public Result<?> rebuildDocument(@RequestParam("docIds") String docIds) {
|
||||||
return airagKnowledgeDocService.rebuildDocument(docIds);
|
return airagKnowledgeDocService.rebuildDocument(docIds);
|
||||||
}
|
}
|
||||||
@ -255,12 +259,49 @@ public class AiragKnowledgeController {
|
|||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@DeleteMapping(value = "/doc/deleteBatch")
|
@DeleteMapping(value = "/doc/deleteBatch")
|
||||||
public Result<String> deleteDocumentBatch(@RequestParam(name = "ids", required = true) String ids) {
|
@RequiresPermissions("airag:knowledge:doc:deleteBatch")
|
||||||
|
public Result<String> deleteDocumentBatch(HttpServletRequest request, @RequestParam(name = "ids", required = true) String ids) {
|
||||||
List<String> idsList = Arrays.asList(ids.split(","));
|
List<String> idsList = Arrays.asList(ids.split(","));
|
||||||
|
//update-begin---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
|
//如果是saas隔离的情况下,判断当前租户id是否是当前租户下的
|
||||||
|
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||||
|
List<AiragKnowledgeDoc> docList = airagKnowledgeDocService.listByIds(idsList);
|
||||||
|
//获取当前租户
|
||||||
|
String currentTenantId = TokenUtils.getTenantIdByRequest(request);
|
||||||
|
docList.forEach(airagKnowledgeDoc -> {
|
||||||
|
if (null == airagKnowledgeDoc || !airagKnowledgeDoc.getTenantId().equals(currentTenantId)) {
|
||||||
|
throw new IllegalArgumentException("删除AI知识库文档失败,不能删除其他租户的AI知识库文档!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//update-end---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
airagKnowledgeDocService.removeDocByIds(idsList);
|
airagKnowledgeDocService.removeDocByIds(idsList);
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空知识库文档
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@DeleteMapping(value = "/doc/deleteAll")
|
||||||
|
@RequiresPermissions("airag:knowledge:doc:deleteAll")
|
||||||
|
public Result<?> deleteDocumentAll(HttpServletRequest request, @RequestParam(name = "knowId") String knowId) {
|
||||||
|
//update-begin---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
|
//如果是saas隔离的情况下,判断当前租户id是否是当前租户下的
|
||||||
|
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||||
|
AiragKnowledge know = airagKnowledgeService.getById(knowId);
|
||||||
|
//获取当前租户
|
||||||
|
String currentTenantId = TokenUtils.getTenantIdByRequest(request);
|
||||||
|
if (null == know || !know.getTenantId().equals(currentTenantId)) {
|
||||||
|
return Result.error("删除AI知识库失败,不能删除其他租户的AI知识库!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//update-end---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
|
return airagKnowledgeDocService.deleteAllByKnowId(knowId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 命中测试
|
* 命中测试
|
||||||
|
|||||||
@ -3,20 +3,32 @@ package org.jeecg.modules.airag.llm.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import dev.langchain4j.data.message.UserMessage;
|
||||||
|
import dev.langchain4j.model.embedding.EmbeddingModel;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.jeecg.ai.factory.AiModelFactory;
|
||||||
|
import org.jeecg.ai.factory.AiModelOptions;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.AssertUtils;
|
||||||
|
import org.jeecg.common.util.TokenUtils;
|
||||||
|
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
|
import org.jeecg.modules.airag.llm.consts.LLMConsts;
|
||||||
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
||||||
|
import org.jeecg.modules.airag.llm.handler.AIChatHandler;
|
||||||
|
import org.jeecg.modules.airag.llm.handler.EmbeddingHandler;
|
||||||
import org.jeecg.modules.airag.llm.service.IAiragModelService;
|
import org.jeecg.modules.airag.llm.service.IAiragModelService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: AiRag模型配置
|
* @Description: AiRag模型配置
|
||||||
@ -32,6 +44,8 @@ public class AiragModelController extends JeecgController<AiragModel, IAiragMode
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IAiragModelService airagModelService;
|
private IAiragModelService airagModelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
AIChatHandler aiChatHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@ -57,7 +71,12 @@ public class AiragModelController extends JeecgController<AiragModel, IAiragMode
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
|
@RequiresPermissions("airag:model:add")
|
||||||
public Result<String> add(@RequestBody AiragModel airagModel) {
|
public Result<String> add(@RequestBody AiragModel airagModel) {
|
||||||
|
// 验证 模型名称/模型类型/基础模型
|
||||||
|
AssertUtils.assertNotEmpty("模型名称不能为空", airagModel.getName());
|
||||||
|
AssertUtils.assertNotEmpty("模型类型不能为空", airagModel.getModelType());
|
||||||
|
AssertUtils.assertNotEmpty("基础模型不能为空", airagModel.getModelName());
|
||||||
airagModelService.save(airagModel);
|
airagModelService.save(airagModel);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
@ -69,6 +88,7 @@ public class AiragModelController extends JeecgController<AiragModel, IAiragMode
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
|
@RequiresPermissions("airag:model:edit")
|
||||||
public Result<String> edit(@RequestBody AiragModel airagModel) {
|
public Result<String> edit(@RequestBody AiragModel airagModel) {
|
||||||
airagModelService.updateById(airagModel);
|
airagModelService.updateById(airagModel);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
@ -81,23 +101,23 @@ public class AiragModelController extends JeecgController<AiragModel, IAiragMode
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
@RequiresPermissions("airag:model:delete")
|
||||||
|
public Result<String> delete(HttpServletRequest request, @RequestParam(name = "id", required = true) String id) {
|
||||||
|
//update-begin---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
|
//如果是saas隔离的情况下,判断当前租户id是否是当前租户下的
|
||||||
|
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||||
|
AiragModel model = airagModelService.getById(id);
|
||||||
|
//获取当前租户
|
||||||
|
String currentTenantId = TokenUtils.getTenantIdByRequest(request);
|
||||||
|
if (null == model || !model.getTenantId().equals(currentTenantId)) {
|
||||||
|
return Result.error("删除AI模型失败,不能删除其他租户的AI模型!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//update-end---author:chenrui ---date:20250606 for:[issues/8337]关于ai工作列表的数据权限问题 #8337------------
|
||||||
airagModelService.removeById(id);
|
airagModelService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
|
||||||
this.airagModelService.removeByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
@ -136,4 +156,25 @@ public class AiragModelController extends JeecgController<AiragModel, IAiragMode
|
|||||||
return super.importExcel(request, response, AiragModel.class);
|
return super.importExcel(request, response, AiragModel.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/test")
|
||||||
|
public Result<?> test(@RequestBody AiragModel airagModel) {
|
||||||
|
// 验证 模型名称/模型类型/基础模型
|
||||||
|
AssertUtils.assertNotEmpty("模型名称不能为空", airagModel.getName());
|
||||||
|
AssertUtils.assertNotEmpty("模型类型不能为空", airagModel.getModelType());
|
||||||
|
AssertUtils.assertNotEmpty("基础模型不能为空", airagModel.getModelName());
|
||||||
|
try {
|
||||||
|
if(LLMConsts.MODEL_TYPE_LLM.equals(airagModel.getModelType())){
|
||||||
|
aiChatHandler.completions(airagModel, Collections.singletonList(UserMessage.from("test connection")), null);
|
||||||
|
}else{
|
||||||
|
AiModelOptions aiModelOptions = EmbeddingHandler.buildModelOptions(airagModel);
|
||||||
|
EmbeddingModel embeddingModel = AiModelFactory.createEmbeddingModel(aiModelOptions);
|
||||||
|
embeddingModel.embed("test text");
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("测试模型连接失败", e);
|
||||||
|
return Result.error("测试模型连接失败" + e.getMessage());
|
||||||
|
}
|
||||||
|
return Result.OK("测试模型连接成功");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,13 +30,14 @@ public class AiragKnowledge implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@Schema(description = "主键")
|
@Schema(description = "主键")
|
||||||
private String id;
|
private java.lang.String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "创建人")
|
@Schema(description = "创建人")
|
||||||
private String createBy;
|
@Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建日期
|
* 创建日期
|
||||||
@ -50,7 +51,7 @@ public class AiragKnowledge implements Serializable {
|
|||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "更新人")
|
@Schema(description = "更新人")
|
||||||
private String updateBy;
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新日期
|
* 更新日期
|
||||||
@ -64,21 +65,21 @@ public class AiragKnowledge implements Serializable {
|
|||||||
* 所属部门
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
private String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户id
|
* 租户id
|
||||||
*/
|
*/
|
||||||
@Excel(name = "租户id", width = 15)
|
@Excel(name = "租户id", width = 15)
|
||||||
@Schema(description = "租户id")
|
@Schema(description = "租户id")
|
||||||
private String tenantId;
|
private java.lang.String tenantId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 知识库名称
|
* 知识库名称
|
||||||
*/
|
*/
|
||||||
@Excel(name = "知识库名称", width = 15)
|
@Excel(name = "知识库名称", width = 15)
|
||||||
@Schema(description = "知识库名称")
|
@Schema(description = "知识库名称")
|
||||||
private String name;
|
private java.lang.String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 向量模型id
|
* 向量模型id
|
||||||
@ -86,19 +87,19 @@ public class AiragKnowledge implements Serializable {
|
|||||||
@Excel(name = "向量模型id", width = 15, dictTable = "airag_model where model_type = 'EMBED'", dicText = "name", dicCode = "id")
|
@Excel(name = "向量模型id", width = 15, dictTable = "airag_model where model_type = 'EMBED'", dicText = "name", dicCode = "id")
|
||||||
@Dict(dictTable = "airag_model where model_type = 'EMBED'", dicText = "name", dicCode = "id")
|
@Dict(dictTable = "airag_model where model_type = 'EMBED'", dicText = "name", dicCode = "id")
|
||||||
@Schema(description = "向量模型id")
|
@Schema(description = "向量模型id")
|
||||||
private String embedId;
|
private java.lang.String embedId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述
|
* 描述
|
||||||
*/
|
*/
|
||||||
@Excel(name = "描述", width = 15)
|
@Excel(name = "描述", width = 15)
|
||||||
@Schema(description = "描述")
|
@Schema(description = "描述")
|
||||||
private String descr;
|
private java.lang.String descr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态
|
* 状态
|
||||||
*/
|
*/
|
||||||
@Excel(name = "状态", width = 15)
|
@Excel(name = "状态", width = 15)
|
||||||
@Schema(description = "状态")
|
@Schema(description = "状态")
|
||||||
private String status;
|
private java.lang.String status;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package org.jeecg.modules.airag.llm.entity;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import org.jeecg.common.constant.ProvinceCityArea;
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -40,6 +41,7 @@ public class AiragKnowledgeDoc implements Serializable {
|
|||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "创建人")
|
@Schema(description = "创建人")
|
||||||
|
@Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,9 +121,4 @@ public class AiragKnowledgeDoc implements Serializable {
|
|||||||
@Schema(description = "状态")
|
@Schema(description = "状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务器基础路径
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String baseUrl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,6 +45,7 @@ public class AiragModel implements Serializable {
|
|||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "创建人")
|
@Schema(description = "创建人")
|
||||||
|
@Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
/**
|
/**
|
||||||
* 创建日期
|
* 创建日期
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import org.jeecg.modules.airag.common.handler.AIChatParams;
|
|||||||
import org.jeecg.modules.airag.common.handler.IAIChatHandler;
|
import org.jeecg.modules.airag.common.handler.IAIChatHandler;
|
||||||
import org.jeecg.modules.airag.llm.consts.LLMConsts;
|
import org.jeecg.modules.airag.llm.consts.LLMConsts;
|
||||||
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
||||||
import org.jeecg.modules.airag.llm.service.IAiragModelService;
|
import org.jeecg.modules.airag.llm.mapper.AiragModelMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@ -38,7 +38,7 @@ import java.util.regex.Matcher;
|
|||||||
public class AIChatHandler implements IAIChatHandler {
|
public class AIChatHandler implements IAIChatHandler {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IAiragModelService airagModelService;
|
AiragModelMapper airagModelMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
EmbeddingHandler embeddingHandler;
|
EmbeddingHandler embeddingHandler;
|
||||||
@ -82,7 +82,7 @@ public class AIChatHandler implements IAIChatHandler {
|
|||||||
AssertUtils.assertNotEmpty("至少发送一条消息", messages);
|
AssertUtils.assertNotEmpty("至少发送一条消息", messages);
|
||||||
AssertUtils.assertNotEmpty("请选择模型", modelId);
|
AssertUtils.assertNotEmpty("请选择模型", modelId);
|
||||||
|
|
||||||
AiragModel airagModel = airagModelService.getById(modelId);
|
AiragModel airagModel = airagModelMapper.getByIdIgnoreTenant(modelId);
|
||||||
return completions(airagModel, messages, params);
|
return completions(airagModel, messages, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ public class AIChatHandler implements IAIChatHandler {
|
|||||||
* @author chenrui
|
* @author chenrui
|
||||||
* @date 2025/2/24 17:30
|
* @date 2025/2/24 17:30
|
||||||
*/
|
*/
|
||||||
private String completions(AiragModel airagModel, List<ChatMessage> messages, AIChatParams params) {
|
public String completions(AiragModel airagModel, List<ChatMessage> messages, AIChatParams params) {
|
||||||
params = mergeParams(airagModel, params);
|
params = mergeParams(airagModel, params);
|
||||||
String resp = llmHandler.completions(messages, params);
|
String resp = llmHandler.completions(messages, params);
|
||||||
if (resp.contains("</think>")
|
if (resp.contains("</think>")
|
||||||
@ -150,7 +150,7 @@ public class AIChatHandler implements IAIChatHandler {
|
|||||||
AssertUtils.assertNotEmpty("至少发送一条消息", messages);
|
AssertUtils.assertNotEmpty("至少发送一条消息", messages);
|
||||||
AssertUtils.assertNotEmpty("请选择模型", modelId);
|
AssertUtils.assertNotEmpty("请选择模型", modelId);
|
||||||
|
|
||||||
AiragModel airagModel = airagModelService.getById(modelId);
|
AiragModel airagModel = airagModelMapper.getByIdIgnoreTenant(modelId);
|
||||||
return chat(airagModel, messages, params);
|
return chat(airagModel, messages, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ public class AIChatHandler implements IAIChatHandler {
|
|||||||
params.setMaxTokens(modelParams.getInteger("maxTokens"));
|
params.setMaxTokens(modelParams.getInteger("maxTokens"));
|
||||||
}
|
}
|
||||||
if (oConvertUtils.isObjectEmpty(params.getTimeout())) {
|
if (oConvertUtils.isObjectEmpty(params.getTimeout())) {
|
||||||
params.setMaxTokens(modelParams.getInteger("timeout"));
|
params.setTimeout(modelParams.getInteger("timeout"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,6 +237,16 @@ public class AIChatHandler implements IAIChatHandler {
|
|||||||
params.setQueryRouter(queryRouter);
|
params.setQueryRouter(queryRouter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设置确保maxTokens值正确
|
||||||
|
if (oConvertUtils.isObjectNotEmpty(params.getMaxTokens()) && params.getMaxTokens() <= 0) {
|
||||||
|
params.setMaxTokens(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 默认超时时间
|
||||||
|
if(oConvertUtils.isObjectEmpty(params.getTimeout())){
|
||||||
|
params.setTimeout(60);
|
||||||
|
}
|
||||||
|
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,9 @@ import org.jeecg.modules.airag.llm.document.TikaDocumentParser;
|
|||||||
import org.jeecg.modules.airag.llm.entity.AiragKnowledge;
|
import org.jeecg.modules.airag.llm.entity.AiragKnowledge;
|
||||||
import org.jeecg.modules.airag.llm.entity.AiragKnowledgeDoc;
|
import org.jeecg.modules.airag.llm.entity.AiragKnowledgeDoc;
|
||||||
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
||||||
|
import org.jeecg.modules.airag.llm.mapper.AiragKnowledgeMapper;
|
||||||
|
import org.jeecg.modules.airag.llm.mapper.AiragModelMapper;
|
||||||
import org.jeecg.modules.airag.llm.service.IAiragKnowledgeService;
|
import org.jeecg.modules.airag.llm.service.IAiragKnowledgeService;
|
||||||
import org.jeecg.modules.airag.llm.service.IAiragModelService;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -69,13 +70,15 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
EmbedStoreConfigBean embedStoreConfigBean;
|
EmbedStoreConfigBean embedStoreConfigBean;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
private AiragModelMapper airagModelMapper;
|
||||||
private IAiragModelService airagModelService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
private IAiragKnowledgeService airagKnowledgeService;
|
private IAiragKnowledgeService airagKnowledgeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AiragKnowledgeMapper airagKnowledgeMapper;
|
||||||
|
|
||||||
@Value(value = "${jeecg.path.upload:}")
|
@Value(value = "${jeecg.path.upload:}")
|
||||||
private String uploadpath;
|
private String uploadpath;
|
||||||
|
|
||||||
@ -112,6 +115,13 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
*/
|
*/
|
||||||
private static final ConcurrentHashMap<String, EmbeddingStore<TextSegment>> EMBED_STORE_CACHE = new ConcurrentHashMap<>();
|
private static final ConcurrentHashMap<String, EmbeddingStore<TextSegment>> EMBED_STORE_CACHE = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正则匹配: md图片
|
||||||
|
* "!\\[(.*?)]\\((.*?)(\\s*=\\d+)?\\)"
|
||||||
|
*/
|
||||||
|
private static final Pattern PATTERN_MD_IMAGE = Pattern.compile("!\\[(.*?)]\\((.*?)\\)");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 向量化文档
|
* 向量化文档
|
||||||
*
|
*
|
||||||
@ -183,6 +193,7 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
* @author chenrui
|
* @author chenrui
|
||||||
* @date 2025/2/18 16:52
|
* @date 2025/2/18 16:52
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public KnowledgeSearchResult embeddingSearch(List<String> knowIds, String queryText, Integer topNumber, Double similarity) {
|
public KnowledgeSearchResult embeddingSearch(List<String> knowIds, String queryText, Integer topNumber, Double similarity) {
|
||||||
AssertUtils.assertNotEmpty("请选择知识库", knowIds);
|
AssertUtils.assertNotEmpty("请选择知识库", knowIds);
|
||||||
AssertUtils.assertNotEmpty("请填写查询内容", queryText);
|
AssertUtils.assertNotEmpty("请填写查询内容", queryText);
|
||||||
@ -223,7 +234,7 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> searchEmbedding(String knowId, String queryText, Integer topNumber, Double similarity) {
|
public List<Map<String, Object>> searchEmbedding(String knowId, String queryText, Integer topNumber, Double similarity) {
|
||||||
AssertUtils.assertNotEmpty("请选择知识库", knowId);
|
AssertUtils.assertNotEmpty("请选择知识库", knowId);
|
||||||
AiragKnowledge knowledge = airagKnowledgeService.getById(knowId);
|
AiragKnowledge knowledge = airagKnowledgeMapper.getByIdIgnoreTenant(knowId);
|
||||||
AssertUtils.assertNotEmpty("知识库不存在", knowledge);
|
AssertUtils.assertNotEmpty("知识库不存在", knowledge);
|
||||||
AssertUtils.assertNotEmpty("请填写查询内容", queryText);
|
AssertUtils.assertNotEmpty("请填写查询内容", queryText);
|
||||||
AiragModel model = getEmbedModelData(knowledge.getEmbedId());
|
AiragModel model = getEmbedModelData(knowledge.getEmbedId());
|
||||||
@ -268,6 +279,7 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
* @author chenrui
|
* @author chenrui
|
||||||
* @date 2025/2/20 21:03
|
* @date 2025/2/20 21:03
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public QueryRouter getQueryRouter(List<String> knowIds, Integer topNumber, Double similarity) {
|
public QueryRouter getQueryRouter(List<String> knowIds, Integer topNumber, Double similarity) {
|
||||||
AssertUtils.assertNotEmpty("请选择知识库", knowIds);
|
AssertUtils.assertNotEmpty("请选择知识库", knowIds);
|
||||||
List<ContentRetriever> retrievers = Lists.newArrayList();
|
List<ContentRetriever> retrievers = Lists.newArrayList();
|
||||||
@ -275,7 +287,7 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
if (oConvertUtils.isEmpty(knowId)) {
|
if (oConvertUtils.isEmpty(knowId)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
AiragKnowledge knowledge = airagKnowledgeService.getById(knowId);
|
AiragKnowledge knowledge = airagKnowledgeMapper.getByIdIgnoreTenant(knowId);
|
||||||
AssertUtils.assertNotEmpty("知识库不存在", knowledge);
|
AssertUtils.assertNotEmpty("知识库不存在", knowledge);
|
||||||
AiragModel model = getEmbedModelData(knowledge.getEmbedId());
|
AiragModel model = getEmbedModelData(knowledge.getEmbedId());
|
||||||
AiModelOptions modelOptions = buildModelOptions(model);
|
AiModelOptions modelOptions = buildModelOptions(model);
|
||||||
@ -345,7 +357,7 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
*/
|
*/
|
||||||
private AiragModel getEmbedModelData(String modelId) {
|
private AiragModel getEmbedModelData(String modelId) {
|
||||||
AssertUtils.assertNotEmpty("向量模型不能为空", modelId);
|
AssertUtils.assertNotEmpty("向量模型不能为空", modelId);
|
||||||
AiragModel model = airagModelService.getById(modelId);
|
AiragModel model = airagModelMapper.getByIdIgnoreTenant(modelId);
|
||||||
AssertUtils.assertNotEmpty("向量模型不存在", model);
|
AssertUtils.assertNotEmpty("向量模型不存在", model);
|
||||||
AssertUtils.assertEquals("仅支持向量模型", LLMConsts.MODEL_TYPE_EMBED, model.getModelType());
|
AssertUtils.assertEquals("仅支持向量模型", LLMConsts.MODEL_TYPE_EMBED, model.getModelType());
|
||||||
return model;
|
return model;
|
||||||
@ -371,6 +383,18 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
|
|
||||||
AiModelOptions modelOp = buildModelOptions(model);
|
AiModelOptions modelOp = buildModelOptions(model);
|
||||||
EmbeddingModel embeddingModel = AiModelFactory.createEmbeddingModel(modelOp);
|
EmbeddingModel embeddingModel = AiModelFactory.createEmbeddingModel(modelOp);
|
||||||
|
|
||||||
|
String tableName = embedStoreConfigBean.getTable();
|
||||||
|
|
||||||
|
// update-begin---author:sunjianlei ---date:20250509 for:【QQYUN-12345】向量模型维度不一致问题
|
||||||
|
// 如果该模型不是默认的向量维度
|
||||||
|
int dimension = embeddingModel.dimension();
|
||||||
|
if (!LLMConsts.EMBED_MODEL_DEFAULT_DIMENSION.equals(dimension)) {
|
||||||
|
// 就加上维度后缀,防止因维度不一致导致保存失败
|
||||||
|
tableName += ("_" + dimension);
|
||||||
|
}
|
||||||
|
// update-end-----author:sunjianlei ---date:20250509 for:【QQYUN-12345】向量模型维度不一致问题
|
||||||
|
|
||||||
EmbeddingStore<TextSegment> embeddingStore = PgVectorEmbeddingStore.builder()
|
EmbeddingStore<TextSegment> embeddingStore = PgVectorEmbeddingStore.builder()
|
||||||
// Connection and table parameters
|
// Connection and table parameters
|
||||||
.host(embedStoreConfigBean.getHost())
|
.host(embedStoreConfigBean.getHost())
|
||||||
@ -378,7 +402,7 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
.database(embedStoreConfigBean.getDatabase())
|
.database(embedStoreConfigBean.getDatabase())
|
||||||
.user(embedStoreConfigBean.getUser())
|
.user(embedStoreConfigBean.getUser())
|
||||||
.password(embedStoreConfigBean.getPassword())
|
.password(embedStoreConfigBean.getPassword())
|
||||||
.table(embedStoreConfigBean.getTable())
|
.table(tableName)
|
||||||
// Embedding dimension
|
// Embedding dimension
|
||||||
// Required: Must match the embedding model’s output dimension
|
// Required: Must match the embedding model’s output dimension
|
||||||
.dimension(embeddingModel.dimension())
|
.dimension(embeddingModel.dimension())
|
||||||
@ -449,16 +473,20 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
String fileType = FilenameUtils.getExtension(docFile.getName());
|
String fileType = FilenameUtils.getExtension(docFile.getName());
|
||||||
if ("md".contains(fileType)) {
|
if ("md".contains(fileType)) {
|
||||||
// 如果是md文件,查找所有图片语法,如果是本地图片,替换成网络图片
|
// 如果是md文件,查找所有图片语法,如果是本地图片,替换成网络图片
|
||||||
String baseUrl = doc.getBaseUrl() + "/sys/common/static/";
|
String baseUrl = "#{domainURL}/sys/common/static/";
|
||||||
String sourcePath = metadataJson.getString(LLMConsts.KNOWLEDGE_DOC_METADATA_SOURCES_PATH);
|
String sourcePath = metadataJson.getString(LLMConsts.KNOWLEDGE_DOC_METADATA_SOURCES_PATH);
|
||||||
if(oConvertUtils.isNotEmpty(sourcePath)) {
|
if(oConvertUtils.isNotEmpty(sourcePath)) {
|
||||||
String escapedPath = uploadpath;
|
String escapedPath = uploadpath;
|
||||||
if (File.separator.equals("\\")){
|
//update-begin---author:wangshuai---date:2025-06-03---for:【QQYUN-12636】【AI知识库】文档库上传 本地local 文档中的图片不展示---
|
||||||
|
/*if (File.separator.equals("\\")){
|
||||||
escapedPath = uploadpath.replace("//", "\\\\");
|
escapedPath = uploadpath.replace("//", "\\\\");
|
||||||
}
|
}*/
|
||||||
|
//update-end---author:wangshuai---date:2025-06-03---for:【QQYUN-12636】【AI知识库】文档库上传 本地local 文档中的图片不展示---
|
||||||
sourcePath = sourcePath.replaceFirst("^" + escapedPath, "").replace("\\", "/");
|
sourcePath = sourcePath.replaceFirst("^" + escapedPath, "").replace("\\", "/");
|
||||||
baseUrl = baseUrl + sourcePath + "/";
|
String docFilePath = metadataJson.getString(LLMConsts.KNOWLEDGE_DOC_METADATA_FILEPATH);
|
||||||
StringBuffer sb = replaceImageUrl(content, baseUrl);
|
docFilePath = FilenameUtils.getPath(docFilePath);
|
||||||
|
docFilePath = docFilePath.replace("\\", "/");
|
||||||
|
StringBuffer sb = replaceImageUrl(content, baseUrl + sourcePath + "/", baseUrl + docFilePath);
|
||||||
content = sb.toString();
|
content = sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -469,11 +497,9 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static StringBuffer replaceImageUrl(String content, String baseUrl) {
|
private static StringBuffer replaceImageUrl(String content, String abstractBaseUrl, String relativeBaseUrl) {
|
||||||
// 正则表达式匹配md文件中的图片语法 
|
// 正则表达式匹配md文件中的图片语法 
|
||||||
String mdImagePattern = "!\\[(.*?)]\\((.*?)(\\s*=\\d+)?\\)";
|
Matcher matcher = PATTERN_MD_IMAGE.matcher(content);
|
||||||
Pattern pattern = Pattern.compile(mdImagePattern);
|
|
||||||
Matcher matcher = pattern.matcher(content);
|
|
||||||
|
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
@ -481,7 +507,16 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
// 检查是否是本地图片路径
|
// 检查是否是本地图片路径
|
||||||
if (!imageUrl.startsWith("http")) {
|
if (!imageUrl.startsWith("http")) {
|
||||||
// 替换成网络图片路径
|
// 替换成网络图片路径
|
||||||
String networkImageUrl = baseUrl + imageUrl;
|
String networkImageUrl = abstractBaseUrl + imageUrl;
|
||||||
|
if(imageUrl.startsWith("/")) {
|
||||||
|
// 绝对路径
|
||||||
|
networkImageUrl = abstractBaseUrl + imageUrl;
|
||||||
|
}else{
|
||||||
|
// 相对路径
|
||||||
|
networkImageUrl = relativeBaseUrl + imageUrl;
|
||||||
|
}
|
||||||
|
// 修改图片路径中//->/,但保留http://和https://
|
||||||
|
networkImageUrl = networkImageUrl.replaceAll("(?<!http:)(?<!https:)//", "/");
|
||||||
matcher.appendReplacement(sb, "");
|
matcher.appendReplacement(sb, "");
|
||||||
} else {
|
} else {
|
||||||
matcher.appendReplacement(sb, "");
|
matcher.appendReplacement(sb, "");
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.jeecg.modules.airag.llm.mapper;
|
package org.jeecg.modules.airag.llm.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.jeecg.modules.airag.llm.entity.AiragKnowledge;
|
import org.jeecg.modules.airag.llm.entity.AiragKnowledge;
|
||||||
|
|
||||||
@ -11,4 +12,14 @@ import org.jeecg.modules.airag.llm.entity.AiragKnowledge;
|
|||||||
*/
|
*/
|
||||||
public interface AiragKnowledgeMapper extends BaseMapper<AiragKnowledge> {
|
public interface AiragKnowledgeMapper extends BaseMapper<AiragKnowledge> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询知识库信息(忽略租户)
|
||||||
|
* for [QQYUN-12113]分享之后的聊天,应用、模型、知识库不根据租户查询
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/21 15:24
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
AiragKnowledge getByIdIgnoreTenant(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.jeecg.modules.airag.llm.mapper;
|
package org.jeecg.modules.airag.llm.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
import org.jeecg.modules.airag.llm.entity.AiragModel;
|
||||||
|
|
||||||
@ -11,4 +12,14 @@ import org.jeecg.modules.airag.llm.entity.AiragModel;
|
|||||||
*/
|
*/
|
||||||
public interface AiragModelMapper extends BaseMapper<AiragModel> {
|
public interface AiragModelMapper extends BaseMapper<AiragModel> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询模型信息(忽略租户)
|
||||||
|
* for [QQYUN-12113]分享之后的聊天,应用、模型、知识库不根据租户查询
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @author chenrui
|
||||||
|
* @date 2025/4/21 15:24
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
AiragModel getByIdIgnoreTenant(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user