From 20066bc864b32d1a21c492d0f05abd644e13e9eb Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 2 May 2021 00:41:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=9E=84=E8=B0=83?= =?UTF-8?q?=E6=95=B4=20x=2015=20:=20=E5=B0=86=20web=E3=80=81security?= =?UTF-8?q?=E3=80=81operatelog=20=E7=AD=89=E7=BB=84=E4=BB=B6=E6=8B=86?= =?UTF-8?q?=E5=88=86=E5=87=BA=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-admin-server/pom.xml | 18 ++++++ .../config/InfConfigController.java | 4 +- .../controller/job/InfJobController.java | 4 +- .../controller/job/InfJobLogController.java | 4 +- .../logger/InfApiAccessLogController.java | 4 +- .../logger/InfApiErrorLogController.java | 6 +- .../logger/InfApiAccessLogConvert.java | 2 +- .../convert/logger/InfApiErrorLogConvert.java | 2 +- .../file/config/FileConfiguration.java | 2 +- .../framework/file/config/FileProperties.java | 2 +- .../infra}/framework/file/package-info.java | 2 +- .../modules/infra/framework/package-info.java | 6 ++ .../service/file/impl/InfFileServiceImpl.java | 2 +- .../logger/InfApiAccessLogService.java | 2 +- .../service/logger/InfApiErrorLogService.java | 2 +- .../impl/InfApiAccessLogServiceImpl.java | 2 +- .../impl/InfApiErrorLogServiceImpl.java | 2 +- .../controller/auth/SysAuthController.java | 6 +- .../controller/dept/SysPostController.java | 4 +- .../dict/SysDictDataController.java | 4 +- .../dict/SysDictTypeController.java | 4 +- .../errorcode/SysErrorCodeController.java | 4 +- .../logger/SysLoginLogController.java | 4 +- .../logger/SysOperateLogController.java | 4 +- .../permission/SysRoleController.java | 4 +- .../controller/sms/SmsCallbackController.java | 2 +- .../controller/sms/SysSmsLogController.java | 4 +- .../sms/SysSmsTemplateController.java | 4 +- .../controller/user/SysUserController.java | 4 +- .../user/SysUserProfileController.java | 2 +- .../system/convert/auth/SysAuthConvert.java | 2 +- .../errorcode/SysErrorCodeConvert.java | 4 +- .../convert/logger/SysOperateLogConvert.java | 2 +- .../dal/dataobject/auth/SysUserSessionDO.java | 2 +- .../dataobject/logger/SysOperateLogDO.java | 2 +- .../dal/dataobject/permission/SysRoleDO.java | 2 +- .../dal/redis/SysRedisKeyConstants.java | 4 +- .../dal/redis/auth/SysLoginUserRedisDAO.java | 2 +- .../captcha/config/CaptchaConfig.java | 2 +- .../captcha/config/CaptchaProperties.java | 2 +- .../framework/captcha/package-info.java | 4 ++ .../codegen/config/CodegenConfiguration.java | 2 +- .../codegen/config/CodegenProperties.java | 2 +- .../framework/codegen/package-info.java | 4 ++ .../system/framework/package-info.java | 6 ++ .../system/service/auth/SysAuthService.java | 2 +- .../service/auth/SysUserSessionService.java | 2 +- .../service/auth/impl/SysAuthServiceImpl.java | 4 +- .../auth/impl/SysUserSessionServiceImpl.java | 6 +- .../common/impl/SysCaptchaServiceImpl.java | 2 +- .../errorcode/SysErrorCodeService.java | 2 +- .../impl/SysErrorCodeServiceImpl.java | 4 +- .../service/logger/SysOperateLogService.java | 2 +- .../logger/impl/SysOperateLogServiceImpl.java | 2 +- .../permission/SysPermissionService.java | 2 +- .../impl/SysPermissionServiceImpl.java | 2 +- .../test/ToolTestDemoController.java | 4 +- .../dal/dataobject/test/ToolTestDemoDO.java | 2 +- .../config/ErrorCodeConfiguration.java | 12 ++-- .../errorcode/config/ErrorCodeProperties.java | 2 +- .../core/dto/ErrorCodeAutoGenerateReqDTO.java | 2 +- .../errorcode/core/dto/ErrorCodeRespDTO.java | 2 +- .../generator/ErrorCodeAutoGenerator.java | 2 +- .../generator/ErrorCodeAutoGeneratorImpl.java | 6 +- .../core/loader/ErrorCodeLoader.java | 2 +- .../core/loader/ErrorCodeLoaderImpl.java | 6 +- .../service/ErrorCodeFrameworkService.java | 6 +- .../framework/errorcode/package-info.java | 2 +- .../modules/tool/framework/package-info.java | 6 ++ .../codegen/impl/ToolCodegenEngine.java | 6 +- .../codegen/impl/ToolCodegenServiceImpl.java | 2 +- .../service/file/InfFileServiceTest.java | 2 +- .../InfApiAccessLogServiceImplTest.java | 2 +- .../logger/InfApiErrorLogServiceImplTest.java | 2 +- .../service/auth/SysAuthServiceImplTest.java | 2 +- .../auth/SysUserSessionServiceImplTest.java | 4 +- .../service/common/SysCaptchaServiceTest.java | 2 +- .../errorcode/SysErrorCodeServiceTest.java | 2 +- .../logger/SysLoginLogServiceImplTest.java | 2 +- .../logger/SysOperateLogServiceImplTest.java | 6 +- .../permission/SysRoleServiceTest.java | 2 +- yudao-dependencies/pom.xml | 37 +++++++++++- yudao-framework/pom.xml | 5 ++ yudao-framework/yudao-common/pom.xml | 6 ++ .../common/enums/WebFilterOrderEnum.java} | 8 ++- .../framework/util/monitor}/TracerUtils.java | 4 +- yudao-framework/yudao-framework-all/pom.xml | 28 --------- .../framework/captcha/package-info.java | 4 -- .../framework/codegen/package-info.java | 4 -- .../logger/operatelog/core/package-info.java | 1 - .../framework/logger/package-info.java | 10 ---- .../config/TracerAutoConfiguration.java | 4 +- .../tracer/core/filter/TraceFilter.java | 2 +- .../yudao-spring-boot-starter-monitor/pom.xml | 18 ++++++ .../yudao-spring-boot-starter-mybatis/pom.xml | 14 ++--- .../core/handler/DefaultDBFieldHandler.java | 29 +++++---- .../pom.xml | 44 ++++++++++++++ .../YudaoOperateLogAutoConfiguration.java} | 6 +- .../core/annotations/OperateLog.java | 4 +- .../operatelog/core/aop/OperateLogAspect.java | 16 ++--- .../core/dto/OperateLogCreateReqDTO.java | 2 +- .../core/enums/OperateTypeEnum.java | 4 +- .../operatelog/core/package-info.java | 1 + .../service/OperateLogFrameworkService.java | 4 +- .../operatelog/core/util/OperateLogUtils.java | 4 +- .../framework/operatelog/package-info.java | 6 ++ .../pom.xml | 18 ++++++ .../pom.xml | 38 ++++++++++++ .../security/config/SecurityProperties.java | 2 +- .../config/YudaoSecurityConfiguration.java} | 29 ++++----- .../framework/security/core/LoginUser.java | 2 +- .../security/core/enums/DataScopeEnum.java | 2 +- .../filter/JwtAuthenticationTokenFilter.java | 12 ++-- .../core/handler/AccessDeniedHandlerImpl.java | 4 +- .../handler/AuthenticationEntryPointImpl.java | 2 +- .../handler/LogoutSuccessHandlerImpl.java | 9 +-- .../service/SecurityAuthFrameworkService.java | 4 +- .../SecurityPermissionFrameworkService.java | 2 +- .../core/util/SecurityFrameworkUtils.java | 6 +- .../framework/security/package-info.java | 2 +- ...pring Boot 安全框架 Spring Security 入门》.md | 0 .../yudao-spring-boot-starter-web/pom.xml | 59 +++++++++++++++++++ .../config/YudaoApiLogAutoConfiguration.java} | 17 +++--- .../core/filter/ApiAccessLogFilter.java | 12 ++-- .../service/ApiAccessLogFrameworkService.java | 4 +- .../service/ApiErrorLogFrameworkService.java | 4 +- .../service/dto/ApiAccessLogCreateDTO.java | 2 +- .../service/dto/ApiErrorLogCreateDTO.java | 2 +- .../yudao/framework/apilog/package-info.java | 8 +++ .../YudaoJacksonAutoConfiguration.java} | 8 +-- .../databind}/LocalDateTimeDeserializer.java | 2 +- .../databind}/LocalDateTimeSerializer.java | 2 +- .../framework/jackson/core/package-info.java | 1 + .../iocoder/yudao/framework/package-info.java | 1 + .../swagger/config/SwaggerProperties.java | 2 +- .../YudaoSwaggerAutoConfiguration.java} | 4 +- .../framework/swagger/package-info.java | 2 +- .../framework/web/config/WebProperties.java | 4 +- .../framework/web/config/XssProperties.java | 2 +- .../config/YudaoWebAutoConfiguration.java} | 20 +++---- .../core/filter/CacheRequestBodyFilter.java | 2 +- .../core/filter/CacheRequestBodyWrapper.java | 2 +- .../framework/web/core/filter/DemoFilter.java | 6 +- .../framework/web/core/filter/XssFilter.java | 4 +- .../web/core/filter/XssRequestWrapper.java | 2 +- .../core/handler/GlobalExceptionHandler.java | 13 ++-- .../handler/GlobalResponseBodyHandler.java | 6 +- .../web/core/util/WebFrameworkUtils.java | 22 ++++++- .../yudao}/framework/web/package-info.java | 2 +- ... Spring Boot API 接口文档 Swagger 入门》.md | 0 .../《芋道 Spring Boot SpringMVC 入门》.md | 0 151 files changed, 575 insertions(+), 313 deletions(-) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra}/framework/file/config/FileConfiguration.java (80%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra}/framework/file/config/FileProperties.java (88%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra}/framework/file/package-info.java (93%) create mode 100644 yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/package-info.java rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system}/framework/captcha/config/CaptchaConfig.java (77%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system}/framework/captcha/config/CaptchaProperties.java (91%) create mode 100644 yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/package-info.java rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system}/framework/codegen/config/CodegenConfiguration.java (78%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system}/framework/codegen/config/CodegenProperties.java (90%) create mode 100644 yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/package-info.java create mode 100644 yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/package-info.java rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/config/ErrorCodeConfiguration.java (71%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/config/ErrorCodeProperties.java (88%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java (90%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/core/dto/ErrorCodeRespDTO.java (83%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java (70%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java (92%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/core/loader/ErrorCodeLoader.java (86%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java (89%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/core/service/ErrorCodeFrameworkService.java (73%) rename {yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool}/framework/errorcode/package-info.java (62%) create mode 100644 yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/package-info.java rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/enums/FilterOrderEnum.java => yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/WebFilterOrderEnum.java} (67%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/util => yudao-common/src/main/java/cn/iocoder/yudao/framework/util/monitor}/TracerUtils.java (76%) delete mode 100644 yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/package-info.java delete mode 100644 yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/package-info.java delete mode 100644 yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/package-info.java delete mode 100644 yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/package-info.java create mode 100644 yudao-framework/yudao-spring-boot-starter-monitor/pom.xml create mode 100644 yudao-framework/yudao-spring-boot-starter-operatelog/pom.xml rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/config/OperateLogConfiguration.java => yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java} (56%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework}/operatelog/core/annotations/OperateLog.java (88%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework}/operatelog/core/aop/OperateLogAspect.java (95%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework}/operatelog/core/dto/OperateLogCreateReqDTO.java (97%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework}/operatelog/core/enums/OperateTypeEnum.java (84%) create mode 100644 yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework}/operatelog/core/service/OperateLogFrameworkService.java (65%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework}/operatelog/core/util/OperateLogUtils.java (72%) create mode 100644 yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java create mode 100644 yudao-framework/yudao-spring-boot-starter-protection/pom.xml create mode 100644 yudao-framework/yudao-spring-boot-starter-security/pom.xml rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/config/SecurityProperties.java (96%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoSecurityConfiguration.java} (87%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/LoginUser.java (97%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/enums/DataScopeEnum.java (89%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/filter/JwtAuthenticationTokenFilter.java (86%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/handler/AccessDeniedHandlerImpl.java (92%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/handler/AuthenticationEntryPointImpl.java (96%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/handler/LogoutSuccessHandlerImpl.java (80%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/service/SecurityAuthFrameworkService.java (86%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/service/SecurityPermissionFrameworkService.java (93%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/core/util/SecurityFrameworkUtils.java (94%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao}/framework/security/package-info.java (66%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security => yudao-spring-boot-starter-security}/《芋道 Spring Boot 安全框架 Spring Security 入门》.md (100%) create mode 100644 yudao-framework/yudao-spring-boot-starter-web/pom.xml rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/config/ApiLogConfiguration.java => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java} (63%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework}/apilog/core/filter/ApiAccessLogFilter.java (91%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework}/apilog/core/service/ApiAccessLogFrameworkService.java (72%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework}/apilog/core/service/ApiErrorLogFrameworkService.java (72%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework}/apilog/core/service/dto/ApiAccessLogCreateDTO.java (95%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework}/apilog/core/service/dto/ApiErrorLogCreateDTO.java (97%) create mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/package-info.java rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/config/JacksonConfig.java => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java} (82%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/deser => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind}/LocalDateTimeDeserializer.java (93%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/ser => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind}/LocalDateTimeSerializer.java (92%) create mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/package-info.java create mode 100644 yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/package-info.java rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/swagger/config/SwaggerProperties.java (93%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerAutoConfiguration.java => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java} (97%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/swagger/package-info.java (64%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/config/WebProperties.java (90%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/config/XssProperties.java (91%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java} (81%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/filter/CacheRequestBodyFilter.java (94%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/filter/CacheRequestBodyWrapper.java (96%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/filter/DemoFilter.java (82%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/filter/XssFilter.java (92%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/filter/XssRequestWrapper.java (98%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/handler/GlobalExceptionHandler.java (96%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/handler/GlobalResponseBodyHandler.java (88%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/core/util/WebFrameworkUtils.java (61%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard => yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao}/framework/web/package-info.java (50%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger => yudao-spring-boot-starter-web}/《芋道 Spring Boot API 接口文档 Swagger 入门》.md (100%) rename yudao-framework/{yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web => yudao-spring-boot-starter-web}/《芋道 Spring Boot SpringMVC 入门》.md (100%) diff --git a/yudao-admin-server/pom.xml b/yudao-admin-server/pom.xml index 16aef71a5..d0b76708f 100644 --- a/yudao-admin-server/pom.xml +++ b/yudao-admin-server/pom.xml @@ -23,6 +23,17 @@ ${revision} + + + cn.iocoder.boot + yudao-spring-boot-starter-web + + + + cn.iocoder.boot + yudao-spring-boot-starter-security + + cn.iocoder.boot @@ -53,6 +64,13 @@ podam test + + + + cn.iocoder.boot + yudao-spring-boot-starter-operatelog + + diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java index 4919293b7..a4b6359f5 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.infra.controller.config; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.infra.controller.config.vo.*; import cn.iocoder.dashboard.modules.infra.convert.config.InfConfigConvert; import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; @@ -23,7 +23,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_SENSITIVE; @Api(tags = "参数配置") diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobController.java index fb053ec1c..155abe6fa 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.infra.controller.job; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.framework.quartz.core.util.CronUtils; import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.*; import cn.iocoder.dashboard.modules.infra.convert.job.InfJobConvert; @@ -28,7 +28,7 @@ import java.util.Date; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "定时任务") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java index 0b338a3a1..bf5c92f05 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.infra.controller.job; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExcelVO; import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; @@ -29,7 +29,7 @@ import java.util.Collection; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "定时任务日志") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiAccessLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiAccessLogController.java index 4c4f068e5..b4bdc61a1 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiAccessLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiAccessLogController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.infra.controller.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; @@ -26,7 +26,7 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "API 访问日志") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiErrorLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiErrorLogController.java index b50adba1b..9827d332f 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiErrorLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiErrorLogController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.infra.controller.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; @@ -26,8 +26,8 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Api(tags = "API 错误日志") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiAccessLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiAccessLogConvert.java index e8afadae2..54dce318c 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiAccessLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiAccessLogConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.infra.convert.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogRespVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiErrorLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiErrorLogConvert.java index 874a0c7a1..91ecb4598 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiErrorLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiErrorLogConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.infra.convert.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogRespVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/config/FileConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/config/FileConfiguration.java similarity index 80% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/config/FileConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/config/FileConfiguration.java index 673c3d283..ef3532d86 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/config/FileConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/config/FileConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.file.config; +package cn.iocoder.dashboard.modules.infra.framework.file.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/config/FileProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/config/FileProperties.java similarity index 88% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/config/FileProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/config/FileProperties.java index 318a97f25..ad14835b9 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/config/FileProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/config/FileProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.file.config; +package cn.iocoder.dashboard.modules.infra.framework.file.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/package-info.java similarity index 93% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/package-info.java index 1c2900fab..0816a3377 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/file/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/file/package-info.java @@ -13,4 +13,4 @@ * 综合考虑,暂时使用方案 3 的方式,比较适合这样一个 all in one 的项目。 * 随着文件的量级大了之后,还是推荐采用云服务。 */ -package cn.iocoder.dashboard.framework.file; +package cn.iocoder.dashboard.modules.infra.framework.file; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/package-info.java new file mode 100644 index 000000000..901826255 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/framework/package-info.java @@ -0,0 +1,6 @@ +/** + * 属于 infra 模块的 framework 封装 + * + * @author 芋道源码 + */ +package cn.iocoder.dashboard.modules.infra.framework; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/impl/InfFileServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/impl/InfFileServiceImpl.java index bedfe4059..9b22733ec 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/impl/InfFileServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/impl/InfFileServiceImpl.java @@ -2,7 +2,7 @@ package cn.iocoder.dashboard.modules.infra.service.file.impl; import cn.hutool.core.io.FileTypeUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.file.config.FileProperties; +import cn.iocoder.dashboard.modules.infra.framework.file.config.FileProperties; import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFilePageReqVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; import cn.iocoder.dashboard.modules.infra.dal.mysql.file.InfFileMapper; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogService.java index b486bda73..d657ae774 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogService.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.infra.service.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.ApiAccessLogFrameworkService; +import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogService.java index 270b72416..2a6278c0d 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogService.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.infra.service.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.ApiErrorLogFrameworkService; +import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java index 0b80c28af..35f73b82c 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.infra.service.logger.impl; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; import cn.iocoder.dashboard.modules.infra.convert.logger.InfApiAccessLogConvert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java index 54268bd1a..7ce523c12 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.infra.service.logger.impl; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; import cn.iocoder.dashboard.modules.infra.convert.logger.InfApiErrorLogConvert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java index 1e37f2c3e..6c7b71546 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java @@ -2,7 +2,7 @@ package cn.iocoder.dashboard.modules.system.controller.auth; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginRespVO; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthMenuRespVO; @@ -27,8 +27,8 @@ import javax.validation.Valid; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserRoleIds; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserRoleIds; import static cn.iocoder.yudao.framework.util.servlet.ServletUtils.getClientIP; import static cn.iocoder.yudao.framework.util.servlet.ServletUtils.getUserAgent; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java index 9034f0110..5f87e38f8 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.*; import cn.iocoder.dashboard.modules.system.convert.dept.SysPostConvert; import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; @@ -25,7 +25,7 @@ import java.util.Comparator; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "岗位") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java index 8f900811c..4411d73d7 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.dict; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.*; import cn.iocoder.dashboard.modules.system.convert.dict.SysDictDataConvert; import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictDataDO; @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "字典数据") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java index 7dca82474..21e1f7537 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.dict; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.*; import cn.iocoder.dashboard.modules.system.convert.dict.SysDictTypeConvert; import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "字典类型") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.java index 4b3d2247a..80d7698b5 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.errorcode; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.convert.errorcode.SysErrorCodeConvert; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.*; import cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "错误码") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java index 930c76806..3758546f5 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExcelVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; @@ -25,7 +25,7 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "登陆日志") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java index ea8741409..86375102e 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; @@ -33,7 +33,7 @@ import java.util.List; import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "操作日志") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java index 3930297da..0e660af18 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.*; import cn.iocoder.dashboard.modules.system.convert.permission.SysRoleConvert; import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; @@ -25,7 +25,7 @@ import java.util.Comparator; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "角色") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SmsCallbackController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SmsCallbackController.java index 63b232308..3f70116d5 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SmsCallbackController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SmsCallbackController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.sms; import cn.hutool.core.util.URLUtil; import cn.hutool.extra.servlet.ServletUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.framework.sms.core.enums.SmsChannelEnum; import cn.iocoder.dashboard.modules.system.service.sms.SysSmsService; import io.swagger.annotations.Api; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsLogController.java index d765b7be7..d2fe9513f 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsLogController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.sms; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExcelVO; import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; @@ -26,7 +26,7 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "短信日志") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.java index 806f14369..16745d7a2 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.controller.sms; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.*; import cn.iocoder.dashboard.modules.system.convert.sms.SysSmsTemplateConvert; import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api("短信模板") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java index b47dc8346..4a79d0806 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.modules.system.controller.user.vo.user.*; import cn.iocoder.dashboard.modules.system.convert.user.SysUserConvert; import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; @@ -31,7 +31,7 @@ import java.io.IOException; import java.util.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "用户") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java index fc362e1fc..60e51ee9e 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java @@ -29,7 +29,7 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.FILE_IS_EMPTY; /** diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java index 20d3e7b1d..b90eae258 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java @@ -1,6 +1,6 @@ package cn.iocoder.dashboard.modules.system.convert.auth; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthMenuRespVO; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthPermissionInfoRespVO; import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/errorcode/SysErrorCodeConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/errorcode/SysErrorCodeConvert.java index a3c93a4e0..118d4d510 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/errorcode/SysErrorCodeConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/errorcode/SysErrorCodeConvert.java @@ -1,8 +1,8 @@ package cn.iocoder.dashboard.modules.system.convert.errorcode; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExcelVO; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeRespVO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysOperateLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysOperateLogConvert.java index 9d88b1fb3..980510e87 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysOperateLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysOperateLogConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.system.convert.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogRespVO; import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java index 874031e8f..4fa45e1f7 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.system.dal.dataobject.auth; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysOperateLogDO.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysOperateLogDO.java index bda9b2e3f..214385145 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysOperateLogDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysOperateLogDO.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.system.dal.dataobject.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; import com.baomidou.mybatisplus.annotation.TableField; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleDO.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleDO.java index b2147843d..e6dfd7480 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleDO.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.dal.dataobject.permission; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler; -import cn.iocoder.dashboard.framework.security.core.enums.DataScopeEnum; +import cn.iocoder.yudao.framework.security.core.enums.DataScopeEnum; import cn.iocoder.dashboard.modules.system.enums.permission.RoleCodeEnum; import cn.iocoder.dashboard.modules.system.enums.permission.SysRoleTypeEnum; import com.baomidou.mybatisplus.annotation.TableField; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java index 070f65c90..38cdac0e4 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java @@ -1,9 +1,7 @@ package cn.iocoder.dashboard.modules.system.dal.redis; import cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine; -import cn.iocoder.dashboard.framework.security.core.LoginUser; - -import java.time.Duration; +import cn.iocoder.yudao.framework.security.core.LoginUser; import static cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine.KeyTypeEnum.STRING; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java index 332a10050..d960c20c5 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java @@ -1,6 +1,6 @@ package cn.iocoder.dashboard.modules.system.dal.redis.auth; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService; import cn.iocoder.yudao.framework.util.json.JsonUtils; import org.springframework.data.redis.core.StringRedisTemplate; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaConfig.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/config/CaptchaConfig.java similarity index 77% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaConfig.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/config/CaptchaConfig.java index b1fb8f28c..4df03f890 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaConfig.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/config/CaptchaConfig.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.captcha.config; +package cn.iocoder.dashboard.modules.system.framework.captcha.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/config/CaptchaProperties.java similarity index 91% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/config/CaptchaProperties.java index 9530ea1ee..c3e466db7 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/config/CaptchaProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.captcha.config; +package cn.iocoder.dashboard.modules.system.framework.captcha.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/package-info.java new file mode 100644 index 000000000..9c4e94492 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/captcha/package-info.java @@ -0,0 +1,4 @@ +/** + * 基于 Hutool captcha 库,实现验证码功能 + */ +package cn.iocoder.dashboard.modules.system.framework.captcha; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/config/CodegenConfiguration.java similarity index 78% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/config/CodegenConfiguration.java index 7e357bc86..26faf2933 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/config/CodegenConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.codegen.config; +package cn.iocoder.dashboard.modules.system.framework.codegen.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/config/CodegenProperties.java similarity index 90% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/config/CodegenProperties.java index 8b77bbfb8..7e174f50b 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/config/CodegenProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.codegen.config; +package cn.iocoder.dashboard.modules.system.framework.codegen.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/package-info.java new file mode 100644 index 000000000..2be2578a7 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/codegen/package-info.java @@ -0,0 +1,4 @@ +/** + * 代码生成器 + */ +package cn.iocoder.dashboard.modules.system.framework.codegen; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/package-info.java new file mode 100644 index 000000000..3d233e16c --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/framework/package-info.java @@ -0,0 +1,6 @@ +/** + * 属于 system 模块的 framework 封装 + * + * @author 芋道源码 + */ +package cn.iocoder.dashboard.modules.system.framework; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthService.java index 04eb6d968..e51c09d8a 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthService.java @@ -1,6 +1,6 @@ package cn.iocoder.dashboard.modules.system.service.auth; -import cn.iocoder.dashboard.framework.security.core.service.SecurityAuthFrameworkService; +import cn.iocoder.yudao.framework.security.core.service.SecurityAuthFrameworkService; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; /** diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java index f5e1c5a46..54c9470c8 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.system.service.auth; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java index f8e60ad06..860a9b9cc 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java @@ -2,8 +2,8 @@ package cn.iocoder.dashboard.modules.system.service.auth.impl; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; import cn.iocoder.dashboard.modules.system.convert.auth.SysAuthConvert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java index 3752ee14a..b9294f43e 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java @@ -4,9 +4,9 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.config.SecurityProperties; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; +import cn.iocoder.yudao.framework.security.config.SecurityProperties; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysCaptchaServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysCaptchaServiceImpl.java index 7867de18a..f3be74883 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysCaptchaServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysCaptchaServiceImpl.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.service.common.impl; import cn.hutool.captcha.CaptchaUtil; import cn.hutool.captcha.CircleCaptcha; import cn.hutool.core.util.IdUtil; -import cn.iocoder.dashboard.framework.captcha.config.CaptchaProperties; +import cn.iocoder.dashboard.modules.system.framework.captcha.config.CaptchaProperties; import cn.iocoder.dashboard.modules.system.controller.common.vo.SysCaptchaImageRespVO; import cn.iocoder.dashboard.modules.system.convert.common.SysCaptchaConvert; import cn.iocoder.dashboard.modules.system.dal.redis.common.SysCaptchaRedisDAO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeService.java index 6af17b65c..1fdb5746e 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeService.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.system.service.errorcode; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java index c0d7fd8a0..17e90f3b0 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java @@ -2,8 +2,8 @@ package cn.iocoder.dashboard.modules.system.service.errorcode.impl; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; import cn.iocoder.dashboard.modules.system.convert.errorcode.SysErrorCodeConvert; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogService.java index 46d3293c1..1397a65fb 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogService.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.system.service.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.service.OperateLogFrameworkService; +import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysOperateLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysOperateLogServiceImpl.java index 8b950def7..6263baf53 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysOperateLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysOperateLogServiceImpl.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.service.logger.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; import cn.iocoder.dashboard.modules.system.convert.logger.SysOperateLogConvert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionService.java index 6bb79c446..ed1426c73 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionService.java @@ -1,6 +1,6 @@ package cn.iocoder.dashboard.modules.system.service.permission; -import cn.iocoder.dashboard.framework.security.core.service.SecurityPermissionFrameworkService; +import cn.iocoder.yudao.framework.security.core.service.SecurityPermissionFrameworkService; import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; import org.springframework.lang.Nullable; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysPermissionServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysPermissionServiceImpl.java index 08a8ab03f..45a17eee3 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysPermissionServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysPermissionServiceImpl.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.service.permission.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysRoleMenuMapper; import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysUserRoleMapper; import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.java index 806ee5e59..c8d84a993 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.java @@ -4,7 +4,7 @@ import cn.hutool.core.thread.ThreadUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.dashboard.framework.tracer.core.annotation.BizTrace; import cn.iocoder.dashboard.modules.tool.controller.test.vo.*; import cn.iocoder.dashboard.modules.tool.convert.test.ToolTestDemoConvert; @@ -26,7 +26,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "测试示例") @RestController diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/test/ToolTestDemoDO.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/test/ToolTestDemoDO.java index e46454b53..45f516eba 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/test/ToolTestDemoDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/test/ToolTestDemoDO.java @@ -38,7 +38,7 @@ public class ToolTestDemoDO extends BaseDO { /** * 类型 * - * 枚举 {@link cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum} + * 枚举 {@link cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum} */ private Integer type; /** diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/config/ErrorCodeConfiguration.java similarity index 71% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/config/ErrorCodeConfiguration.java index 21e967e18..695f466d2 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/config/ErrorCodeConfiguration.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.framework.errorcode.config; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.config; -import cn.iocoder.dashboard.framework.errorcode.core.generator.ErrorCodeAutoGenerator; -import cn.iocoder.dashboard.framework.errorcode.core.loader.ErrorCodeLoader; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; -import cn.iocoder.dashboard.framework.errorcode.core.loader.ErrorCodeLoaderImpl; -import cn.iocoder.dashboard.framework.errorcode.core.generator.ErrorCodeAutoGeneratorImpl; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.generator.ErrorCodeAutoGenerator; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.loader.ErrorCodeLoader; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.loader.ErrorCodeLoaderImpl; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.generator.ErrorCodeAutoGeneratorImpl; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/config/ErrorCodeProperties.java similarity index 88% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/config/ErrorCodeProperties.java index 2f629a297..b3bf2cb97 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/config/ErrorCodeProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.config; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java similarity index 90% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java index c89744dd2..4ec2feb10 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.core.dto; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeRespDTO.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/dto/ErrorCodeRespDTO.java similarity index 83% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeRespDTO.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/dto/ErrorCodeRespDTO.java index d54064bf0..78b0a6ce9 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeRespDTO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/dto/ErrorCodeRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.core.dto; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto; import lombok.Data; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java similarity index 70% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java index 530ff9c93..a152f1f21 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.core.generator; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.core.generator; /** * 错误码的自动生成器 diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java similarity index 92% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java index cce51b075..0660de28f 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.framework.errorcode.core.generator; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.core.generator; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ClassUtil; import cn.hutool.core.util.ReflectUtil; import cn.iocoder.yudao.framework.common.exception.ErrorCode; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.context.event.ApplicationReadyEvent; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoader.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/loader/ErrorCodeLoader.java similarity index 86% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoader.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/loader/ErrorCodeLoader.java index e945e23d1..aac3e89ef 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoader.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/loader/ErrorCodeLoader.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.core.loader; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.core.loader; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java similarity index 89% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java index f05ef4c09..e9b6592bf 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.framework.errorcode.core.loader; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.core.loader; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; import cn.iocoder.yudao.framework.util.date.DateUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/service/ErrorCodeFrameworkService.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/service/ErrorCodeFrameworkService.java similarity index 73% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/service/ErrorCodeFrameworkService.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/service/ErrorCodeFrameworkService.java index 53f3f2c42..30b707aa2 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/service/ErrorCodeFrameworkService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/core/service/ErrorCodeFrameworkService.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.framework.errorcode.core.service; +package cn.iocoder.dashboard.modules.tool.framework.errorcode.core.service; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; import javax.validation.Valid; import java.util.Date; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/package-info.java similarity index 62% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/package-info.java index 18ec4ebd1..7d75bc34e 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/errorcode/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/errorcode/package-info.java @@ -3,4 +3,4 @@ * * 将错误码缓存在内存中,同时通过定时器每 n 分钟更新 */ -package cn.iocoder.dashboard.framework.errorcode; +package cn.iocoder.dashboard.modules.tool.framework.errorcode; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/package-info.java new file mode 100644 index 000000000..3c4ce2733 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/framework/package-info.java @@ -0,0 +1,6 @@ +/** + * 属于 tool 模块的 framework 封装 + * + * @author 芋道源码 + */ +package cn.iocoder.dashboard.modules.tool.framework; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenEngine.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenEngine.java index 51e9f32a6..b70f8232a 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenEngine.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenEngine.java @@ -9,12 +9,12 @@ import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.codegen.config.CodegenProperties; +import cn.iocoder.dashboard.modules.system.framework.codegen.config.CodegenProperties; import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java index e89970dbe..f50ec7895 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java @@ -2,7 +2,7 @@ package cn.iocoder.dashboard.modules.tool.service.codegen.impl; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.codegen.config.CodegenProperties; +import cn.iocoder.dashboard.modules.system.framework.codegen.config.CodegenProperties; import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; import cn.iocoder.dashboard.modules.tool.convert.codegen.ToolCodegenConvert; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileServiceTest.java index 4bb665c03..f15d82ea8 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileServiceTest.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.infra.service.file; import cn.hutool.core.io.resource.ResourceUtil; import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.file.config.FileProperties; +import cn.iocoder.dashboard.modules.infra.framework.file.config.FileProperties; import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFilePageReqVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; import cn.iocoder.dashboard.modules.infra.dal.mysql.file.InfFileMapper; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java index d91e685ba..f91901688 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java @@ -5,7 +5,7 @@ import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java index 4685050fb..040fa40b7 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.RandomUtil; import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java index e6cfabece..9be405a77 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java @@ -2,7 +2,7 @@ package cn.iocoder.dashboard.modules.system.service.auth; import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginLogTypeEnum; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java index efbca5dd1..e8126973a 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java @@ -29,8 +29,8 @@ import cn.hutool.core.date.DateUtil; import cn.iocoder.dashboard.BaseDbAndRedisUnitTest; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.config.SecurityProperties; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.config.SecurityProperties; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaServiceTest.java index 5350cd3f8..d397ef16f 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaServiceTest.java @@ -1,7 +1,7 @@ package cn.iocoder.dashboard.modules.system.service.common; import cn.iocoder.dashboard.BaseRedisUnitTest; -import cn.iocoder.dashboard.framework.captcha.config.CaptchaProperties; +import cn.iocoder.dashboard.modules.system.framework.captcha.config.CaptchaProperties; import cn.iocoder.dashboard.modules.system.controller.common.vo.SysCaptchaImageRespVO; import cn.iocoder.dashboard.modules.system.dal.redis.common.SysCaptchaRedisDAO; import cn.iocoder.dashboard.modules.system.service.common.impl.SysCaptchaServiceImpl; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeServiceTest.java index 74e147159..701fb8596 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeServiceTest.java @@ -2,7 +2,7 @@ package cn.iocoder.dashboard.modules.system.service.errorcode; import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.dashboard.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; import cn.iocoder.dashboard.modules.infra.enums.config.InfConfigTypeEnum; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogServiceImplTest.java index aee0fd709..d51b58f4e 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogServiceImplTest.java @@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.service.logger; import cn.hutool.core.util.RandomUtil; import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogServiceImplTest.java index d720734b1..e118ae746 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogServiceImplTest.java @@ -5,9 +5,9 @@ import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleServiceTest.java index 72ea726da..7cc87a310 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleServiceTest.java @@ -4,7 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.iocoder.dashboard.BaseDbUnitTest; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.core.enums.DataScopeEnum; +import cn.iocoder.yudao.framework.security.core.enums.DataScopeEnum; import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRoleCreateReqVO; import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRolePageReqVO; import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRoleUpdateReqVO; diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 632e43eab..c2ee16969 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -79,6 +79,18 @@ + + cn.iocoder.boot + yudao-spring-boot-starter-web + ${revision} + + + + cn.iocoder.boot + yudao-spring-boot-starter-security + ${revision} + + com.github.xiaoymin knife4j-spring-boot-starter @@ -108,7 +120,7 @@ cn.iocoder.boot yudao-spring-boot-starter-mybatis - 1.0.0 + ${revision} @@ -148,6 +160,12 @@ + + cn.iocoder.boot + yudao-spring-boot-starter-protection + ${revision} + + com.baomidou lock4j-redisson-spring-boot-starter @@ -160,6 +178,11 @@ + + io.github.resilience4j + resilience4j-ratelimiter + ${resilience4j.version} + io.github.resilience4j resilience4j-spring-boot2 @@ -167,6 +190,12 @@ + + cn.iocoder.boot + yudao-spring-boot-starter-monitor + ${revision} + + org.apache.skywalking apm-toolkit-trace @@ -226,6 +255,12 @@ ${revision} + + cn.iocoder.boot + yudao-spring-boot-starter-operatelog + ${revision} + + org.projectlombok lombok diff --git a/yudao-framework/pom.xml b/yudao-framework/pom.xml index e2d6889a0..cd025782d 100644 --- a/yudao-framework/pom.xml +++ b/yudao-framework/pom.xml @@ -13,6 +13,11 @@ yudao-common yudao-framework-all yudao-spring-boot-starter-mybatis + yudao-spring-boot-starter-web + yudao-spring-boot-starter-security + yudao-spring-boot-starter-monitor + yudao-spring-boot-starter-protection + yudao-spring-boot-starter-operatelog yudao-framework diff --git a/yudao-framework/yudao-common/pom.xml b/yudao-framework/yudao-common/pom.xml index f799c3d61..17d971cb3 100644 --- a/yudao-framework/yudao-common/pom.xml +++ b/yudao-framework/yudao-common/pom.xml @@ -57,6 +57,12 @@ provided + + + org.apache.skywalking + apm-toolkit-trace + + org.projectlombok diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/enums/FilterOrderEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/WebFilterOrderEnum.java similarity index 67% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/enums/FilterOrderEnum.java rename to yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/WebFilterOrderEnum.java index 93bdb032e..6ad94a369 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/enums/FilterOrderEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/WebFilterOrderEnum.java @@ -1,11 +1,13 @@ -package cn.iocoder.dashboard.framework.web.core.enums; +package cn.iocoder.yudao.framework.common.enums; /** - * 过滤器顺序的枚举类,保证过滤器按照符合我们的预期 + * Web 过滤器顺序的枚举类,保证过滤器按照符合我们的预期 + * + * 考虑到每个 starter 都需要用到该工具类,所以放到 common 模块下的 util 包下 * * @author 芋道源码 */ -public interface FilterOrderEnum { +public interface WebFilterOrderEnum { int CORS_FILTER = Integer.MIN_VALUE; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/util/TracerUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/util/monitor/TracerUtils.java similarity index 76% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/util/TracerUtils.java rename to yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/util/monitor/TracerUtils.java index e8af904ba..384a3df49 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/util/TracerUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/util/monitor/TracerUtils.java @@ -1,10 +1,12 @@ -package cn.iocoder.dashboard.framework.tracer.core.util; +package cn.iocoder.yudao.framework.util.monitor; import org.apache.skywalking.apm.toolkit.trace.TraceContext; /** * 链路追踪工具类 * + * 考虑到每个 starter 都需要用到该工具类,所以放到 common 模块下的 util 包下 + * * @author 芋道源码 */ public class TracerUtils { diff --git a/yudao-framework/yudao-framework-all/pom.xml b/yudao-framework/yudao-framework-all/pom.xml index a6567559b..5bca4c8d3 100644 --- a/yudao-framework/yudao-framework-all/pom.xml +++ b/yudao-framework/yudao-framework-all/pom.xml @@ -24,35 +24,7 @@ true - - org.springframework.boot - spring-boot-starter-aop - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-security - - - - org.springframework.boot - spring-boot-starter-validation - - - - com.github.xiaoymin - knife4j-spring-boot-starter - - - io.swagger - swagger-annotations - diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/package-info.java b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/package-info.java deleted file mode 100644 index 432e3d449..000000000 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/captcha/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 基于 Hutool captcha 库,实现验证码功能 - */ -package cn.iocoder.dashboard.framework.captcha; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/package-info.java b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/package-info.java deleted file mode 100644 index 29f1464fe..000000000 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/codegen/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 代码生成器 - */ -package cn.iocoder.dashboard.framework.codegen; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/package-info.java b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/package-info.java deleted file mode 100644 index 88d69c2a8..000000000 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/package-info.java b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/package-info.java deleted file mode 100644 index 258db8aa7..000000000 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 日志组件,包括: - * - * 1. 用户操作日志:记录用户的操作,用于对用户的操作的审计与追溯,永久保存。 - * 2. API 日志:包含两类 - * 2.1 API 访问日志:记录用户访问 API 的访问日志,定期归档历史日志。 - * 2.2 API 异常日志:记录用户访问 API 的系统异常,方便日常排查问题与告警。 - * 3. 通用 Logger 日志:将 {@link org.slf4j.Logger} 打印的日志,只满足大于等于配置的 {@link org.slf4j.event.Level} 进行持久化,可以理解成简易的“日志中心”。 - */ -package cn.iocoder.dashboard.framework.logger; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/config/TracerAutoConfiguration.java b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/config/TracerAutoConfiguration.java index aeb90af56..7918c8c1e 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/config/TracerAutoConfiguration.java +++ b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/config/TracerAutoConfiguration.java @@ -2,7 +2,7 @@ package cn.iocoder.dashboard.framework.tracer.config; import cn.iocoder.dashboard.framework.tracer.core.aop.BizTraceAspect; import cn.iocoder.dashboard.framework.tracer.core.filter.TraceFilter; -import cn.iocoder.dashboard.framework.web.core.enums.FilterOrderEnum; +import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; import io.opentracing.Tracer; import org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -49,7 +49,7 @@ public class TracerAutoConfiguration { public FilterRegistrationBean traceFilter() { FilterRegistrationBean registrationBean = new FilterRegistrationBean<>(); registrationBean.setFilter(new TraceFilter()); - registrationBean.setOrder(FilterOrderEnum.TRACE_FILTER); + registrationBean.setOrder(WebFilterOrderEnum.TRACE_FILTER); return registrationBean; } diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/filter/TraceFilter.java b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/filter/TraceFilter.java index bedd52889..49294cc99 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/filter/TraceFilter.java +++ b/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/tracer/core/filter/TraceFilter.java @@ -1,6 +1,6 @@ package cn.iocoder.dashboard.framework.tracer.core.filter; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; import org.springframework.web.filter.OncePerRequestFilter; import javax.servlet.FilterChain; diff --git a/yudao-framework/yudao-spring-boot-starter-monitor/pom.xml b/yudao-framework/yudao-spring-boot-starter-monitor/pom.xml new file mode 100644 index 000000000..7f9b9f61a --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-monitor/pom.xml @@ -0,0 +1,18 @@ + + + + cn.iocoder.boot + yudao-framework + ${revision} + + 4.0.0 + yudao-spring-boot-starter-monitor + jar + + ${artifactId} + 服务监控,提供链路追踪、日志服务、指标收集等等功能 + https://github.com/YunaiV/ruoyi-vue-pro + + diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml index b3feb9de7..73753ff4d 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml @@ -28,16 +28,16 @@ - org.springframework - spring-web + cn.iocoder.boot + yudao-spring-boot-starter-web provided - - jakarta.servlet - jakarta.servlet-api - provided - + + + + + diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/handler/DefaultDBFieldHandler.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/handler/DefaultDBFieldHandler.java index 634388593..65910b16e 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/handler/DefaultDBFieldHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/handler/DefaultDBFieldHandler.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.framework.mybatis.core.handler; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import org.apache.ibatis.reflection.MetaObject; @@ -21,10 +20,9 @@ public class DefaultDBFieldHandler implements MetaObjectHandler { @Override public void insertFill(MetaObject metaObject) { if (Objects.nonNull(metaObject) && metaObject.getOriginalObject() instanceof BaseDO) { - LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); BaseDO baseDO = (BaseDO) metaObject.getOriginalObject(); - Date current = new Date(); + Date current = new Date(); // 创建时间为空,则以当前时间为插入时间 if (Objects.isNull(baseDO.getCreateTime())) { baseDO.setCreateTime(current); @@ -33,31 +31,32 @@ public class DefaultDBFieldHandler implements MetaObjectHandler { if (Objects.isNull(baseDO.getUpdateTime())) { baseDO.setUpdateTime(current); } + + Long userId = WebFrameworkUtils.getLoginUserId(); // 当前登录用户不为空,创建人为空,则当前登录用户为创建人 - if (Objects.nonNull(loginUser) && Objects.isNull(baseDO.getCreator())) { - baseDO.setCreator(loginUser.getId().toString()); + if (Objects.nonNull(userId) && Objects.isNull(baseDO.getCreator())) { + baseDO.setCreator(userId.toString()); } // 当前登录用户不为空,更新人为空,则当前登录用户为更新人 - if (Objects.nonNull(loginUser) && Objects.isNull(baseDO.getUpdater())) { - baseDO.setUpdater(loginUser.getId().toString()); + if (Objects.nonNull(userId) && Objects.isNull(baseDO.getUpdater())) { + baseDO.setUpdater(userId.toString()); } } } @Override public void updateFill(MetaObject metaObject) { - Object modifyTime = getFieldValByName("updateTime", metaObject); - Object modifier = getFieldValByName("updater", metaObject); - // 获取登录用户信息 - LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); - // 更新时间为空,则以当前时间为更新时间 + Object modifyTime = getFieldValByName("updateTime", metaObject); if (Objects.isNull(modifyTime)) { setFieldValByName("updateTime", new Date(), metaObject); } + // 当前登录用户不为空,更新人为空,则当前登录用户为更新人 - if (Objects.nonNull(loginUser) && Objects.isNull(modifier)) { - setFieldValByName("updater", loginUser.getId().toString(), metaObject); + Object modifier = getFieldValByName("updater", metaObject); + Long userId = WebFrameworkUtils.getLoginUserId(); + if (Objects.nonNull(userId) && Objects.isNull(modifier)) { + setFieldValByName("updater", userId.toString(), metaObject); } } } diff --git a/yudao-framework/yudao-spring-boot-starter-operatelog/pom.xml b/yudao-framework/yudao-spring-boot-starter-operatelog/pom.xml new file mode 100644 index 000000000..3c0486cbe --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/pom.xml @@ -0,0 +1,44 @@ + + + + cn.iocoder.boot + yudao-framework + ${revision} + + 4.0.0 + yudao-spring-boot-starter-operatelog + jar + + ${artifactId} + 操作日志 + https://github.com/YunaiV/ruoyi-vue-pro + + + + cn.iocoder.boot + yudao-common + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + cn.iocoder.boot + yudao-spring-boot-starter-web + provided + + + + + com.google.guava + guava + + + + diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/config/OperateLogConfiguration.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java similarity index 56% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/config/OperateLogConfiguration.java rename to yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java index ff9a35a7a..c4e784bf0 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/config/OperateLogConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.config; +package cn.iocoder.yudao.framework.operatelog.config; -import cn.iocoder.dashboard.framework.logger.operatelog.core.aop.OperateLogAspect; +import cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration -public class OperateLogConfiguration { +public class YudaoOperateLogAutoConfiguration { @Bean public OperateLogAspect operateLogAspect() { diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/annotations/OperateLog.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java similarity index 88% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/annotations/OperateLog.java rename to yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java index 6dc3c09cc..2f9ecaf8f 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/annotations/OperateLog.java +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core.annotations; +package cn.iocoder.yudao.framework.operatelog.core.annotations; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/aop/OperateLogAspect.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java similarity index 95% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/aop/OperateLogAspect.java rename to yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java index da9dc5cec..b6a6cd212 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/aop/OperateLogAspect.java +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core.aop; +package cn.iocoder.yudao.framework.operatelog.core.aop; import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.servlet.ServletUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.framework.logger.operatelog.core.dto.OperateLogCreateReqDTO; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; -import cn.iocoder.dashboard.framework.logger.operatelog.core.service.OperateLogFrameworkService; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; import cn.iocoder.yudao.framework.util.json.JsonUtils; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import com.google.common.collect.Maps; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -148,7 +148,7 @@ public class OperateLogAspect { } private static void fillUserFields(OperateLogCreateReqDTO operateLogDTO) { - operateLogDTO.setUserId(SecurityFrameworkUtils.getLoginUserId()); + operateLogDTO.setUserId(WebFrameworkUtils.getLoginUserId()); } private static void fillModuleFields(OperateLogCreateReqDTO operateLogDTO, diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/dto/OperateLogCreateReqDTO.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/dto/OperateLogCreateReqDTO.java similarity index 97% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/dto/OperateLogCreateReqDTO.java rename to yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/dto/OperateLogCreateReqDTO.java index 37eeb0c23..8dd98d49a 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/dto/OperateLogCreateReqDTO.java +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/dto/OperateLogCreateReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core.dto; +package cn.iocoder.yudao.framework.operatelog.core.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/enums/OperateTypeEnum.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java similarity index 84% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/enums/OperateTypeEnum.java rename to yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java index 8ce1c406b..65ee26d71 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/enums/OperateTypeEnum.java +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core.enums; +package cn.iocoder.yudao.framework.operatelog.core.enums; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java new file mode 100644 index 000000000..58aa3d59e --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.framework.operatelog.core; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/service/OperateLogFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java similarity index 65% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/service/OperateLogFrameworkService.java rename to yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java index 02489e8f9..ef20e2ece 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/service/OperateLogFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core.service; +package cn.iocoder.yudao.framework.operatelog.core.service; -import cn.iocoder.dashboard.framework.logger.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; import java.util.concurrent.Future; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/util/OperateLogUtils.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java similarity index 72% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/util/OperateLogUtils.java rename to yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java index 71135eb81..a9801e50e 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/util/OperateLogUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core.util; +package cn.iocoder.yudao.framework.operatelog.core.util; -import cn.iocoder.dashboard.framework.logger.operatelog.core.aop.OperateLogAspect; +import cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect; /** * 操作日志工具类 diff --git a/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java new file mode 100644 index 000000000..d272b53b4 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java @@ -0,0 +1,6 @@ +/** + * 用户操作日志:记录用户的操作,用于对用户的操作的审计与追溯,永久保存。 + * + * @author 芋道源码 + */ +package cn.iocoder.yudao.framework.operatelog; diff --git a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml new file mode 100644 index 000000000..0933bf9d1 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml @@ -0,0 +1,18 @@ + + + + cn.iocoder.boot + yudao-framework + ${revision} + + 4.0.0 + yudao-spring-boot-starter-protection + jar + + ${artifactId} + 服务保证,提供分布式锁、幂等、限流、熔断等等功能 + https://github.com/YunaiV/ruoyi-vue-pro + + diff --git a/yudao-framework/yudao-spring-boot-starter-security/pom.xml b/yudao-framework/yudao-spring-boot-starter-security/pom.xml new file mode 100644 index 000000000..c62863bcb --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-security/pom.xml @@ -0,0 +1,38 @@ + + + + cn.iocoder.boot + yudao-framework + ${revision} + + 4.0.0 + yudao-spring-boot-starter-security + jar + + ${artifactId} + 用户的认证、权限的校验 + https://github.com/YunaiV/ruoyi-vue-pro + + + + cn.iocoder.boot + yudao-common + ${revision} + + + + + cn.iocoder.boot + yudao-spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-security + + + + + diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityProperties.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java similarity index 96% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityProperties.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java index 6aa83bfb8..d45c948dd 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityProperties.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.security.config; +package cn.iocoder.yudao.framework.security.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoSecurityConfiguration.java similarity index 87% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoSecurityConfiguration.java index 80b90843e..d095e90f1 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoSecurityConfiguration.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.framework.security.config; +package cn.iocoder.yudao.framework.security.config; -import cn.iocoder.dashboard.framework.security.core.filter.JwtAuthenticationTokenFilter; -import cn.iocoder.dashboard.framework.security.core.handler.LogoutSuccessHandlerImpl; -import cn.iocoder.dashboard.framework.web.config.WebProperties; -import de.codecentric.boot.admin.server.config.AdminServerProperties; +import cn.iocoder.yudao.framework.security.core.filter.JwtAuthenticationTokenFilter; +import cn.iocoder.yudao.framework.security.core.handler.LogoutSuccessHandlerImpl; +import cn.iocoder.yudao.framework.web.config.WebProperties; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -30,7 +30,7 @@ import javax.annotation.Resource; */ @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) @EnableConfigurationProperties(SecurityProperties.class) -public class SecurityConfiguration extends WebSecurityConfigurerAdapter { +public class YudaoSecurityConfiguration extends WebSecurityConfigurerAdapter { /** * 自定义用户认证逻辑 @@ -62,8 +62,9 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Resource private WebProperties webProperties; - @Resource - private AdminServerProperties adminServerProperties; + + @Value("${spring.boot.admin.context-path:''}") + private String adminSeverContextPath; /** * 由于 Spring Security 创建 AuthenticationManager 对象时,没声明 @Bean 注解,导致无法被注入 @@ -129,7 +130,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { .authorizeRequests() // 登陆的接口,可匿名访问 .antMatchers(api("/login")).anonymous() - // 通用的接口,可匿名访问 + // 通用的接口,可匿名访问 TODO 芋艿:需要抽象出去 .antMatchers(api("/system/captcha/**")).anonymous() // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll() @@ -140,15 +141,15 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { .antMatchers("/swagger-resources/**").anonymous() .antMatchers("/webjars/**").anonymous() .antMatchers("/*/api-docs").anonymous() - // Spring Boot Admin Server 的安全配置 - .antMatchers(adminServerProperties.getContextPath()).anonymous() - .antMatchers(adminServerProperties.getContextPath() + "/**").anonymous() + // Spring Boot Admin Server 的安全配置 TODO 芋艿:需要抽象出去 + .antMatchers(adminSeverContextPath).anonymous() + .antMatchers(adminSeverContextPath + "/**").anonymous() // Spring Boot Actuator 的安全配置 .antMatchers("/actuator").anonymous() .antMatchers("/actuator/**").anonymous() - // Druid 监控 + // Druid 监控 TODO 芋艿:需要抽象出去 .antMatchers("/druid/**").anonymous() - // 短信回调 API + // 短信回调 API TODO 芋艿:需要抽象出去 .antMatchers(api("/system/sms/callback/**")).anonymous() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated() diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/LoginUser.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/LoginUser.java similarity index 97% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/LoginUser.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/LoginUser.java index ea73eefd8..2c2ff8914 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/LoginUser.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/LoginUser.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.security.core; +package cn.iocoder.yudao.framework.security.core; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/enums/DataScopeEnum.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/enums/DataScopeEnum.java similarity index 89% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/enums/DataScopeEnum.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/enums/DataScopeEnum.java index 7af847d8c..ac3396ce3 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/enums/DataScopeEnum.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/enums/DataScopeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.security.core.enums; +package cn.iocoder.yudao.framework.security.core.enums; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/filter/JwtAuthenticationTokenFilter.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/filter/JwtAuthenticationTokenFilter.java similarity index 86% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/filter/JwtAuthenticationTokenFilter.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/filter/JwtAuthenticationTokenFilter.java index 512ffacc7..cde7662be 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/filter/JwtAuthenticationTokenFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/filter/JwtAuthenticationTokenFilter.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.framework.security.core.filter; +package cn.iocoder.yudao.framework.security.core.filter; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.security.config.SecurityProperties; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.framework.security.core.service.SecurityAuthFrameworkService; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.dashboard.framework.web.core.handler.GlobalExceptionHandler; +import cn.iocoder.yudao.framework.security.config.SecurityProperties; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.service.SecurityAuthFrameworkService; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.web.core.handler.GlobalExceptionHandler; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; import org.springframework.stereotype.Component; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/AccessDeniedHandlerImpl.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/AccessDeniedHandlerImpl.java similarity index 92% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/AccessDeniedHandlerImpl.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/AccessDeniedHandlerImpl.java index 9f4acbd35..b2fd4a52f 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/AccessDeniedHandlerImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/AccessDeniedHandlerImpl.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.framework.security.core.handler; +package cn.iocoder.yudao.framework.security.core.handler; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.AccessDeniedException; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/AuthenticationEntryPointImpl.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/AuthenticationEntryPointImpl.java similarity index 96% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/AuthenticationEntryPointImpl.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/AuthenticationEntryPointImpl.java index 66013c0f1..1c71ed06b 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/AuthenticationEntryPointImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/AuthenticationEntryPointImpl.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.security.core.handler; +package cn.iocoder.yudao.framework.security.core.handler; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.CommonResult; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/LogoutSuccessHandlerImpl.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/LogoutSuccessHandlerImpl.java similarity index 80% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/LogoutSuccessHandlerImpl.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/LogoutSuccessHandlerImpl.java index d408648a7..3b099bfe2 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/handler/LogoutSuccessHandlerImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/handler/LogoutSuccessHandlerImpl.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.framework.security.core.handler; +package cn.iocoder.yudao.framework.security.core.handler; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.security.config.SecurityProperties; -import cn.iocoder.dashboard.framework.security.core.service.SecurityAuthFrameworkService; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.security.config.SecurityProperties; +import cn.iocoder.yudao.framework.security.core.service.SecurityAuthFrameworkService; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; @@ -39,4 +39,5 @@ public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler { // 返回成功 ServletUtils.writeJSON(response, CommonResult.success(null)); } + } diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/service/SecurityAuthFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/service/SecurityAuthFrameworkService.java similarity index 86% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/service/SecurityAuthFrameworkService.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/service/SecurityAuthFrameworkService.java index e3879353a..28c8f6dc0 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/service/SecurityAuthFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/service/SecurityAuthFrameworkService.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.security.core.service; +package cn.iocoder.yudao.framework.security.core.service; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.LoginUser; import org.springframework.security.core.userdetails.UserDetailsService; /** diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/service/SecurityPermissionFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/service/SecurityPermissionFrameworkService.java similarity index 93% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/service/SecurityPermissionFrameworkService.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/service/SecurityPermissionFrameworkService.java index 22098714e..75f11b175 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/service/SecurityPermissionFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/service/SecurityPermissionFrameworkService.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.security.core.service; +package cn.iocoder.yudao.framework.security.core.service; /** * Security 框架 Permission Service 接口,定义 security 组件需要的功能 diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/util/SecurityFrameworkUtils.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/util/SecurityFrameworkUtils.java similarity index 94% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/util/SecurityFrameworkUtils.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/util/SecurityFrameworkUtils.java index da0032ef1..a8360c490 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/core/util/SecurityFrameworkUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/util/SecurityFrameworkUtils.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.framework.security.core.util; +package cn.iocoder.yudao.framework.security.core.util; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.framework.web.core.util.WebFrameworkUtils; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import org.springframework.lang.Nullable; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/package-info.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/package-info.java similarity index 66% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/package-info.java rename to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/package-info.java index bc4451641..dc95b4ed1 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/package-info.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/package-info.java @@ -4,4 +4,4 @@ * * @author 芋道源码 */ -package cn.iocoder.dashboard.framework.security; +package cn.iocoder.yudao.framework.security; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/《芋道 Spring Boot 安全框架 Spring Security 入门》.md b/yudao-framework/yudao-spring-boot-starter-security/《芋道 Spring Boot 安全框架 Spring Security 入门》.md similarity index 100% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/security/《芋道 Spring Boot 安全框架 Spring Security 入门》.md rename to yudao-framework/yudao-spring-boot-starter-security/《芋道 Spring Boot 安全框架 Spring Security 入门》.md diff --git a/yudao-framework/yudao-spring-boot-starter-web/pom.xml b/yudao-framework/yudao-spring-boot-starter-web/pom.xml new file mode 100644 index 000000000..a49d707ad --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-web/pom.xml @@ -0,0 +1,59 @@ + + + + cn.iocoder.boot + yudao-framework + ${revision} + + 4.0.0 + yudao-spring-boot-starter-web + jar + + ${artifactId} + 用户的认证、权限的校验 + https://github.com/YunaiV/ruoyi-vue-pro + + + + cn.iocoder.boot + yudao-common + + + + + org.springframework.boot + spring-boot-starter-web + + + + com.github.xiaoymin + knife4j-spring-boot-starter + + + io.swagger + swagger-annotations + + + + org.springframework.boot + spring-boot-starter-validation + + + + org.springframework.security + spring-security-core + provided + + + + + io.github.resilience4j + resilience4j-ratelimiter + provided + + + + + diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/config/ApiLogConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java similarity index 63% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/config/ApiLogConfiguration.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java index df5a5dbcf..7dc78c445 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/config/ApiLogConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java @@ -1,10 +1,12 @@ -package cn.iocoder.dashboard.framework.logger.apilog.config; +package cn.iocoder.yudao.framework.apilog.config; -import cn.iocoder.dashboard.framework.logger.apilog.core.filter.ApiAccessLogFilter; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.ApiAccessLogFrameworkService; -import cn.iocoder.dashboard.framework.web.config.WebProperties; -import cn.iocoder.dashboard.framework.web.core.enums.FilterOrderEnum; +import cn.iocoder.yudao.framework.apilog.core.filter.ApiAccessLogFilter; +import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; +import cn.iocoder.yudao.framework.web.config.WebProperties; +import cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration; +import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -12,7 +14,8 @@ import org.springframework.context.annotation.Configuration; import javax.servlet.Filter; @Configuration -public class ApiLogConfiguration { +@AutoConfigureAfter(YudaoWebAutoConfiguration.class) +public class YudaoApiLogAutoConfiguration { /** * 创建 ApiAccessLogFilter Bean,记录 API 请求日志 @@ -22,7 +25,7 @@ public class ApiLogConfiguration { @Value("${spring.application.name}") String applicationName, ApiAccessLogFrameworkService apiAccessLogFrameworkService) { ApiAccessLogFilter filter = new ApiAccessLogFilter(webProperties, applicationName, apiAccessLogFrameworkService); - return createFilterBean(filter, FilterOrderEnum.API_ACCESS_LOG_FILTER); + return createFilterBean(filter, WebFilterOrderEnum.API_ACCESS_LOG_FILTER); } private static FilterRegistrationBean createFilterBean(T filter, Integer order) { diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/filter/ApiAccessLogFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java similarity index 91% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/filter/ApiAccessLogFilter.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java index 4381a7c3d..422ab7c44 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/filter/ApiAccessLogFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java @@ -1,15 +1,15 @@ -package cn.iocoder.dashboard.framework.logger.apilog.core.filter; +package cn.iocoder.yudao.framework.apilog.core.filter; import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.map.MapUtil; import cn.hutool.extra.servlet.ServletUtil; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.ApiAccessLogFrameworkService; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; -import cn.iocoder.dashboard.framework.web.config.WebProperties; -import cn.iocoder.dashboard.framework.web.core.util.WebFrameworkUtils; +import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; +import cn.iocoder.yudao.framework.web.config.WebProperties; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.framework.util.date.DateUtils; import cn.iocoder.yudao.framework.util.json.JsonUtils; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/ApiAccessLogFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java similarity index 72% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/ApiAccessLogFrameworkService.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java index ecafe5559..fd7c22ed8 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/ApiAccessLogFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.logger.apilog.core.service; +package cn.iocoder.yudao.framework.apilog.core.service; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; import javax.validation.Valid; import java.util.concurrent.Future; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/ApiErrorLogFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java similarity index 72% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/ApiErrorLogFrameworkService.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java index 763db3a12..1c55adb4f 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/ApiErrorLogFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.logger.apilog.core.service; +package cn.iocoder.yudao.framework.apilog.core.service; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; import javax.validation.Valid; import java.util.concurrent.Future; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/dto/ApiAccessLogCreateDTO.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/dto/ApiAccessLogCreateDTO.java similarity index 95% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/dto/ApiAccessLogCreateDTO.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/dto/ApiAccessLogCreateDTO.java index e288d9b52..c665853d7 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/dto/ApiAccessLogCreateDTO.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/dto/ApiAccessLogCreateDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.logger.apilog.core.service.dto; +package cn.iocoder.yudao.framework.apilog.core.service.dto; import lombok.Data; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/dto/ApiErrorLogCreateDTO.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/dto/ApiErrorLogCreateDTO.java similarity index 97% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/dto/ApiErrorLogCreateDTO.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/dto/ApiErrorLogCreateDTO.java index b351acf91..51258d735 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/logger/apilog/core/service/dto/ApiErrorLogCreateDTO.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/dto/ApiErrorLogCreateDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.logger.apilog.core.service.dto; +package cn.iocoder.yudao.framework.apilog.core.service.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/package-info.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/package-info.java new file mode 100644 index 000000000..cb93f3d6c --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/package-info.java @@ -0,0 +1,8 @@ +/** + * API 日志:包含两类 + * 1. API 访问日志:记录用户访问 API 的访问日志,定期归档历史日志。 + * 2. 异常日志:记录用户访问 API 的系统异常,方便日常排查问题与告警。 + * + * @author 芋道源码 + */ +package cn.iocoder.yudao.framework.apilog; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/config/JacksonConfig.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java similarity index 82% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/config/JacksonConfig.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java index 1930ca29a..f21d33ce9 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/config/JacksonConfig.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.framework.jackson.config; +package cn.iocoder.yudao.framework.jackson.config; -import cn.iocoder.dashboard.framework.jackson.deser.LocalDateTimeDeserializer; -import cn.iocoder.dashboard.framework.jackson.ser.LocalDateTimeSerializer; +import cn.iocoder.yudao.framework.jackson.core.databind.LocalDateTimeDeserializer; +import cn.iocoder.yudao.framework.jackson.core.databind.LocalDateTimeSerializer; import cn.iocoder.yudao.framework.util.json.JsonUtils; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; @@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration; import java.time.LocalDateTime; @Configuration -public class JacksonConfig { +public class YudaoJacksonAutoConfiguration { @Bean @SuppressWarnings("InstantiationOfUtilityClass") diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/deser/LocalDateTimeDeserializer.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeDeserializer.java similarity index 93% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/deser/LocalDateTimeDeserializer.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeDeserializer.java index 122f461a4..f4cb71330 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/deser/LocalDateTimeDeserializer.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeDeserializer.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.jackson.deser; +package cn.iocoder.yudao.framework.jackson.core.databind; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/ser/LocalDateTimeSerializer.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeSerializer.java similarity index 92% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/ser/LocalDateTimeSerializer.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeSerializer.java index d7230eadd..286fb733e 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/jackson/ser/LocalDateTimeSerializer.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/databind/LocalDateTimeSerializer.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.jackson.ser; +package cn.iocoder.yudao.framework.jackson.core.databind; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/package-info.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/package-info.java new file mode 100644 index 000000000..261b5087c --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/core/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.framework.jackson.core; diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/package-info.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/package-info.java new file mode 100644 index 000000000..8c69219d0 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.framework; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerProperties.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java similarity index 93% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerProperties.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java index 6ee40c7d4..d1008eddc 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerProperties.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.swagger.config; +package cn.iocoder.yudao.framework.swagger.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java similarity index 97% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerAutoConfiguration.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java index 21511c37c..d1376fd83 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.swagger.config; +package cn.iocoder.yudao.framework.swagger.config; import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -38,7 +38,7 @@ import static springfox.documentation.builders.RequestHandlerSelectors.basePacka @ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true) // 允许使用 swagger.enable=false 禁用 Swagger @EnableConfigurationProperties(SwaggerProperties.class) -public class SwaggerAutoConfiguration { +public class YudaoSwaggerAutoConfiguration { @Bean @ConditionalOnMissingBean diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/package-info.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/package-info.java similarity index 64% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/package-info.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/package-info.java index 2bce74a20..5eb782272 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/package-info.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/package-info.java @@ -3,4 +3,4 @@ * * @author 芋道源码 */ -package cn.iocoder.dashboard.framework.swagger; +package cn.iocoder.yudao.framework.swagger; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/WebProperties.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java similarity index 90% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/WebProperties.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java index 93479bc96..d4444da8b 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/WebProperties.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.web.config; +package cn.iocoder.yudao.framework.web.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -19,7 +19,7 @@ public class WebProperties { * 意义:通过该前缀,避免 Swagger、Actuator 意外通过 Nginx 暴露出来给外部,带来安全性问题 * 这样,Nginx 只需要配置转发到 /api/* 的所有接口即可。 * - * @see WebConfiguration#configurePathMatch(PathMatchConfigurer) + * @see YudaoWebAutoConfiguration#configurePathMatch(PathMatchConfigurer) */ @NotNull(message = "API 前缀不能为空") private String apiPrefix; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/XssProperties.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/XssProperties.java similarity index 91% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/XssProperties.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/XssProperties.java index a232f4a8f..e4d123089 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/XssProperties.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/XssProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.web.config; +package cn.iocoder.yudao.framework.web.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java similarity index 81% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java index 2f4e7a378..90773f83e 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.framework.web.config; +package cn.iocoder.yudao.framework.web.config; -import cn.iocoder.dashboard.framework.web.core.enums.FilterOrderEnum; -import cn.iocoder.dashboard.framework.web.core.filter.CacheRequestBodyFilter; -import cn.iocoder.dashboard.framework.web.core.filter.DemoFilter; -import cn.iocoder.dashboard.framework.web.core.filter.XssFilter; +import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; +import cn.iocoder.yudao.framework.web.core.filter.CacheRequestBodyFilter; +import cn.iocoder.yudao.framework.web.core.filter.DemoFilter; +import cn.iocoder.yudao.framework.web.core.filter.XssFilter; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.web.servlet.FilterRegistrationBean; @@ -22,7 +22,7 @@ import javax.servlet.Filter; @Configuration @EnableConfigurationProperties({WebProperties.class, XssProperties.class}) -public class WebConfiguration implements WebMvcConfigurer { +public class YudaoWebAutoConfiguration implements WebMvcConfigurer { @Resource private WebProperties webProperties; @@ -51,7 +51,7 @@ public class WebConfiguration implements WebMvcConfigurer { // 创建 UrlBasedCorsConfigurationSource 对象 UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", config); // 对接口配置跨域设置 - return createFilterBean(new CorsFilter(source), FilterOrderEnum.CORS_FILTER); + return createFilterBean(new CorsFilter(source), WebFilterOrderEnum.CORS_FILTER); } /** @@ -59,7 +59,7 @@ public class WebConfiguration implements WebMvcConfigurer { */ @Bean public FilterRegistrationBean requestBodyCacheFilter() { - return createFilterBean(new CacheRequestBodyFilter(), FilterOrderEnum.REQUEST_BODY_CACHE_FILTER); + return createFilterBean(new CacheRequestBodyFilter(), WebFilterOrderEnum.REQUEST_BODY_CACHE_FILTER); } /** @@ -67,7 +67,7 @@ public class WebConfiguration implements WebMvcConfigurer { */ @Bean public FilterRegistrationBean xssFilter(XssProperties properties, PathMatcher pathMatcher) { - return createFilterBean(new XssFilter(properties, pathMatcher), FilterOrderEnum.XSS_FILTER); + return createFilterBean(new XssFilter(properties, pathMatcher), WebFilterOrderEnum.XSS_FILTER); } /** @@ -76,7 +76,7 @@ public class WebConfiguration implements WebMvcConfigurer { @Bean @ConditionalOnProperty(value = "yudao.demo", havingValue = "true") public FilterRegistrationBean demoFilter() { - return createFilterBean(new DemoFilter(), FilterOrderEnum.DEMO_FILTER); + return createFilterBean(new DemoFilter(), WebFilterOrderEnum.DEMO_FILTER); } private static FilterRegistrationBean createFilterBean(T filter, Integer order) { diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/CacheRequestBodyFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyFilter.java similarity index 94% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/CacheRequestBodyFilter.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyFilter.java index 023e2346c..31b8ba1ca 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/CacheRequestBodyFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyFilter.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.web.core.filter; +package cn.iocoder.yudao.framework.web.core.filter; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/CacheRequestBodyWrapper.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java similarity index 96% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/CacheRequestBodyWrapper.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java index 6d1e9919f..f02ba5eb6 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/CacheRequestBodyWrapper.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyWrapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.web.core.filter; +package cn.iocoder.yudao.framework.web.core.filter; import cn.hutool.extra.servlet.ServletUtil; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/DemoFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/DemoFilter.java similarity index 82% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/DemoFilter.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/DemoFilter.java index aad9ebdf9..2c2e3f03c 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/DemoFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/DemoFilter.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.framework.web.core.filter; +package cn.iocoder.yudao.framework.web.core.filter; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import org.springframework.web.filter.OncePerRequestFilter; import javax.servlet.FilterChain; @@ -23,7 +23,7 @@ public class DemoFilter extends OncePerRequestFilter { protected boolean shouldNotFilter(HttpServletRequest request) { String method = request.getMethod(); return !StrUtil.equalsAnyIgnoreCase(method, "POST", "PUT", "DELETE") // 写操作时,不进行过滤率 - || SecurityFrameworkUtils.getLoginUser() == null; // 非登陆用户时,不进行过滤 + || WebFrameworkUtils.getLoginUserId(request) == null; // 非登陆用户时,不进行过滤 } @Override diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/XssFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssFilter.java similarity index 92% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/XssFilter.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssFilter.java index f4864025a..050a86cc1 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/XssFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssFilter.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.framework.web.core.filter; +package cn.iocoder.yudao.framework.web.core.filter; -import cn.iocoder.dashboard.framework.web.config.XssProperties; +import cn.iocoder.yudao.framework.web.config.XssProperties; import lombok.AllArgsConstructor; import org.springframework.util.PathMatcher; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/XssRequestWrapper.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssRequestWrapper.java similarity index 98% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/XssRequestWrapper.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssRequestWrapper.java index 15570d843..991cad45b 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/filter/XssRequestWrapper.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssRequestWrapper.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.web.core.filter; +package cn.iocoder.yudao.framework.web.core.filter; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.IoUtil; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/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 similarity index 96% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/handler/GlobalExceptionHandler.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java index 5df9927ee..ca15c4009 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/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 @@ -1,15 +1,14 @@ -package cn.iocoder.dashboard.framework.web.core.handler; +package cn.iocoder.yudao.framework.web.core.handler; import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.map.MapUtil; import cn.hutool.extra.servlet.ServletUtil; import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.ApiErrorLogFrameworkService; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; -import cn.iocoder.dashboard.framework.web.core.util.WebFrameworkUtils; +import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.framework.util.monitor.TracerUtils; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import cn.iocoder.yudao.framework.util.json.JsonUtils; import cn.iocoder.yudao.framework.util.servlet.ServletUtils; import io.github.resilience4j.ratelimiter.RequestNotPermitted; @@ -202,7 +201,7 @@ public class GlobalExceptionHandler { */ @ExceptionHandler(value = AccessDeniedException.class) public CommonResult accessDeniedExceptionHandler(HttpServletRequest req, AccessDeniedException ex) { - log.warn("[accessDeniedExceptionHandler][userId({}) 无法访问 url({})]", SecurityFrameworkUtils.getLoginUserId(), + log.warn("[accessDeniedExceptionHandler][userId({}) 无法访问 url({})]", WebFrameworkUtils.getLoginUserId(req), req.getRequestURL(), ex); return CommonResult.error(FORBIDDEN); } diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/handler/GlobalResponseBodyHandler.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalResponseBodyHandler.java similarity index 88% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/handler/GlobalResponseBodyHandler.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalResponseBodyHandler.java index ddd054220..90da742ca 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/handler/GlobalResponseBodyHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalResponseBodyHandler.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.framework.web.core.handler; +package cn.iocoder.yudao.framework.web.core.handler; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.web.core.util.WebFrameworkUtils; +import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.server.ServerHttpRequest; @@ -18,7 +18,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; * 原因是,GlobalResponseBodyHandler 本质上是 AOP,它不应该改变 Controller 返回的数据结构 * * 目前,GlobalResponseBodyHandler 的主要作用是,记录 Controller 的返回结果, - * 方便 {@link cn.iocoder.dashboard.framework.logger.apilog.core.filter.ApiAccessLogFilter} 记录访问日志 + * 方便 {@link cn.iocoder.yudao.framework.apilog.core.filter.ApiAccessLogFilter} 记录访问日志 */ @ControllerAdvice public class GlobalResponseBodyHandler implements ResponseBodyAdvice { diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/util/WebFrameworkUtils.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/util/WebFrameworkUtils.java similarity index 61% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/util/WebFrameworkUtils.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/util/WebFrameworkUtils.java index 6ef4eacd9..2bf5c2ff8 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/core/util/WebFrameworkUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/util/WebFrameworkUtils.java @@ -1,7 +1,10 @@ -package cn.iocoder.dashboard.framework.web.core.util; +package cn.iocoder.yudao.framework.web.core.util; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; @@ -28,9 +31,17 @@ public class WebFrameworkUtils { * @return 用户编号 */ public static Long getLoginUserId(HttpServletRequest request) { + if (request == null) { + return null; + } return (Long) request.getAttribute(REQUEST_ATTRIBUTE_LOGIN_USER_ID); } + public static Long getLoginUserId() { + HttpServletRequest request = getRequest(); + return getLoginUserId(request); + } + public static Integer getUserType(HttpServletRequest request) { return UserTypeEnum.ADMIN.getValue(); // TODO 芋艿:等后续优化 } @@ -43,4 +54,13 @@ public class WebFrameworkUtils { return (CommonResult) request.getAttribute(REQUEST_ATTRIBUTE_COMMON_RESULT); } + private static HttpServletRequest getRequest() { + RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); + if (!(requestAttributes instanceof ServletRequestAttributes)) { + return null; + } + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) requestAttributes; + return servletRequestAttributes.getRequest(); + } + } diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/package-info.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/package-info.java similarity index 50% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/package-info.java rename to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/package-info.java index f4b8100a3..43b70ebca 100644 --- a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/package-info.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/package-info.java @@ -1,4 +1,4 @@ /** * 针对 SpringMVC 的基础封装 */ -package cn.iocoder.dashboard.framework.web; +package cn.iocoder.yudao.framework.web; diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/《芋道 Spring Boot API 接口文档 Swagger 入门》.md b/yudao-framework/yudao-spring-boot-starter-web/《芋道 Spring Boot API 接口文档 Swagger 入门》.md similarity index 100% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/swagger/《芋道 Spring Boot API 接口文档 Swagger 入门》.md rename to yudao-framework/yudao-spring-boot-starter-web/《芋道 Spring Boot API 接口文档 Swagger 入门》.md diff --git a/yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/《芋道 Spring Boot SpringMVC 入门》.md b/yudao-framework/yudao-spring-boot-starter-web/《芋道 Spring Boot SpringMVC 入门》.md similarity index 100% rename from yudao-framework/yudao-framework-all/src/main/java/cn/iocoder/dashboard/framework/web/《芋道 Spring Boot SpringMVC 入门》.md rename to yudao-framework/yudao-spring-boot-starter-web/《芋道 Spring Boot SpringMVC 入门》.md