From e4036842dec695ec61f853bb4fe927ad1106617f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 17:32:13 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=20ICON=20=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/{ => assets}/icons/svg/rich-text.svg | 0 yudao-ui-admin/src/icons/index.js | 9 --------- yudao-ui-admin/src/icons/svg/button.svg | 1 - yudao-ui-admin/src/icons/svg/cascader.svg | 1 - yudao-ui-admin/src/icons/svg/checkbox.svg | 1 - yudao-ui-admin/src/icons/svg/color.svg | 1 - yudao-ui-admin/src/icons/svg/component.svg | 1 - yudao-ui-admin/src/icons/svg/date-range.svg | 1 - yudao-ui-admin/src/icons/svg/date.svg | 1 - yudao-ui-admin/src/icons/svg/input.svg | 1 - yudao-ui-admin/src/icons/svg/number.svg | 1 - yudao-ui-admin/src/icons/svg/password.svg | 1 - yudao-ui-admin/src/icons/svg/radio.svg | 1 - yudao-ui-admin/src/icons/svg/rate.svg | 1 - yudao-ui-admin/src/icons/svg/row.svg | 1 - yudao-ui-admin/src/icons/svg/select.svg | 1 - yudao-ui-admin/src/icons/svg/slider.svg | 1 - yudao-ui-admin/src/icons/svg/switch.svg | 1 - yudao-ui-admin/src/icons/svg/table.svg | 1 - yudao-ui-admin/src/icons/svg/textarea.svg | 1 - yudao-ui-admin/src/icons/svg/time-range.svg | 1 - yudao-ui-admin/src/icons/svg/time.svg | 1 - yudao-ui-admin/src/icons/svg/upload.svg | 1 - yudao-ui-admin/src/main.js | 2 +- yudao-ui-admin/src/views/infra/build/main.js | 2 +- 25 files changed, 2 insertions(+), 32 deletions(-) rename yudao-ui-admin/src/{ => assets}/icons/svg/rich-text.svg (100%) delete mode 100644 yudao-ui-admin/src/icons/index.js delete mode 100644 yudao-ui-admin/src/icons/svg/button.svg delete mode 100644 yudao-ui-admin/src/icons/svg/cascader.svg delete mode 100644 yudao-ui-admin/src/icons/svg/checkbox.svg delete mode 100644 yudao-ui-admin/src/icons/svg/color.svg delete mode 100644 yudao-ui-admin/src/icons/svg/component.svg delete mode 100644 yudao-ui-admin/src/icons/svg/date-range.svg delete mode 100644 yudao-ui-admin/src/icons/svg/date.svg delete mode 100644 yudao-ui-admin/src/icons/svg/input.svg delete mode 100644 yudao-ui-admin/src/icons/svg/number.svg delete mode 100644 yudao-ui-admin/src/icons/svg/password.svg delete mode 100644 yudao-ui-admin/src/icons/svg/radio.svg delete mode 100644 yudao-ui-admin/src/icons/svg/rate.svg delete mode 100644 yudao-ui-admin/src/icons/svg/row.svg delete mode 100644 yudao-ui-admin/src/icons/svg/select.svg delete mode 100644 yudao-ui-admin/src/icons/svg/slider.svg delete mode 100644 yudao-ui-admin/src/icons/svg/switch.svg delete mode 100644 yudao-ui-admin/src/icons/svg/table.svg delete mode 100644 yudao-ui-admin/src/icons/svg/textarea.svg delete mode 100644 yudao-ui-admin/src/icons/svg/time-range.svg delete mode 100644 yudao-ui-admin/src/icons/svg/time.svg delete mode 100644 yudao-ui-admin/src/icons/svg/upload.svg diff --git a/yudao-ui-admin/src/icons/svg/rich-text.svg b/yudao-ui-admin/src/assets/icons/svg/rich-text.svg similarity index 100% rename from yudao-ui-admin/src/icons/svg/rich-text.svg rename to yudao-ui-admin/src/assets/icons/svg/rich-text.svg diff --git a/yudao-ui-admin/src/icons/index.js b/yudao-ui-admin/src/icons/index.js deleted file mode 100644 index 2c6b309c9..000000000 --- a/yudao-ui-admin/src/icons/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from 'vue' -import SvgIcon from '@/components/SvgIcon'// svg component - -// register globally -Vue.component('svg-icon', SvgIcon) - -const req = require.context('./svg', false, /\.svg$/) -const requireAll = requireContext => requireContext.keys().map(requireContext) -requireAll(req) diff --git a/yudao-ui-admin/src/icons/svg/button.svg b/yudao-ui-admin/src/icons/svg/button.svg deleted file mode 100644 index 904fddc85..000000000 --- a/yudao-ui-admin/src/icons/svg/button.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/cascader.svg b/yudao-ui-admin/src/icons/svg/cascader.svg deleted file mode 100644 index e256024f9..000000000 --- a/yudao-ui-admin/src/icons/svg/cascader.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/checkbox.svg b/yudao-ui-admin/src/icons/svg/checkbox.svg deleted file mode 100644 index 013fd3a27..000000000 --- a/yudao-ui-admin/src/icons/svg/checkbox.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/color.svg b/yudao-ui-admin/src/icons/svg/color.svg deleted file mode 100644 index 44a81aab1..000000000 --- a/yudao-ui-admin/src/icons/svg/color.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/component.svg b/yudao-ui-admin/src/icons/svg/component.svg deleted file mode 100644 index 29c345809..000000000 --- a/yudao-ui-admin/src/icons/svg/component.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/date-range.svg b/yudao-ui-admin/src/icons/svg/date-range.svg deleted file mode 100644 index fda571e70..000000000 --- a/yudao-ui-admin/src/icons/svg/date-range.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/date.svg b/yudao-ui-admin/src/icons/svg/date.svg deleted file mode 100644 index 52dc73eec..000000000 --- a/yudao-ui-admin/src/icons/svg/date.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/input.svg b/yudao-ui-admin/src/icons/svg/input.svg deleted file mode 100644 index ab91381e6..000000000 --- a/yudao-ui-admin/src/icons/svg/input.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/number.svg b/yudao-ui-admin/src/icons/svg/number.svg deleted file mode 100644 index ad5ce9af2..000000000 --- a/yudao-ui-admin/src/icons/svg/number.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/password.svg b/yudao-ui-admin/src/icons/svg/password.svg deleted file mode 100644 index 6c64defe3..000000000 --- a/yudao-ui-admin/src/icons/svg/password.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/radio.svg b/yudao-ui-admin/src/icons/svg/radio.svg deleted file mode 100644 index 0cde34521..000000000 --- a/yudao-ui-admin/src/icons/svg/radio.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/rate.svg b/yudao-ui-admin/src/icons/svg/rate.svg deleted file mode 100644 index aa3b14d7d..000000000 --- a/yudao-ui-admin/src/icons/svg/rate.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/row.svg b/yudao-ui-admin/src/icons/svg/row.svg deleted file mode 100644 index 078099222..000000000 --- a/yudao-ui-admin/src/icons/svg/row.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/select.svg b/yudao-ui-admin/src/icons/svg/select.svg deleted file mode 100644 index d6283828b..000000000 --- a/yudao-ui-admin/src/icons/svg/select.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/slider.svg b/yudao-ui-admin/src/icons/svg/slider.svg deleted file mode 100644 index fbe4f39f0..000000000 --- a/yudao-ui-admin/src/icons/svg/slider.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/switch.svg b/yudao-ui-admin/src/icons/svg/switch.svg deleted file mode 100644 index 0ba61e38d..000000000 --- a/yudao-ui-admin/src/icons/svg/switch.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/table.svg b/yudao-ui-admin/src/icons/svg/table.svg deleted file mode 100644 index e8068454f..000000000 --- a/yudao-ui-admin/src/icons/svg/table.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/textarea.svg b/yudao-ui-admin/src/icons/svg/textarea.svg deleted file mode 100644 index 2709f292e..000000000 --- a/yudao-ui-admin/src/icons/svg/textarea.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/time-range.svg b/yudao-ui-admin/src/icons/svg/time-range.svg deleted file mode 100644 index 13c1202bd..000000000 --- a/yudao-ui-admin/src/icons/svg/time-range.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/time.svg b/yudao-ui-admin/src/icons/svg/time.svg deleted file mode 100644 index b376e32a6..000000000 --- a/yudao-ui-admin/src/icons/svg/time.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/icons/svg/upload.svg b/yudao-ui-admin/src/icons/svg/upload.svg deleted file mode 100644 index bae49c0a5..000000000 --- a/yudao-ui-admin/src/icons/svg/upload.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yudao-ui-admin/src/main.js b/yudao-ui-admin/src/main.js index 622f88976..20617571a 100644 --- a/yudao-ui-admin/src/main.js +++ b/yudao-ui-admin/src/main.js @@ -66,7 +66,7 @@ import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css"; // Form Generator 组件需要使用到 tinymce import Tinymce from '@/components/tinymce/index.vue' Vue.component('tinymce', Tinymce) -import '@/icons' +import '@/assets/icons' import request from "@/utils/request" // 实现 form generator 使用自己定义的 axios request 对象 console.log(request) Vue.prototype.$axios = request diff --git a/yudao-ui-admin/src/views/infra/build/main.js b/yudao-ui-admin/src/views/infra/build/main.js index e9cc3931e..9ced7172b 100644 --- a/yudao-ui-admin/src/views/infra/build/main.js +++ b/yudao-ui-admin/src/views/infra/build/main.js @@ -2,7 +2,7 @@ import Vue from 'vue' import App from './App.vue' import router from '@/router' import '@/styles/index.scss' -import '@/icons' +import '@/assets/icons' import axios from 'axios' import Tinymce from '@/components/tinymce/index.vue' From 9e39356512c340895c16eca4f2f103b2b4d0e964 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 17:39:50 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=20status=20=E4=B8=8B=E6=8B=89=E6=97=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/views/system/dept/index.vue | 2 -- yudao-ui-admin/src/views/system/dict/data.vue | 4 +--- yudao-ui-admin/src/views/system/dict/index.vue | 2 -- yudao-ui-admin/src/views/system/loginlog/index.vue | 2 -- yudao-ui-admin/src/views/system/operatelog/index.vue | 2 -- yudao-ui-admin/src/views/system/post/index.vue | 2 -- yudao-ui-admin/src/views/system/user/index.vue | 2 -- 7 files changed, 1 insertion(+), 15 deletions(-) diff --git a/yudao-ui-admin/src/views/system/dept/index.vue b/yudao-ui-admin/src/views/system/dept/index.vue index 5b705089f..0ec798622 100644 --- a/yudao-ui-admin/src/views/system/dept/index.vue +++ b/yudao-ui-admin/src/views/system/dept/index.vue @@ -141,8 +141,6 @@ export default { refreshTable: true, // 是否展开 expand: false, - // 状态数据字典 - statusOptions: [], // 查询参数 queryParams: { name: undefined, diff --git a/yudao-ui-admin/src/views/system/dict/data.vue b/yudao-ui-admin/src/views/system/dict/data.vue index 97ea81cb4..5fc28f11d 100644 --- a/yudao-ui-admin/src/views/system/dict/data.vue +++ b/yudao-ui-admin/src/views/system/dict/data.vue @@ -11,7 +11,7 @@ - + @@ -130,8 +130,6 @@ export default { title: "", // 是否显示弹出层 open: false, - // 状态数据字典 - statusOptions: [], // 类型数据字典 typeOptions: [], // 查询参数 diff --git a/yudao-ui-admin/src/views/system/dict/index.vue b/yudao-ui-admin/src/views/system/dict/index.vue index b5e9251c6..6584f49c0 100644 --- a/yudao-ui-admin/src/views/system/dict/index.vue +++ b/yudao-ui-admin/src/views/system/dict/index.vue @@ -118,8 +118,6 @@ export default { title: "", // 是否显示弹出层 open: false, - // 状态数据字典 - statusOptions: [], // 查询参数 queryParams: { pageNo: 1, diff --git a/yudao-ui-admin/src/views/system/loginlog/index.vue b/yudao-ui-admin/src/views/system/loginlog/index.vue index 66ff2dcc5..cbc0213df 100644 --- a/yudao-ui-admin/src/views/system/loginlog/index.vue +++ b/yudao-ui-admin/src/views/system/loginlog/index.vue @@ -79,8 +79,6 @@ export default { total: 0, // 表格数据 list: [], - // 状态数据字典 - statusOptions: [], // 查询参数 queryParams: { pageNo: 1, diff --git a/yudao-ui-admin/src/views/system/operatelog/index.vue b/yudao-ui-admin/src/views/system/operatelog/index.vue index 4a622c81b..ea71b830e 100644 --- a/yudao-ui-admin/src/views/system/operatelog/index.vue +++ b/yudao-ui-admin/src/views/system/operatelog/index.vue @@ -148,8 +148,6 @@ export default { open: false, // 类型数据字典 typeOptions: [], - // 类型数据字典 - statusOptions: [], // 表单参数 form: {}, // 查询参数 diff --git a/yudao-ui-admin/src/views/system/post/index.vue b/yudao-ui-admin/src/views/system/post/index.vue index cf8ba1877..4667cd199 100644 --- a/yudao-ui-admin/src/views/system/post/index.vue +++ b/yudao-ui-admin/src/views/system/post/index.vue @@ -112,8 +112,6 @@ export default { title: "", // 是否显示弹出层 open: false, - // 状态数据字典 - statusOptions: [], // 查询参数 queryParams: { pageNo: 1, diff --git a/yudao-ui-admin/src/views/system/user/index.vue b/yudao-ui-admin/src/views/system/user/index.vue index 6319aa38a..7351bc3f0 100644 --- a/yudao-ui-admin/src/views/system/user/index.vue +++ b/yudao-ui-admin/src/views/system/user/index.vue @@ -274,8 +274,6 @@ export default { deptName: undefined, // 默认密码 initPassword: undefined, - // 状态数据字典 - statusOptions: [], // 性别状态字典 sexOptions: [], // 岗位选项 From ff1379d454a936c978017f2bb454937b64d756b8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 18:57:41 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=20README=20=E8=AF=B4?= =?UTF-8?q?=E6=98=8E~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++++++++++++ .../exception/enums/GlobalErrorCodeConstants.java | 1 + .../web/core/handler/GlobalExceptionHandler.java | 10 ++++++++-- yudao-server/src/main/resources/application.yaml | 3 ++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2cf8ea72b..aa81ed5e6 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,18 @@ | `yudao-cloud` | Spring Cloud 微服务 | **[Gitee](https://gitee.com/zhijiantianya/yudao-cloud)**     [Github](https://github.com/YunaiV/yudao-cloud) | | `Spring-Boot-Labs` | Spring Boot & Cloud 入门 | **[Gitee](https://gitee.com/zhijiantianya/SpringBoot-Labs)**     [Github](https://github.com/YunaiV/SpringBoot-Labs) | +## 😎 开源协议 + +**为什么推荐使用本项目?** + +① 本项目采用比 Apache 2.0 更宽松的 [MIT License](https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE) 开源协议,个人与企业可 100% 免费使用,不用保留类作者、Copyright 信息。 + +② 代码全部开源,不会像其他项目一样,只开源部分代码,让你无法了解整个项目的架构设计。[国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn) + +![开源项目对比](https://static.iocoder.cn/project-vs.png?imageView2/2/format/webp/w/1280) + +③ 代码整洁、架构整洁,遵循《阿里巴巴 Java 开发手册》规范,代码注释详细,57000 行 Java 代码,22000 行代码注释。 + ## 🐼 内置功能 系统内置多种多种业务功能,可以用于快速你的业务系统: diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/GlobalErrorCodeConstants.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/GlobalErrorCodeConstants.java index a132e63d7..61533de60 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/GlobalErrorCodeConstants.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/GlobalErrorCodeConstants.java @@ -29,6 +29,7 @@ public interface GlobalErrorCodeConstants { // ========== 服务端错误段 ========== ErrorCode INTERNAL_SERVER_ERROR = new ErrorCode(500, "系统异常"); + ErrorCode NOT_IMPLEMENTED = new ErrorCode(501, "功能未实现/未开启"); // ========== 自定义错误段 ========== ErrorCode REPEATED_REQUESTS = new ErrorCode(900, "重复请求,请稍后重试"); // 重复请求 diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java index 78b438af6..05e4f0b11 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java @@ -78,7 +78,7 @@ public class GlobalExceptionHandler { return validationException((ValidationException) ex); } if (ex instanceof NoHandlerFoundException) { - return noHandlerFoundExceptionHandler((NoHandlerFoundException) ex); + return noHandlerFoundExceptionHandler(request, (NoHandlerFoundException) ex); } if (ex instanceof HttpRequestMethodNotSupportedException) { return httpRequestMethodNotSupportedExceptionHandler((HttpRequestMethodNotSupportedException) ex); @@ -167,7 +167,13 @@ public class GlobalExceptionHandler { * 2. spring.mvc.static-path-pattern 为 /statics/** */ @ExceptionHandler(NoHandlerFoundException.class) - public CommonResult noHandlerFoundExceptionHandler(NoHandlerFoundException ex) { + public CommonResult noHandlerFoundExceptionHandler(HttpServletRequest req, NoHandlerFoundException ex) { + // 情况一:部分功能未开启 + if (req.getRequestURI().contains("/bpm/")) { + return CommonResult.error(NOT_IMPLEMENTED.getCode(), "[工作流模块 yudao-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]"); + } + + // 情况二:正常情况下的 404 log.warn("[noHandlerFoundExceptionHandler]", ex); return CommonResult.error(NOT_FOUND.getCode(), String.format("请求地址不存在:%s", ex.getRequestURL())); } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 668c12d0b..c49ae9d9a 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -17,6 +17,8 @@ spring: mvc: pathmatch: matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类 + throw-exception-if-no-handler-found: true # 404 错误时抛出异常,方便统一处理 + static-path-pattern: /static/** # 静态资源路径; 注意:如果不配置,则 throw-exception-if-no-handler-found 不生效!!! # Jackson 配置项 jackson: @@ -25,7 +27,6 @@ spring: write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 fail-on-empty-beans: false # 允许序列化无属性的 Bean - # Cache 配置项 cache: type: REDIS From 3310b766bc8fb31201e9f40c2c35dcf086a35600 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 19:09:43 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E7=A8=8B-=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E6=B5=81=E7=A8=8B=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=EF=BC=8C=E5=9C=A8=E5=8F=91=E5=B8=83=E5=AE=8C=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E6=BF=80=E6=B4=BB=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=9A=84=E6=8C=89=E9=92=AE=EF=BC=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E2=80=9C=E6=98=AF=E5=90=A6=E7=A1=AE=E8=AE=A4=E6=8C=82=E8=B5=B7?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=90=8D=E5=AD=97=E4=B8=BA=E2=80=98xxx?= =?UTF-8?q?=E2=80=99=E2=80=98=E7=9A=84=E6=95=B0=E6=8D=AE=E9=A1=B9=E2=80=9C?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E5=8F=96=E6=B6=88=EF=BC=8C=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=98=BE=E7=A4=BA=E7=9A=84=E6=BF=80=E6=B4=BB=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=94=B9=E5=8F=98=EF=BC=8C=E4=BD=86=E6=98=AF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E6=B2=A1=E6=9C=89=E6=9B=B4=E6=96=B0=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-server/pom.xml | 10 +++++----- yudao-ui-admin/src/views/bpm/model/index.vue | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 852a9dff0..262a6b7fd 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -68,11 +68,11 @@ - - - - - + + cn.iocoder.boot + yudao-module-bpm-biz + ${revision} + cn.iocoder.boot yudao-spring-boot-starter-biz-error-code diff --git a/yudao-ui-admin/src/views/bpm/model/index.vue b/yudao-ui-admin/src/views/bpm/model/index.vue index 4787306ff..fbb580fe3 100644 --- a/yudao-ui-admin/src/views/bpm/model/index.vue +++ b/yudao-ui-admin/src/views/bpm/model/index.vue @@ -489,7 +489,10 @@ export default { }).then(() => { this.getList(); this.$modal.msgSuccess(statusState + "成功"); - }).catch(() => {}); + }).catch(() => { + // 取消后,进行恢复按钮 + row.processDefinition.suspensionState = (state === 1 ? 2 : 1); + }); }, /** 导入按钮操作 */ handleImport() { From 92ace031fe17017ae577cf2e7ca3979fae9ebe21 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 19:37:21 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=EF=BC=8Cpath=20=E5=A4=9A=E5=B1=82?= =?UTF-8?q?=E7=BA=A7=E6=97=B6=EF=BC=8C=E6=97=A0=E6=B3=95=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/file/FileController.java | 23 +++++++++++-------- .../config/SecurityConfiguration.java | 4 +++- yudao-server/pom.xml | 10 ++++---- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index df224d6f6..3719bc31b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.file; import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; @@ -13,7 +14,6 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.service.file.FileService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; @@ -24,6 +24,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.annotation.security.PermitAll; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; @@ -57,16 +58,20 @@ public class FileController { return success(true); } - @GetMapping("/{configId}/get/{path}") + @GetMapping("/{configId}/get/**") @PermitAll @ApiOperation("下载文件") - @ApiImplicitParams({ - @ApiImplicitParam(name = "configId", value = "配置编号", required = true, dataTypeClass = Long.class), - @ApiImplicitParam(name = "path", value = "文件路径", required = true, dataTypeClass = String.class) - }) - public void getFileContent(HttpServletResponse response, - @PathVariable("configId") Long configId, - @PathVariable("path") String path) throws Exception { + @ApiImplicitParam(name = "configId", value = "配置编号", required = true, dataTypeClass = Long.class) + public void getFileContent(HttpServletRequest request, + HttpServletResponse response, + @PathVariable("configId") Long configId) throws Exception { + // 获取请求的路径 + String path = StrUtil.subAfter(request.getRequestURI(), "/get/", false); + if (StrUtil.isEmpty(path)) { + throw new IllegalArgumentException("结尾的 path 路径必须传递"); + } + + // 读取内容 byte[] content = fileService.getFileContent(configId, path); if (content == null) { log.warn("[getFileContent][configId({}) path({}) 文件不存在]", configId, path); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java index f581fa102..b80c2d660 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java @@ -27,7 +27,7 @@ public class SecurityConfiguration { .antMatchers("/swagger-resources/**").anonymous() .antMatchers("/webjars/**").anonymous() .antMatchers("/*/api-docs").anonymous(); - //积木报表 + // 积木报表 registry.antMatchers("/jmreport/**").permitAll(); // Spring Boot Actuator 的安全配置 registry.antMatchers("/actuator").anonymous() @@ -37,6 +37,8 @@ public class SecurityConfiguration { // Spring Boot Admin Server 的安全配置 registry.antMatchers(adminSeverContextPath).anonymous() .antMatchers(adminSeverContextPath + "/**").anonymous(); + // 文件读取 + registry.antMatchers(buildAdminApi("/infra/file/*/get/**")).permitAll(); } }; diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 262a6b7fd..852a9dff0 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -68,11 +68,11 @@ - - cn.iocoder.boot - yudao-module-bpm-biz - ${revision} - + + + + + cn.iocoder.boot yudao-spring-boot-starter-biz-error-code From f5ef87094d7a88a2e8d2c452f738bdec698a012e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 20:17:58 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20@Configuration(proxyBeanMethods=20=3D=20false)=20?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E5=90=AF=E5=8A=A8=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/banner/config/YudaoBannerAutoConfiguration.java | 2 +- .../framework/dict/config/YudaoDictAutoConfiguration.java | 2 +- .../errorcode/config/YudaoErrorCodeConfiguration.java | 2 +- .../operatelog/config/YudaoOperateLogAutoConfiguration.java | 2 +- .../yudao/framework/pay/config/YudaoPayAutoConfiguration.java | 2 +- .../yudao/framework/sms/config/YudaoSmsAutoConfiguration.java | 2 +- .../framework/social/config/YudaoSocialAutoConfiguration.java | 2 +- .../framework/tenant/config/YudaoTenantAutoConfiguration.java | 2 +- .../framework/captcha/config/YudaoCaptchaConfiguration.java | 2 +- .../framework/file/config/YudaoFileAutoConfiguration.java | 2 +- .../framework/flowable/config/YudaoFlowableConfiguration.java | 2 +- .../framework/quartz/config/YudaoAsyncAutoConfiguration.java | 2 +- .../framework/quartz/config/YudaoQuartzAutoConfiguration.java | 2 +- .../framework/tracer/config/YudaoMetricsAutoConfiguration.java | 2 +- .../framework/tracer/config/YudaoTracerAutoConfiguration.java | 2 +- .../yudao/framework/mq/config/YudaoMQAutoConfiguration.java | 2 +- .../datasource/config/YudaoDataSourceAutoConfiguration.java | 2 +- .../mybatis/config/YudaoMybatisAutoConfiguration.java | 2 +- .../framework/lock4j/config/YudaoLock4jConfiguration.java | 2 +- .../framework/redis/config/YudaoCacheAutoConfiguration.java | 2 +- .../framework/redis/config/YudaoRedisAutoConfiguration.java | 2 +- .../security/config/YudaoWebSecurityConfigurerAdapter.java | 2 +- .../framework/apilog/config/YudaoApiLogAutoConfiguration.java | 2 +- .../jackson/config/YudaoJacksonAutoConfiguration.java | 2 +- .../swagger/config/YudaoSwaggerAutoConfiguration.java | 2 +- .../yudao/framework/web/config/YudaoWebAutoConfiguration.java | 2 +- .../trade/controller/app/order/AppTradeOrderController.java | 2 +- .../java/cn/iocoder/yudao/server/YudaoServerApplication.java | 3 +++ 28 files changed, 30 insertions(+), 27 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java index 2ae83f3f8..203b324af 100644 --- a/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoBannerAutoConfiguration { @Bean diff --git a/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/config/YudaoDictAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/config/YudaoDictAutoConfiguration.java index 01f7aba78..d0b985cd5 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/config/YudaoDictAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/config/YudaoDictAutoConfiguration.java @@ -5,7 +5,7 @@ import cn.iocoder.yudao.module.system.api.dict.DictDataApi; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoDictAutoConfiguration { @Bean diff --git a/yudao-framework/yudao-spring-boot-starter-biz-error-code/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-error-code/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeConfiguration.java index e74be61ed..85711d3d7 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-error-code/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-error-code/src/main/java/cn/iocoder/yudao/framework/errorcode/config/YudaoErrorCodeConfiguration.java @@ -17,7 +17,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnProperty(prefix = "yudao.error-code", value = "enable", matchIfMissing = true) // 允许使用 yudao.error-code.enable=false 禁用访问日志 @EnableConfigurationProperties(ErrorCodeProperties.class) @EnableScheduling // 开启调度任务的功能,因为 ErrorCodeRemoteLoader 通过定时刷新错误码 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java index bd78d2464..27c45c068 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java @@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoOperateLogAutoConfiguration { @Bean diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/YudaoPayAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/YudaoPayAutoConfiguration.java index c4d41b6f5..b198d3876 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/YudaoPayAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/YudaoPayAutoConfiguration.java @@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties(PayProperties.class) public class YudaoPayAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/main/java/cn/iocoder/yudao/framework/sms/config/YudaoSmsAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-sms/src/main/java/cn/iocoder/yudao/framework/sms/config/YudaoSmsAutoConfiguration.java index e6be48377..e2a3e3732 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/main/java/cn/iocoder/yudao/framework/sms/config/YudaoSmsAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-sms/src/main/java/cn/iocoder/yudao/framework/sms/config/YudaoSmsAutoConfiguration.java @@ -10,7 +10,7 @@ import org.springframework.context.annotation.Configuration; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoSmsAutoConfiguration { @Bean diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java index 078159724..976f677ce 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java @@ -19,7 +19,7 @@ import org.springframework.context.annotation.Primary; * @date 2021-10-30 */ @Slf4j -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties(JustAuthProperties.class) public class YudaoSocialAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/config/YudaoTenantAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/config/YudaoTenantAutoConfiguration.java index 7958b7a44..46955d3ab 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/config/YudaoTenantAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/config/YudaoTenantAutoConfiguration.java @@ -35,7 +35,7 @@ import org.springframework.data.redis.core.RedisTemplate; import java.util.Objects; -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnProperty(prefix = "yudao.tenant", value = "enable", matchIfMissing = true) // 允许使用 yudao.tenant.enable=false 禁用多租户 @EnableConfigurationProperties(TenantProperties.class) public class YudaoTenantAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java index 0f47b0844..314368d32 100644 --- a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java @@ -8,7 +8,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.core.StringRedisTemplate; -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoCaptchaConfiguration { static { diff --git a/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/config/YudaoFileAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/config/YudaoFileAutoConfiguration.java index 5f7bd91fe..c7aa832bf 100644 --- a/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/config/YudaoFileAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/config/YudaoFileAutoConfiguration.java @@ -10,7 +10,7 @@ import org.springframework.context.annotation.Configuration; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoFileAutoConfiguration { @Bean diff --git a/yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java b/yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java index 7754ca448..ef6720d16 100644 --- a/yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java @@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.task.AsyncListenableTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoFlowableConfiguration { /** diff --git a/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoAsyncAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoAsyncAutoConfiguration.java index 05b82b552..f1eef178c 100644 --- a/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoAsyncAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoAsyncAutoConfiguration.java @@ -11,7 +11,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; /** * 异步任务 Configuration */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableAsync public class YudaoAsyncAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoQuartzAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoQuartzAutoConfiguration.java index 144e4773d..881e59913 100644 --- a/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoQuartzAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/YudaoQuartzAutoConfiguration.java @@ -9,7 +9,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; /** * 定时任务 Configuration */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableScheduling // 开启 Spring 自带的定时任务 public class YudaoQuartzAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoMetricsAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoMetricsAutoConfiguration.java index cda0d2cb8..7537f3eae 100644 --- a/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoMetricsAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoMetricsAutoConfiguration.java @@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnClass({MeterRegistryCustomizer.class}) @ConditionalOnProperty(prefix = "yudao.metrics", value = "enable", matchIfMissing = true) // 允许使用 yudao.metrics.enable=false 禁用 Metrics public class YudaoMetricsAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoTracerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoTracerAutoConfiguration.java index ac76b9ed7..74bbf1ed7 100644 --- a/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoTracerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoTracerAutoConfiguration.java @@ -15,7 +15,7 @@ import org.springframework.context.annotation.Configuration; * * @author mashu */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnClass({BizTraceAspect.class}) @EnableConfigurationProperties(TracerProperties.class) @ConditionalOnProperty(prefix = "yudao.tracer", value = "enable", matchIfMissing = true) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java index 76e89358d..9efdd4c87 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java @@ -34,7 +34,7 @@ import java.util.Properties; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @AutoConfigureAfter(YudaoRedisAutoConfiguration.class) @Slf4j public class YudaoMQAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java index ccb8ef0fe..3e237f232 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/datasource/config/YudaoDataSourceAutoConfiguration.java @@ -14,7 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableTransactionManagement(proxyTargetClass = true) // 启动事务管理 @EnableConfigurationProperties(DruidStatProperties.class) public class YudaoDataSourceAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java index d49ac8308..ce0596498 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java @@ -23,7 +23,7 @@ import org.springframework.core.env.ConfigurableEnvironment; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @MapperScan(value = "${yudao.info.base-package}", annotationClass = Mapper.class, lazyInitialization = "${mybatis.lazy-initialization:false}") // Mapper 懒加载,目前仅用于单元测试 public class YudaoMybatisAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java index 00cf23fb5..2d2f4fd2f 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -@Configuration +@Configuration(proxyBeanMethods = false) @AutoConfigureBefore(LockAutoConfiguration.class) public class YudaoLock4jConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoCacheAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoCacheAutoConfiguration.java index 6a8f92efc..3814d487a 100644 --- a/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoCacheAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoCacheAutoConfiguration.java @@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.RedisSerializer; /** * Cache 配置类,基于 Redis 实现 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties({CacheProperties.class}) @EnableCaching public class YudaoCacheAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoRedisAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoRedisAutoConfiguration.java index 5a74a2bb2..d814afe16 100644 --- a/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoRedisAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/config/YudaoRedisAutoConfiguration.java @@ -9,7 +9,7 @@ import org.springframework.data.redis.serializer.RedisSerializer; /** * Redis 配置类 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoRedisAutoConfiguration { /** diff --git a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java index 1e7518787..fd1773c37 100644 --- a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java @@ -32,7 +32,7 @@ import java.util.Set; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class YudaoWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter { diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java index e2875c1c3..e4f644173 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java @@ -19,7 +19,7 @@ import org.springframework.context.annotation.Configuration; import javax.servlet.Filter; -@Configuration +@Configuration(proxyBeanMethods = false) @AutoConfigureAfter(YudaoWebAutoConfiguration.class) public class YudaoApiLogAutoConfiguration { diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java index 4668b184d..c44e770a1 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java @@ -13,8 +13,8 @@ import org.springframework.context.annotation.Configuration; import java.time.LocalDateTime; +@Configuration(proxyBeanMethods = false) @Slf4j -@Configuration public class YudaoJacksonAutoConfiguration { @Bean diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java index dbd490888..9e4233baf 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java @@ -29,7 +29,7 @@ import static springfox.documentation.builders.RequestHandlerSelectors.basePacka * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableSwagger2 @EnableKnife4j @ConditionalOnClass({Docket.class, ApiInfoBuilder.class}) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java index a7c5b7a53..d5ad84eab 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java @@ -26,7 +26,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import javax.annotation.Resource; import javax.servlet.Filter; -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties({WebProperties.class, XssProperties.class}) public class YudaoWebAutoConfiguration implements WebMvcConfigurer { diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java index 7b7ed4b83..3b1766bd3 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java @@ -60,7 +60,7 @@ public class AppTradeOrderController { @GetMapping("/get") @ApiOperation("获得交易订单") - @ApiImplicitParam(name = "tradeOrderId", value = "交易订单编号", required = true) + @ApiImplicitParam(name = "tradeOrderId", value = "交易订单编号", required = true, dataTypeClass = Long.class) public CommonResult getTradeOrder(@RequestParam("tradeOrderId") Integer tradeOrderId) { // return success(tradeOrderService.getTradeOrder(tradeOrderId)); return null; diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java b/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java index ee5f8f529..57db3f942 100644 --- a/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java +++ b/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java @@ -22,6 +22,9 @@ public class YudaoServerApplication { // 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章 SpringApplication.run(YudaoServerApplication.class, args); +// new SpringApplicationBuilder(YudaoServerApplication.class) +// .applicationStartup(new BufferingApplicationStartup(20480)) +// .run(args); // 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章 // 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章 From c5b547e0f381a45c724ef9ea83de84acfa553385 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 20:22:09 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20@Configuration(proxyBeanMethods=20=3D=20false)=20?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E5=90=AF=E5=8A=A8=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/ssodemo/framework/config/SecurityConfiguration.java | 2 +- .../yudao/ssodemo/framework/config/SecurityConfiguration.java | 2 +- .../config/YudaoDataPermissionAutoConfiguration.java | 2 +- .../config/YudaoDeptDataPermissionAutoConfiguration.java | 2 +- .../module/bpm/framework/bpm/config/BpmCommonConfiguration.java | 2 +- .../bpm/framework/flowable/config/BpmFlowableConfiguration.java | 2 +- .../infra/framework/codegen/config/CodegenConfiguration.java | 2 +- .../framework/monitor/config/AdminServerConfiguration.java | 2 +- .../infra/framework/security/config/SecurityConfiguration.java | 2 +- .../module/pay/framework/job/config/PayJobConfiguration.java | 2 +- .../yudao/module/system/framework/sms/SmsCodeConfiguration.java | 2 +- .../framework/jmreport/config/JmReportConfiguration.java | 2 +- .../yudao/server/framework/ui/config/AdminUiConfiguration.java | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/yudao-example/yudao-sso-demo-by-code/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java b/yudao-example/yudao-sso-demo-by-code/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java index 1d19fcfdb..a81330fd2 100644 --- a/yudao-example/yudao-sso-demo-by-code/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java +++ b/yudao-example/yudao-sso-demo-by-code/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java @@ -11,7 +11,7 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic import javax.annotation.Resource; -@Configuration +@Configuration(proxyBeanMethods = false) public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Resource diff --git a/yudao-example/yudao-sso-demo-by-password/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java b/yudao-example/yudao-sso-demo-by-password/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java index 1d19fcfdb..a81330fd2 100644 --- a/yudao-example/yudao-sso-demo-by-password/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java +++ b/yudao-example/yudao-sso-demo-by-password/src/main/java/cn/iocoder/yudao/ssodemo/framework/config/SecurityConfiguration.java @@ -11,7 +11,7 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic import javax.annotation.Resource; -@Configuration +@Configuration(proxyBeanMethods = false) public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Resource diff --git a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java index 62534ed63..5af6f7a15 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java @@ -17,7 +17,7 @@ import java.util.List; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class YudaoDataPermissionAutoConfiguration { @Bean diff --git a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDeptDataPermissionAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDeptDataPermissionAutoConfiguration.java index 92da456ee..642c40d51 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDeptDataPermissionAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDeptDataPermissionAutoConfiguration.java @@ -16,7 +16,7 @@ import java.util.List; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnClass(LoginUser.class) @ConditionalOnBean(value = {PermissionApi.class, DeptDataPermissionRuleCustomizer.class}) public class YudaoDeptDataPermissionAutoConfiguration { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java index 8915fc6b5..7a6ca7711 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmCommonConfiguration.java @@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration; /** * BPM 通用的 Configuration 配置类,提供给 Activiti 和 Flowable */ -@Configuration +@Configuration(proxyBeanMethods = false) public class BpmCommonConfiguration { @Bean diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java index cb2b52e61..c048d9c73 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java @@ -15,7 +15,7 @@ import org.springframework.context.annotation.Configuration; * * @author jason */ -@Configuration +@Configuration(proxyBeanMethods = false) public class BpmFlowableConfiguration { /** diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenConfiguration.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenConfiguration.java index de4952926..d49723d5c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenConfiguration.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenConfiguration.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.infra.framework.codegen.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties(CodegenProperties.class) public class CodegenConfiguration { } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/monitor/config/AdminServerConfiguration.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/monitor/config/AdminServerConfiguration.java index 697426e44..0c29865c3 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/monitor/config/AdminServerConfiguration.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/monitor/config/AdminServerConfiguration.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.infra.framework.monitor.config; import de.codecentric.boot.admin.server.config.EnableAdminServer; import org.springframework.context.annotation.Configuration; -@Configuration +@Configuration(proxyBeanMethods = false) @EnableAdminServer public class AdminServerConfiguration { } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java index b80c2d660..c99cc1a8d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java @@ -10,7 +10,7 @@ import org.springframework.security.config.annotation.web.configurers.Expression /** * Infra 模块的 Security 配置 */ -@Configuration("infraSecurityConfiguration") +@Configuration(proxyBeanMethods = false, value = "infraSecurityConfiguration") public class SecurityConfiguration { @Value("${spring.boot.admin.context-path:''}") diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/job/config/PayJobConfiguration.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/job/config/PayJobConfiguration.java index 42bd32a8f..cd6bd0bb7 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/job/config/PayJobConfiguration.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/job/config/PayJobConfiguration.java @@ -6,7 +6,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.concurrent.ThreadPoolExecutor; -@Configuration +@Configuration(proxyBeanMethods = false) public class PayJobConfiguration { public static final String NOTIFY_THREAD_POOL_TASK_EXECUTOR = "NOTIFY_THREAD_POOL_TASK_EXECUTOR"; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/sms/SmsCodeConfiguration.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/sms/SmsCodeConfiguration.java index eb8620c61..ddc70a39e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/sms/SmsCodeConfiguration.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/sms/SmsCodeConfiguration.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.system.framework.sms; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties(SmsCodeProperties.class) public class SmsCodeConfiguration { } diff --git a/yudao-module-visualization/yudao-module-visualization-biz/src/main/java/cn/iocoder/yudao/module/visualization/framework/jmreport/config/JmReportConfiguration.java b/yudao-module-visualization/yudao-module-visualization-biz/src/main/java/cn/iocoder/yudao/module/visualization/framework/jmreport/config/JmReportConfiguration.java index a6f8d16fa..59510b5ff 100644 --- a/yudao-module-visualization/yudao-module-visualization-biz/src/main/java/cn/iocoder/yudao/module/visualization/framework/jmreport/config/JmReportConfiguration.java +++ b/yudao-module-visualization/yudao-module-visualization-biz/src/main/java/cn/iocoder/yudao/module/visualization/framework/jmreport/config/JmReportConfiguration.java @@ -12,7 +12,7 @@ import org.springframework.context.annotation.Configuration; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ComponentScan(basePackages = "org.jeecg.modules.jmreport") // 扫描积木报表的包 public class JmReportConfiguration { diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/config/AdminUiConfiguration.java b/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/config/AdminUiConfiguration.java index c24ae0d3e..deeda8d7a 100644 --- a/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/config/AdminUiConfiguration.java +++ b/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/config/AdminUiConfiguration.java @@ -11,7 +11,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; * * @author 芋道源码 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class AdminUiConfiguration implements WebMvcConfigurer { @Override From 1819e0e1d6811e1170c6b5aa76dff598a6760e17 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 20:57:28 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E5=8C=96=20Redis=20MQ=20?= =?UTF-8?q?=E7=9A=84=E5=88=9D=E5=A7=8B=E5=8C=96=EF=BC=8C=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/mq/config/YudaoMQAutoConfiguration.java | 7 +++++++ yudao-server/src/main/resources/application-local.yaml | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java index 9efdd4c87..1d4914111 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java @@ -25,6 +25,7 @@ import org.springframework.data.redis.listener.ChannelTopic; import org.springframework.data.redis.listener.RedisMessageListenerContainer; import org.springframework.data.redis.stream.DefaultStreamMessageListenerContainerX; import org.springframework.data.redis.stream.StreamMessageListenerContainer; +import org.springframework.scheduling.annotation.Async; import java.util.List; import java.util.Properties; @@ -54,6 +55,7 @@ public class YudaoMQAutoConfiguration { * 创建 Redis Pub/Sub 广播消费的容器 */ @Bean + @Async // 异步化,可降低 2 秒左右的启动时间 public RedisMessageListenerContainer redisMessageListenerContainer( RedisMQTemplate redisMQTemplate, List> listeners) { // 创建 RedisMessageListenerContainer 对象 @@ -76,6 +78,7 @@ public class YudaoMQAutoConfiguration { * Redis Stream 的 xreadgroup 命令:https://www.geek-book.com/src/docs/redis/redis/redis.io/commands/xreadgroup.html */ @Bean(initMethod = "start", destroyMethod = "stop") + @Async // 异步化,可降低 5 秒左右的启动时间 public StreamMessageListenerContainer> redisStreamMessageListenerContainer( RedisMQTemplate redisMQTemplate, List> listeners) { RedisTemplate redisTemplate = redisMQTemplate.getRedisTemplate(); @@ -95,6 +98,8 @@ public class YudaoMQAutoConfiguration { // 第二步,注册监听器,消费对应的 Stream 主题 String consumerName = buildConsumerName(); listeners.parallelStream().forEach(listener -> { + log.info("[redisStreamMessageListenerContainer][开始注册 StreamKey({}) 对应的监听器({})]", + listener.getStreamKey(), listener.getClass().getName()); // 创建 listener 对应的消费者分组 try { redisTemplate.opsForStream().createGroup(listener.getStreamKey(), listener.getGroup()); @@ -111,6 +116,8 @@ public class YudaoMQAutoConfiguration { .autoAcknowledge(false) // 不自动 ack .cancelOnError(throwable -> false); // 默认配置,发生异常就取消消费,显然不符合预期;因此,我们设置为 false container.register(builder.build(), listener); + log.info("[redisStreamMessageListenerContainer][完成注册 StreamKey({}) 对应的监听器({})]", + listener.getStreamKey(), listener.getClass().getName()); }); return container; } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index ad111ff3c..1e7627c7e 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -30,7 +30,7 @@ spring: multi-statement-allow: true dynamic: # 多数据源配置 druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 + initial-size: 1 # 初始连接数 min-idle: 10 # 最小连接池数量 max-active: 20 # 最大连接池数量 max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 @@ -171,6 +171,7 @@ logging: cn.iocoder.yudao.module.member.dal.mysql: debug cn.iocoder.yudao.module.trade.dal.mysql: debug cn.iocoder.yudao.module.promotion.dal.mysql: debug +debug: false --- #################### 微信公众号、小程序相关配置 #################### wx: From 4807854df6f645aed266b3eac3e7b7acce66fd9a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 12 Nov 2022 21:31:22 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=BC=95?= =?UTF-8?q?=E5=85=A5=20mall=20=E6=A8=A1=E5=9D=97=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E8=AF=81=E5=90=AF=E5=8A=A8=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-server/pom.xml | 42 ++++++++++--------- .../src/main/resources/application-dev.yaml | 14 ------- .../src/main/resources/application-local.yaml | 14 ------- 3 files changed, 22 insertions(+), 48 deletions(-) diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 852a9dff0..7dd658a2b 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -36,31 +36,33 @@ yudao-module-infra-biz ${revision} + cn.iocoder.boot yudao-module-pay-biz ${revision} - - cn.iocoder.boot - yudao-module-market-biz - ${revision} - - - cn.iocoder.boot - yudao-module-product-biz - ${revision} - - - cn.iocoder.boot - yudao-module-trade-biz - ${revision} - - - cn.iocoder.boot - yudao-module-coupon-biz - ${revision} - + + + + + + + + + + + + + + + + + + + + + diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index 256afc005..69896f780 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -94,20 +94,6 @@ spring: jdbc: # 使用 JDBC 的 JobStore 的时候,JDBC 的配置 initialize-schema: NEVER # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。 ---- #################### 配置中心相关配置 #################### - -# Apollo 配置中心 -apollo: - bootstrap: - enabled: true # 设置 Apollo 在启动阶段生效 - eagerLoad: - enabled: true # 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置 - jdbc: # 自定义的 JDBC 配置项,用于数据库的地址 - dao: cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigDAOImpl - url: ${spring.datasource.dynamic.datasource.master.url} - username: ${spring.datasource.dynamic.datasource.master.username} - password: ${spring.datasource.dynamic.datasource.master.password} - --- #################### 服务保障相关配置 #################### # Lock4j 配置项 diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 1e7627c7e..a0f09eff3 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -104,20 +104,6 @@ spring: jdbc: # 使用 JDBC 的 JobStore 的时候,JDBC 的配置 initialize-schema: NEVER # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。 ---- #################### 配置中心相关配置 #################### - -# Apollo 配置中心 -apollo: - bootstrap: - enabled: true # 设置 Apollo 在启动阶段生效 - eagerLoad: - enabled: true # 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置 - jdbc: # 自定义的 JDBC 配置项,用于数据库的地址 - dao: cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigDAOImpl - url: ${spring.datasource.dynamic.datasource.master.url} - username: ${spring.datasource.dynamic.datasource.master.username} - password: ${spring.datasource.dynamic.datasource.master.password} - --- #################### 服务保障相关配置 #################### # Lock4j 配置项