From 5983399738c33de3cbb3f68c1c4bc8de069460c2 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 25 Nov 2022 08:51:52 +0800 Subject: [PATCH] build: spring boot 3.0 --- Jenkinsfile | 8 +- api-test/Dockerfile | 4 +- .../api/exec/api/ApiCaseExecuteService.java | 2 +- .../api/ApiCaseParallelExecuteService.java | 2 +- .../api/exec/api/ApiCaseSerialService.java | 2 +- .../api/exec/api/ApiExecuteService.java | 2 +- .../api/exec/engine/KubernetesApiExec.java | 33 +-- .../ApiEnvironmentRunningParamService.java | 2 +- .../exec/scenario/ApiScenarioEnvService.java | 2 +- .../scenario/ApiScenarioExecuteService.java | 2 +- .../scenario/ApiScenarioParallelService.java | 2 +- .../scenario/ApiScenarioSerialService.java | 2 +- .../metersphere/api/jmeter/JMeterService.java | 4 +- .../api/jmeter/MsKafkaListener.java | 2 +- .../api/jmeter/ResourcePoolCalculation.java | 2 +- .../commons/config/KafkaConfig.java | 2 +- .../commons/utils/WebSocketUtil.java | 4 +- .../commons/utils/mock/MockApiUtils.java | 2 +- .../controller/ApiGraphController.java | 2 +- .../controller/ApiJMeterFileController.java | 2 +- .../controller/PluginController.java | 2 +- .../controller/ScheduleController.java | 2 +- .../controller/ShareController.java | 2 +- .../TestCaseRelevanceApiController.java | 2 +- .../definition/ApiDefinitionController.java | 3 +- .../ApiDefinitionEnvController.java | 2 +- .../ApiDefinitionExecResultController.java | 2 +- .../definition/ApiModuleController.java | 2 +- .../definition/ApiTestCaseController.java | 2 +- .../controller/ext/ExtProjectController.java | 2 +- .../controller/home/ApiHomeController.java | 2 +- .../controller/mock/MockApiController.java | 6 +- .../controller/mock/MockConfigController.java | 2 +- .../plan/ShareTestPlanApiCaseController.java | 2 +- .../ShareTestPlanApiReportController.java | 2 +- .../ShareTestPlanScenarioCaseController.java | 2 +- .../plan/TestPlanApiCaseController.java | 2 +- .../plan/TestPlanScenarioCaseController.java | 2 +- .../remote/ApiProjectSettingController.java | 4 +- .../remote/CustomFunctionController.java | 4 +- .../controller/remote/TestPlanController.java | 4 +- .../scenario/ApiScenarioController.java | 2 +- .../scenario/ApiScenarioModuleController.java | 2 +- .../scenario/ApiScenarioReportController.java | 2 +- .../scenario/ApiScenarioRerunController.java | 2 +- .../listener/ApiAppStartListener.java | 2 +- .../CheckMockEnvironmentListener.java | 2 +- .../listener/CleanUpReportListener.java | 2 +- .../io/metersphere/listener/InitListener.java | 2 +- .../listener/ProjectCreatedListener.java | 2 +- .../listener/ProjectDeletedListener.java | 2 +- .../listener/TestPlanDeletedListener.java | 2 +- .../service/ApiExecutionQueueService.java | 2 +- .../metersphere/service/ApiGraphService.java | 2 +- .../service/ApiJMeterFileService.java | 2 +- .../service/MockConfigService.java | 6 +- .../service/MsHashTreeService.java | 2 +- .../io/metersphere/service/PluginService.java | 2 +- .../service/RedisTemplateService.java | 2 +- .../service/RemakeReportService.java | 2 +- .../metersphere/service/ShareInfoService.java | 2 +- .../service/TestResultService.java | 2 +- .../ApiCaseExecutionInfoService.java | 2 +- .../definition/ApiCaseResultService.java | 2 +- .../definition/ApiDefinitionEnvService.java | 2 +- .../ApiDefinitionExecResultService.java | 2 +- .../ApiDefinitionImportUtilService.java | 2 +- .../definition/ApiDefinitionService.java | 2 +- .../definition/ApiExecutionInfoService.java | 2 +- .../service/definition/ApiModuleService.java | 12 +- .../definition/ApiTestCaseService.java | 3 +- .../definition/TcpApiParamService.java | 1 + .../service/ext/ExtApiScheduleService.java | 2 +- .../service/ext/ExtApiTaskService.java | 2 +- .../ext/ExtProjectApplicationService.java | 2 +- .../service/plan/TestPlanApiCaseService.java | 2 +- .../plan/TestPlanScenarioCaseService.java | 2 +- .../remote/ApiProjectSettingService.java | 2 +- .../service/remote/CustomFunctionService.java | 2 +- .../service/remote/RemoteTestPlanService.java | 2 +- .../ApiScenarioExecutionInfoService.java | 2 +- .../scenario/ApiScenarioModuleService.java | 2 +- .../ApiScenarioReferenceIdService.java | 2 +- .../ApiScenarioReportResultService.java | 2 +- .../scenario/ApiScenarioReportService.java | 2 +- .../ApiScenarioReportStructureService.java | 2 +- .../scenario/ApiScenarioRerunService.java | 2 +- .../service/scenario/ApiScenarioService.java | 2 +- .../metersphere/websocket/IndexWebSocket.java | 6 +- framework/eureka/Dockerfile | 4 +- framework/eureka/pom.xml | 10 - .../eureka/config/SyncEurekaServer.java | 2 +- framework/gateway/Dockerfile | 4 +- framework/gateway/pom.xml | 4 + .../metersphere/gateway/config/RsaConfig.java | 2 +- .../gateway/controller/LdapController.java | 2 +- .../gateway/controller/LoginController.java | 2 +- .../gateway/controller/SSOController.java | 2 +- .../gateway/filter/SessionFilter.java | 2 +- .../gateway/log/aspect/MsLogAspect.java | 2 +- .../gateway/service/AuthSourceService.java | 2 +- .../gateway/service/BaseDisplayService.java | 2 +- .../gateway/service/FileService.java | 2 +- .../gateway/service/LdapService.java | 2 +- .../gateway/service/SSOService.java | 142 ++++++----- .../service/SystemParameterService.java | 2 +- .../gateway/service/UserLoginService.java | 2 +- framework/sdk-parent/sdk/pom.xml | 37 +++ .../autoconfigure/AsyncConfig.java | 2 +- .../metersphere/autoconfigure/I18nConfig.java | 2 +- .../autoconfigure/PermissionConfig.java | 2 +- .../autoconfigure/RedissonConfig.java | 21 -- .../autoconfigure/RestTemplateConfig.java | 78 +++--- .../metersphere/autoconfigure/RsaConfig.java | 2 +- .../autoconfigure/ShiroConfig.java | 4 +- .../commons/utils/SessionUtils.java | 2 +- .../BaseCustomFieldTemplateController.java | 2 +- .../BasePersonalRelateController.java | 2 +- .../BaseProjectApplicationController.java | 2 +- .../controller/BaseProjectController.java | 2 +- .../controller/BaseShareInfoController.java | 2 +- .../controller/BaseUserController.java | 2 +- .../controller/BaseWorkspaceController.java | 2 +- .../controller/ListModuleController.java | 2 +- .../controller/LoginController.java | 5 +- .../RelationshipEdgeController.java | 2 +- .../controller/ResourceController.java | 2 +- .../controller/SSOLogoutController.java | 2 +- .../ServiceIntegrationController.java | 2 +- .../controller/SystemParameterController.java | 2 +- .../controller/UserKeysController.java | 4 +- .../RestControllerExceptionHandler.java | 5 +- .../controller/handler/WebLogAspect.java | 2 +- .../remote/BasePlatformPluginController.java | 4 +- .../EnvironmentRelateController.java | 2 +- .../controller/TestEnvironmentController.java | 2 +- .../service/BaseEnvGroupProjectService.java | 2 +- .../service/BaseEnvironmentService.java | 2 +- .../excel/utils/EasyExcelExporter.java | 2 +- .../excel/utils/ExcelValidateHelper.java | 10 +- .../java/io/metersphere/i18n/Translator.java | 2 +- .../ldap/controller/LdapController.java | 2 +- .../metersphere/ldap/service/LdapService.java | 2 +- .../metersphere/log/aspect/MsLogAspect.java | 4 +- .../controller/OperatingLogController.java | 2 +- .../log/service/OperatingLogService.java | 2 +- .../controller/FileMetadataController.java | 2 +- .../controller/FileModuleController.java | 2 +- .../repository/MinIOFileRepository.java | 2 +- .../service/FileAssociationService.java | 2 +- .../metadata/service/FileMetadataService.java | 2 +- .../metadata/service/FileModuleService.java | 2 +- .../notice/controller/NoticeController.java | 2 +- .../controller/NotificationController.java | 2 +- .../notice/sender/AbstractNoticeSender.java | 2 +- .../AfterReturningNoticeSendService.java | 2 +- .../notice/sender/SendNoticeAspect.java | 2 +- .../sender/impl/InSiteNoticeSender.java | 2 +- .../notice/sender/impl/MailNoticeSender.java | 6 +- .../notice/service/NoticeSendService.java | 2 +- .../notice/service/NoticeService.java | 2 +- .../notice/service/NotificationService.java | 2 +- .../sechedule/ScheduleManager.java | 2 +- .../io/metersphere/security/ApiKeyFilter.java | 8 +- .../metersphere/security/ApiKeyHandler.java | 2 +- .../io/metersphere/security/CsrfFilter.java | 8 +- .../security/SSOSessionHandler.java | 2 +- .../security/realm/LocalRealm.java | 2 +- .../service/ApiPoolDebugService.java | 2 +- .../service/BaseCheckPermissionService.java | 2 +- .../service/BaseCustomFieldService.java | 2 +- .../BaseCustomFieldTemplateService.java | 2 +- .../service/BaseDisplayService.java | 2 +- .../service/BaseIntegrationService.java | 2 +- .../service/BasePluginService.java | 2 +- .../BaseProjectApplicationService.java | 2 +- .../service/BaseProjectService.java | 2 +- .../service/BaseScheduleService.java | 2 +- .../service/BaseShareInfoService.java | 2 +- .../service/BaseTestResourcePoolService.java | 2 +- .../service/BaseTestResourceService.java | 2 +- .../metersphere/service/BaseUserService.java | 2 +- .../service/BaseWorkspaceService.java | 2 +- .../service/CustomFieldResourceService.java | 2 +- .../io/metersphere/service/FileService.java | 2 +- .../metersphere/service/JarConfigService.java | 2 +- .../service/ListModuleService.java | 2 +- .../io/metersphere/service/MicroService.java | 2 +- .../service/NodeResourcePoolService.java | 2 +- .../service/RelationshipEdgeService.java | 2 +- .../io/metersphere/service/RemoteService.java | 4 +- .../metersphere/service/ResourceService.java | 2 +- .../metersphere/service/SSOLogoutService.java | 4 +- .../service/SystemParameterService.java | 4 +- .../metersphere/service/UserKeyService.java | 2 +- .../task/controller/TaskController.java | 2 +- .../metersphere/task/service/TaskService.java | 7 +- .../websocket/NotificationWebSocket.java | 8 +- .../websocket/ServerEndpointConfigurator.java | 6 +- .../websocket/TaskCenterWebSocket.java | 8 +- .../websocket/WebSocketServer.java | 4 +- ...ot.autoconfigure.AutoConfiguration.imports | 1 - .../ValidQuotaResourcePoolController.java | 2 +- .../ValidQuotaResourcePoolService.java | 2 +- performance-test/Dockerfile | 4 +- .../controller/ApiPerformanceController.java | 2 +- .../api/service/ApiPerformanceService.java | 2 +- .../metersphere/consul/CacheNodeAspect.java | 2 +- .../io/metersphere/consul/CatalogApi.java | 2 +- .../io/metersphere/consul/ConsulService.java | 2 +- .../controller/JmeterFileController.java | 2 +- .../controller/MetricQueryController.java | 2 +- .../PerformanceReportController.java | 4 +- .../controller/PerformanceTestController.java | 2 +- .../controller/ShareController.java | 4 +- .../io/metersphere/engine/EngineFactory.java | 2 +- .../listener/AppStartListener.java | 2 +- .../listener/CleanUpReportListener.java | 2 +- .../listener/ProjectDeletedListener.java | 2 +- .../listener/TestPlanDeletedListener.java | 2 +- .../metersphere/notice/LoadTestVumEvent.java | 2 +- .../notice/PerformanceNoticeEvent.java | 2 +- .../plan/controller/PerfExecController.java | 2 +- .../ShareTestPlanLoadCaseController.java | 2 +- .../TestPlanLoadCaseController.java | 2 +- .../plan/notice/LoadReportStatusEvent.java | 2 +- .../plan/notice/PerformanceQueueEvent.java | 2 +- .../plan/service/PerfExecService.java | 2 +- .../plan/service/PerfModeExecService.java | 2 +- .../plan/service/PerfQueueService.java | 2 +- .../plan/service/TestPlanLoadCaseService.java | 2 +- .../service/JmeterFileService.java | 2 +- .../service/MetricQueryService.java | 2 +- .../service/PerformanceReportService.java | 6 +- .../service/PerformanceTestService.java | 2 +- .../metersphere/service/ShareInfoService.java | 2 +- ...estCaseRelevancePerformanceController.java | 2 +- .../service/PerformanceTestCaseService.java | 2 +- .../websocket/ReportWebSocket.java | 8 +- pom.xml | 25 +- project-management/Dockerfile | 4 +- .../controller/CustomFunctionController.java | 2 +- .../service/CustomFunctionService.java | 2 +- .../code/snippet/socket/IndexWebSocket.java | 6 +- .../code/snippet/util/WebSocketUtils.java | 4 +- .../controller/ApiTemplateController.java | 2 +- .../controller/CustomFieldController.java | 2 +- .../CustomFieldTemplateController.java | 2 +- .../controller/FileRepositoryController.java | 2 +- .../controller/GroupController.java | 2 +- .../controller/IssueTemplateController.java | 2 +- .../ProjectApplicationController.java | 2 +- .../controller/ProjectController.java | 2 +- .../TestCaseTemplateController.java | 2 +- .../remote/SystemSettingController.java | 6 +- .../controller/remote/UiTestController.java | 4 +- .../listener/ProjectDeletedListener.java | 2 +- .../remote/service/ApiRelateService.java | 2 +- .../remote/service/LoadTestRemoteService.java | 2 +- .../remote/service/PlatformPluginService.java | 4 +- .../service/TestTrackRemoteService.java | 2 +- .../service/ApiTemplateService.java | 2 +- .../service/CustomFieldService.java | 2 +- .../service/CustomFieldTemplateService.java | 2 +- .../EnvironmentGroupProjectService.java | 2 +- .../service/EnvironmentGroupService.java | 2 +- .../service/FileRepositoryService.java | 2 +- .../io/metersphere/service/GroupService.java | 2 +- .../service/IssueTemplateService.java | 2 +- .../service/ProjectApplicationService.java | 2 +- .../metersphere/service/ProjectService.java | 7 +- .../service/TestCaseTemplateService.java | 2 +- .../metersphere/service/UserGroupService.java | 2 +- report-stat/Dockerfile | 4 +- .../EnterpriseTestReportController.java | 2 +- .../controller/HistoryReportController.java | 2 +- .../controller/ReportResourceController.java | 2 +- .../controller/ReportStatShareController.java | 2 +- .../controller/TestAnalysisController.java | 2 +- .../controller/TestCaseCountController.java | 2 +- .../service/EnterpriseTestReportService.java | 2 +- .../service/ReportStatisticsService.java | 2 +- .../service/TestAnalysisService.java | 2 +- .../service/TestCaseCountService.java | 2 +- system-setting/Dockerfile | 4 +- .../metersphere/consul/CacheNodeAspect.java | 2 +- .../EnvironmentGroupController.java | 2 +- .../controller/GroupController.java | 2 +- .../controller/ModuleController.java | 2 +- .../controller/PlatformPluginController.java | 4 +- .../controller/PluginController.java | 2 +- .../controller/SystemController.java | 2 +- .../controller/SystemDemoController.java | 2 +- .../controller/SystemProjectController.java | 4 +- .../TestResourcePoolController.java | 2 +- .../controller/UserController.java | 6 +- .../controller/WorkspaceController.java | 2 +- .../excel/domain/UserExcelDataCn.java | 4 +- .../excel/domain/UserExcelDataTw.java | 4 +- .../excel/domain/UserExcelDataUs.java | 4 +- .../excel/utils/EasyExcelExporter.java | 2 +- .../excel/utils/ExcelValidateHelper.java | 10 +- .../job/schedule/CleanNotificationJob.java | 2 +- .../job/schedule/CleanSessionJob.java | 2 +- .../io/metersphere/listener/InitListener.java | 2 +- .../listener/PlatformPluginListener.java | 2 +- .../session/RefreshSessionAspect.java | 2 +- .../metersphere/service/ApiPluginService.java | 2 +- .../EnvironmentGroupProjectService.java | 2 +- .../service/EnvironmentGroupService.java | 2 +- .../io/metersphere/service/GroupService.java | 2 +- .../io/metersphere/service/ModuleService.java | 2 +- .../service/PlatformPluginService.java | 4 +- .../io/metersphere/service/PluginService.java | 2 +- .../service/SystemDemoService.java | 2 +- .../service/SystemProjectService.java | 6 +- .../service/TestResourcePoolService.java | 2 +- .../metersphere/service/UserGroupService.java | 2 +- .../io/metersphere/service/UserService.java | 6 +- .../metersphere/service/WorkspaceService.java | 2 +- test-track/Dockerfile | 4 +- .../controller/AttachmentController.java | 2 +- .../controller/IssueCommentController.java | 2 +- .../IssueProxyResourceController.java | 2 +- .../controller/IssuesController.java | 4 +- .../controller/MinderExtraNodeController.java | 2 +- .../controller/ShareController.java | 4 +- .../controller/ShareReportController.java | 2 +- .../controller/TestCaseCommentController.java | 2 +- .../controller/TestCaseController.java | 6 +- .../controller/TestCaseIssuesController.java | 2 +- .../controller/TestCaseNodeController.java | 2 +- .../controller/TestCaseReportController.java | 2 +- .../TestCaseReportTemplateController.java | 2 +- .../controller/TestCaseReviewController.java | 2 +- .../controller/TestPlanController.java | 4 +- .../controller/TestPlanReportController.java | 2 +- .../TestPlanTestCaseController.java | 2 +- .../TestReviewTestCaseController.java | 2 +- .../controller/TrackController.java | 2 +- .../remote/TrackApiCaseController.java | 2 +- .../remote/TrackApiDefinitionController.java | 2 +- .../remote/TrackApiTestController.java | 4 +- .../TrackPerformanceTestController.java | 4 +- .../remote/TrackProjectSettingController.java | 4 +- .../remote/TrackSystemSettingController.java | 4 +- .../TrackTestPlanApiCaseController.java | 2 +- .../TrackTestPlanLoadCaseController.java | 2 +- .../TrackTestPlanScenarioCaseController.java | 2 +- ...TrackTestPlanUiScenarioCaseController.java | 2 +- .../remote/TrackUiTestController.java | 4 +- .../wapper/TrackGraphController.java | 2 +- .../excel/domain/IssueExcelDataCn.java | 2 +- .../excel/domain/IssueExcelDataTw.java | 2 +- .../excel/domain/IssueExcelDataUs.java | 2 +- .../excel/domain/TestCaseExcelDataCn.java | 4 +- .../excel/domain/TestCaseExcelDataTw.java | 4 +- .../excel/domain/TestCaseExcelDataUs.java | 4 +- .../listener/CleanUpReportListener.java | 2 +- .../listener/ExecReportListener.java | 2 +- .../io/metersphere/listener/InitListener.java | 2 +- .../listener/PlatformPluginListener.java | 2 +- .../listener/ProjectCreatedListener.java | 2 +- .../listener/ProjectDeletedListener.java | 2 +- .../listener/TrackAppStartListener.java | 2 +- .../TestPlanExecutionQueueService.java | 2 +- .../plan/service/TestPlanFollowService.java | 2 +- .../plan/service/TestPlanMessageService.java | 2 +- .../service/TestPlanPrincipalService.java | 2 +- .../plan/service/TestPlanProjectService.java | 2 +- .../plan/service/TestPlanReportService.java | 2 +- .../plan/service/TestPlanRerunService.java | 2 +- .../plan/service/TestPlanService.java | 6 +- .../plan/service/TestPlanTestCaseService.java | 2 +- .../remote/api/PlanApiDefinitionService.java | 2 +- .../api/PlanTestPlanApiCaseService.java | 2 +- .../api/PlanTestPlanScenarioCaseService.java | 2 +- .../PlanTestPlanLoadCaseService.java | 2 +- .../ui/PlanTestPlanUiScenarioCaseService.java | 2 +- .../service/AttachmentService.java | 2 +- .../service/CustomFieldIssuesService.java | 2 +- .../CustomFieldResourceCompatibleService.java | 2 +- .../FunctionCaseExecutionInfoService.java | 2 +- .../service/IssueCommentService.java | 2 +- .../io/metersphere/service/IssuesService.java | 4 +- .../service/MinderExtraNodeService.java | 2 +- .../service/PlatformPluginService.java | 2 +- .../metersphere/service/ShareInfoService.java | 2 +- .../service/TestCaseCommentService.java | 2 +- .../service/TestCaseIssueService.java | 2 +- .../service/TestCaseNodeService.java | 2 +- .../service/TestCaseReportService.java | 2 +- .../TestCaseReportTemplateService.java | 2 +- .../service/TestCaseReviewService.java | 2 +- .../metersphere/service/TestCaseService.java | 6 +- .../service/TestReviewProjectService.java | 2 +- .../service/TestReviewTestCaseService.java | 2 +- .../io/metersphere/service/TrackService.java | 2 +- .../service/issue/client/BaseClient.java | 36 +-- .../wapper/CheckPermissionService.java | 2 +- .../wapper/IssueProxyResourceService.java | 2 +- .../service/wapper/TrackGraphService.java | 2 +- .../service/wapper/TrackProjectService.java | 2 +- .../service/wapper/UserService.java | 2 +- .../io/metersphere/utils/WebSocketUtil.java | 4 +- .../websocket/ExecReportWebSocket.java | 16 +- .../xmind/utils/CommonsMultipartFile.java | 226 ++++++++++++++++++ .../io/metersphere/xmind/utils/FileUtil.java | 1 - .../xmind/utils/XmindExportUtil.java | 2 +- workstation/Dockerfile | 4 +- .../controller/WorkstationController.java | 2 +- .../controller/api/ApiController.java | 4 +- .../controller/api/ExtProjectController.java | 2 +- .../performance/PerformanceController.java | 4 +- .../ProjectManagementController.java | 4 +- .../system/SystemSettingController.java | 4 +- .../controller/track/TrackController.java | 4 +- .../service/WorkstationService.java | 2 +- 418 files changed, 973 insertions(+), 704 deletions(-) delete mode 100644 framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RedissonConfig.java create mode 100644 test-track/backend/src/main/java/io/metersphere/xmind/utils/CommonsMultipartFile.java diff --git a/Jenkinsfile b/Jenkinsfile index e84c08b6e1..fe68eea38a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { } environment { IMAGE_PREFIX = 'registry.cn-qingdao.aliyuncs.com/metersphere' - JAVA_HOME = '/opt/jdk-11' + JAVA_HOME = '/opt/jdk-17' } stages { stage('Preparation') { @@ -44,7 +44,7 @@ pipeline { steps { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { sh '''#!/bin/bash -xe - export JAVA_HOME=/opt/jdk-11 + export JAVA_HOME=/opt/jdk-17 export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$PATH java -version @@ -58,7 +58,7 @@ pipeline { steps { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { sh '''#!/bin/bash -xe - export JAVA_HOME=/opt/jdk-11 + export JAVA_HOME=/opt/jdk-17 export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$PATH java -version @@ -83,7 +83,7 @@ pipeline { steps { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { sh '''#!/bin/bash -xe - export JAVA_HOME=/opt/jdk-11 + export JAVA_HOME=/opt/jdk-17 export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$PATH java -version diff --git a/api-test/Dockerfile b/api-test/Dockerfile index 48fa00ecbc..29b027d1a7 100644 --- a/api-test/Dockerfile +++ b/api-test/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -21,7 +21,7 @@ RUN mv /app/jmeter /opt/ ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.ApiApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseExecuteService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseExecuteService.java index c461889437..1b260c3a88 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseExecuteService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseExecuteService.java @@ -38,7 +38,7 @@ import org.apache.commons.lang3.StringUtils; import org.json.JSONObject; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseParallelExecuteService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseParallelExecuteService.java index 9e7b56c8d0..c45f3a8552 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseParallelExecuteService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseParallelExecuteService.java @@ -19,7 +19,7 @@ import org.apache.jorphan.collections.HashTree; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseSerialService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseSerialService.java index 353c383e3b..dcf837f23e 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseSerialService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiCaseSerialService.java @@ -42,7 +42,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java index 6cf2007ac1..7b3a44dad8 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java @@ -46,7 +46,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/engine/KubernetesApiExec.java b/api-test/backend/src/main/java/io/metersphere/api/exec/engine/KubernetesApiExec.java index b41287b883..d32dcce5d6 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/engine/KubernetesApiExec.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/engine/KubernetesApiExec.java @@ -61,27 +61,28 @@ public class KubernetesApiExec { private static class SimpleListener implements ExecListener { @Override - public void onOpen(Response response) { + public void onOpen() { LoggerUtil.info("The shell will remain open for 10 seconds."); } @Override public void onFailure(Throwable t, Response response) { - List value = response.request().url().queryParameterValues("command"); - if (CollectionUtils.isNotEmpty(value) && value.size() > 2 && value.get(2).startsWith("curl")) { - String query = "{" + KubernetesApiExec.getQuery(value.get(2)) + "}"; - JmeterRunRequestDTO runRequest = JSON.parseObject(query, JmeterRunRequestDTO.class); - if (runRequest != null) { - RemakeReportService apiScenarioReportService = CommonBeanFactory.getBean(RemakeReportService.class); - apiScenarioReportService.testEnded(runRequest, response.networkResponse().message()); - } else { - MSException.throwException("K8S 节点执行错误:" + response.networkResponse().message()); - } - } else { - MSException.throwException("K8S 节点执行错误:" + response.networkResponse().message()); - } - LoggerUtil.error("K8S 节点执行错误:" + JSON.toJSONString(value)); - LoggerUtil.error("K8S 节点执行错误:" + response.networkResponse()); + // todo k8s 执行api变了 +// List value = response.request().url().queryParameterValues("command"); +// if (CollectionUtils.isNotEmpty(value) && value.size() > 2 && value.get(2).startsWith("curl")) { +// String query = "{" + KubernetesApiExec.getQuery(value.get(2)) + "}"; +// JmeterRunRequestDTO runRequest = JSON.parseObject(query, JmeterRunRequestDTO.class); +// if (runRequest != null) { +// RemakeReportService apiScenarioReportService = CommonBeanFactory.getBean(RemakeReportService.class); +// apiScenarioReportService.testEnded(runRequest, response.networkResponse().message()); +// } else { +// MSException.throwException("K8S 节点执行错误:" + response.networkResponse().message()); +// } +// } else { +// MSException.throwException("K8S 节点执行错误:" + response.networkResponse().message()); +// } +// LoggerUtil.error("K8S 节点执行错误:" + JSON.toJSONString(value)); +// LoggerUtil.error("K8S 节点执行错误:" + response.networkResponse()); } @Override diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiEnvironmentRunningParamService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiEnvironmentRunningParamService.java index 53f418229c..cf8517017c 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiEnvironmentRunningParamService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiEnvironmentRunningParamService.java @@ -12,7 +12,7 @@ import org.json.JSONObject; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.LinkedList; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java index b82474612d..599760e510 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java @@ -38,7 +38,7 @@ import org.apache.commons.lang3.StringUtils; import org.json.JSONObject; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java index f91e10a64e..d26b5ae04d 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java @@ -54,7 +54,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioParallelService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioParallelService.java index 6ce45300a9..d132575bfd 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioParallelService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioParallelService.java @@ -17,7 +17,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Map; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java index d5f113003d..dc29881ed9 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java @@ -29,7 +29,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index a2d0f7250e..7a3804cea9 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -42,8 +42,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; import java.io.File; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java b/api-test/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java index 4d68803505..95b7b61097 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java +++ b/api-test/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java @@ -18,7 +18,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.kafka.support.Acknowledgment; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; diff --git a/api-test/backend/src/main/java/io/metersphere/api/jmeter/ResourcePoolCalculation.java b/api-test/backend/src/main/java/io/metersphere/api/jmeter/ResourcePoolCalculation.java index 38ac6b9b00..3faff5ac05 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/jmeter/ResourcePoolCalculation.java +++ b/api-test/backend/src/main/java/io/metersphere/api/jmeter/ResourcePoolCalculation.java @@ -16,7 +16,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/commons/config/KafkaConfig.java b/api-test/backend/src/main/java/io/metersphere/commons/config/KafkaConfig.java index 7abb4da876..c25344b18c 100644 --- a/api-test/backend/src/main/java/io/metersphere/commons/config/KafkaConfig.java +++ b/api-test/backend/src/main/java/io/metersphere/commons/config/KafkaConfig.java @@ -16,7 +16,7 @@ import org.springframework.kafka.core.DefaultKafkaConsumerFactory; import org.springframework.kafka.listener.ConcurrentMessageListenerContainer; import org.springframework.kafka.listener.ContainerProperties; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/commons/utils/WebSocketUtil.java b/api-test/backend/src/main/java/io/metersphere/commons/utils/WebSocketUtil.java index 692d2c30cc..fc6a55d081 100644 --- a/api-test/backend/src/main/java/io/metersphere/commons/utils/WebSocketUtil.java +++ b/api-test/backend/src/main/java/io/metersphere/commons/utils/WebSocketUtil.java @@ -4,8 +4,8 @@ import io.metersphere.api.dto.MsgDTO; import io.metersphere.utils.LoggerUtil; import org.apache.commons.lang3.StringUtils; -import javax.websocket.RemoteEndpoint; -import javax.websocket.Session; +import jakarta.websocket.RemoteEndpoint; +import jakarta.websocket.Session; import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; diff --git a/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java b/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java index 820280eb21..d06628c03b 100644 --- a/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java +++ b/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java @@ -19,7 +19,7 @@ import org.json.JSONArray; import org.json.JSONObject; import javax.script.ScriptEngine; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.*; import java.nio.charset.StandardCharsets; import java.util.*; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/ApiGraphController.java b/api-test/backend/src/main/java/io/metersphere/controller/ApiGraphController.java index a648acba25..30c4744bd8 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/ApiGraphController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/ApiGraphController.java @@ -5,7 +5,7 @@ import io.metersphere.xpack.graph.request.GraphBatchRequest; import io.metersphere.dto.RelationshipGraphData; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RequestMapping("/graph") @RestController diff --git a/api-test/backend/src/main/java/io/metersphere/controller/ApiJMeterFileController.java b/api-test/backend/src/main/java/io/metersphere/controller/ApiJMeterFileController.java index 1c98eba0e3..f2d1484a13 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/ApiJMeterFileController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/ApiJMeterFileController.java @@ -11,7 +11,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.UUID; @RestController diff --git a/api-test/backend/src/main/java/io/metersphere/controller/PluginController.java b/api-test/backend/src/main/java/io/metersphere/controller/PluginController.java index abde784c13..12885ff0fa 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/PluginController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/PluginController.java @@ -6,7 +6,7 @@ import io.metersphere.base.domain.Plugin; import io.metersphere.service.PluginService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/api-test/backend/src/main/java/io/metersphere/controller/ScheduleController.java b/api-test/backend/src/main/java/io/metersphere/controller/ScheduleController.java index 617db8baad..aa50299b45 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/ScheduleController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/ScheduleController.java @@ -8,7 +8,7 @@ import io.metersphere.notice.annotation.SendNotice; import io.metersphere.service.BaseScheduleService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController public class ScheduleController { diff --git a/api-test/backend/src/main/java/io/metersphere/controller/ShareController.java b/api-test/backend/src/main/java/io/metersphere/controller/ShareController.java index 823d73ca3c..9a460f3df2 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/ShareController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/ShareController.java @@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; /** diff --git a/api-test/backend/src/main/java/io/metersphere/controller/TestCaseRelevanceApiController.java b/api-test/backend/src/main/java/io/metersphere/controller/TestCaseRelevanceApiController.java index b3e3440f73..ac7043bd6e 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/TestCaseRelevanceApiController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/TestCaseRelevanceApiController.java @@ -11,7 +11,7 @@ import io.metersphere.commons.utils.Pager; import io.metersphere.service.definition.ApiTestCaseService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java index b90681924b..a6561c00af 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java @@ -39,7 +39,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionEnvController.java b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionEnvController.java index b5f28ef823..8102c1918a 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionEnvController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionEnvController.java @@ -7,7 +7,7 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/api/definition/env") diff --git a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionExecResultController.java b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionExecResultController.java index bcf5400eae..5e11aa2cbd 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionExecResultController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionExecResultController.java @@ -5,7 +5,7 @@ import io.metersphere.dto.PlanReportCaseDTO; import io.metersphere.service.definition.ApiDefinitionExecResultService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiModuleController.java b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiModuleController.java index 19ae22a20f..65db90be13 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiModuleController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiModuleController.java @@ -13,7 +13,7 @@ import io.metersphere.commons.utils.SessionUtils; import io.metersphere.log.annotation.MsAuditLog; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/api/module") diff --git a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiTestCaseController.java b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiTestCaseController.java index b78719870c..55699e83fd 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiTestCaseController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiTestCaseController.java @@ -26,7 +26,7 @@ import io.metersphere.service.scenario.ApiScenarioService; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/ext/ExtProjectController.java b/api-test/backend/src/main/java/io/metersphere/controller/ext/ExtProjectController.java index 684b191639..69793a38e3 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/ext/ExtProjectController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/ext/ExtProjectController.java @@ -14,7 +14,7 @@ import io.metersphere.service.ext.ExtProjectApplicationService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Collection; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/home/ApiHomeController.java b/api-test/backend/src/main/java/io/metersphere/controller/home/ApiHomeController.java index ea7748b033..dda8cd6abf 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/home/ApiHomeController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/home/ApiHomeController.java @@ -30,7 +30,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Date; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/mock/MockApiController.java b/api-test/backend/src/main/java/io/metersphere/controller/mock/MockApiController.java index c43eedd5cc..c1af995628 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/mock/MockApiController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/mock/MockApiController.java @@ -7,9 +7,9 @@ import io.metersphere.service.BaseProjectService; import io.metersphere.service.MockConfigService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Map; /** diff --git a/api-test/backend/src/main/java/io/metersphere/controller/mock/MockConfigController.java b/api-test/backend/src/main/java/io/metersphere/controller/mock/MockConfigController.java index c0fec6403b..b95fa1b18e 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/mock/MockConfigController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/mock/MockConfigController.java @@ -18,7 +18,7 @@ import io.metersphere.service.definition.ApiDefinitionService; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiCaseController.java b/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiCaseController.java index 6587cdac7d..9f6491abc7 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiCaseController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiCaseController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiReportController.java b/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiReportController.java index 3909d32d45..ac9641fc83 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiReportController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanApiReportController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/share") diff --git a/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanScenarioCaseController.java b/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanScenarioCaseController.java index 565057e260..c1c26c697e 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanScenarioCaseController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/plan/ShareTestPlanScenarioCaseController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanApiCaseController.java b/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanApiCaseController.java index 27c77fc1f9..159e1d3369 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanApiCaseController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanApiCaseController.java @@ -22,7 +22,7 @@ import io.metersphere.service.plan.TestPlanApiCaseService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.Set; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanScenarioCaseController.java b/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanScenarioCaseController.java index 4dcb81f01d..318ea00877 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanScenarioCaseController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/plan/TestPlanScenarioCaseController.java @@ -23,7 +23,7 @@ import io.metersphere.log.annotation.MsAuditLog; import io.metersphere.request.ResetOrderRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/remote/ApiProjectSettingController.java b/api-test/backend/src/main/java/io/metersphere/controller/remote/ApiProjectSettingController.java index f2102bc820..79ccd93c65 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/remote/ApiProjectSettingController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/remote/ApiProjectSettingController.java @@ -4,8 +4,8 @@ import io.metersphere.service.remote.ApiProjectSettingService; import io.metersphere.api.dto.QueryTestPlanRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/api-test/backend/src/main/java/io/metersphere/controller/remote/CustomFunctionController.java b/api-test/backend/src/main/java/io/metersphere/controller/remote/CustomFunctionController.java index cc74d2ebac..ffc9a5b7df 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/remote/CustomFunctionController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/remote/CustomFunctionController.java @@ -4,8 +4,8 @@ import io.metersphere.service.remote.CustomFunctionService; import io.metersphere.api.dto.CustomFunctionRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RequestMapping("/custom/func") @RestController diff --git a/api-test/backend/src/main/java/io/metersphere/controller/remote/TestPlanController.java b/api-test/backend/src/main/java/io/metersphere/controller/remote/TestPlanController.java index ce1a7e3073..fd553a048f 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/remote/TestPlanController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/remote/TestPlanController.java @@ -6,8 +6,8 @@ import io.metersphere.service.remote.RemoteTestPlanService; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java index c82e8872d9..a7e0f0d9ef 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java @@ -34,7 +34,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioModuleController.java b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioModuleController.java index 7a73ae7c8c..31d8ffa50a 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioModuleController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioModuleController.java @@ -10,7 +10,7 @@ import io.metersphere.commons.constants.OperLogModule; import io.metersphere.log.annotation.MsAuditLog; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/api/automation/module") diff --git a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioReportController.java b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioReportController.java index 2774a95c61..27a9e8f1db 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioReportController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioReportController.java @@ -21,7 +21,7 @@ import io.metersphere.service.ShareInfoService; import io.metersphere.service.scenario.ApiScenarioReportService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioRerunController.java b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioRerunController.java index 3d6ea8328a..d4eb2bbeb3 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioRerunController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioRerunController.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/api/test/exec") diff --git a/api-test/backend/src/main/java/io/metersphere/listener/ApiAppStartListener.java b/api-test/backend/src/main/java/io/metersphere/listener/ApiAppStartListener.java index 7a1c1874d2..c6dd4fba8b 100644 --- a/api-test/backend/src/main/java/io/metersphere/listener/ApiAppStartListener.java +++ b/api-test/backend/src/main/java/io/metersphere/listener/ApiAppStartListener.java @@ -18,7 +18,7 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class ApiAppStartListener implements ApplicationRunner { diff --git a/api-test/backend/src/main/java/io/metersphere/listener/CheckMockEnvironmentListener.java b/api-test/backend/src/main/java/io/metersphere/listener/CheckMockEnvironmentListener.java index 965ae2ef34..6628592446 100644 --- a/api-test/backend/src/main/java/io/metersphere/listener/CheckMockEnvironmentListener.java +++ b/api-test/backend/src/main/java/io/metersphere/listener/CheckMockEnvironmentListener.java @@ -8,7 +8,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class CheckMockEnvironmentListener { diff --git a/api-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java b/api-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java index 347c30ea3a..0527798ec5 100644 --- a/api-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java +++ b/api-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java @@ -11,7 +11,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.LocalDate; import java.time.ZoneId; diff --git a/api-test/backend/src/main/java/io/metersphere/listener/InitListener.java b/api-test/backend/src/main/java/io/metersphere/listener/InitListener.java index ca00f6b81a..5b87afeb3e 100644 --- a/api-test/backend/src/main/java/io/metersphere/listener/InitListener.java +++ b/api-test/backend/src/main/java/io/metersphere/listener/InitListener.java @@ -11,7 +11,7 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class InitListener implements ApplicationRunner { diff --git a/api-test/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java b/api-test/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java index 9380cda2fa..2065b1055a 100644 --- a/api-test/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java +++ b/api-test/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java @@ -14,7 +14,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/api-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java b/api-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java index 7dea062526..577af04871 100644 --- a/api-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java +++ b/api-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java @@ -15,7 +15,7 @@ import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component diff --git a/api-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java b/api-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java index 02c5042584..224f975a0b 100644 --- a/api-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java +++ b/api-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java @@ -11,7 +11,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Component diff --git a/api-test/backend/src/main/java/io/metersphere/service/ApiExecutionQueueService.java b/api-test/backend/src/main/java/io/metersphere/service/ApiExecutionQueueService.java index c52bfeb067..baf890e615 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ApiExecutionQueueService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ApiExecutionQueueService.java @@ -32,7 +32,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/ApiGraphService.java b/api-test/backend/src/main/java/io/metersphere/service/ApiGraphService.java index 2199e894a7..0ec8e760a5 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ApiGraphService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ApiGraphService.java @@ -10,7 +10,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service @Transactional(rollbackFor = Exception.class) diff --git a/api-test/backend/src/main/java/io/metersphere/service/ApiJMeterFileService.java b/api-test/backend/src/main/java/io/metersphere/service/ApiJMeterFileService.java index 4b979cd5ee..54955ea468 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ApiJMeterFileService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ApiJMeterFileService.java @@ -22,7 +22,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.jorphan.collections.HashTree; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.ByteArrayOutputStream; import java.io.File; import java.nio.charset.StandardCharsets; diff --git a/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java b/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java index 2992ed0124..b2bf900010 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java @@ -39,9 +39,9 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import org.xml.sax.InputSource; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import java.io.ByteArrayInputStream; diff --git a/api-test/backend/src/main/java/io/metersphere/service/MsHashTreeService.java b/api-test/backend/src/main/java/io/metersphere/service/MsHashTreeService.java index cf6e73052e..dfde3c0a9a 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/MsHashTreeService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/MsHashTreeService.java @@ -25,7 +25,7 @@ import org.json.JSONArray; import org.json.JSONObject; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.LinkedList; import java.util.List; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/service/PluginService.java b/api-test/backend/src/main/java/io/metersphere/service/PluginService.java index b07f61787a..e2e793cfe1 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/PluginService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/PluginService.java @@ -19,7 +19,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.lang.reflect.Method; import java.net.URL; diff --git a/api-test/backend/src/main/java/io/metersphere/service/RedisTemplateService.java b/api-test/backend/src/main/java/io/metersphere/service/RedisTemplateService.java index 5284561b18..a88c0a573f 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/RedisTemplateService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/RedisTemplateService.java @@ -4,7 +4,7 @@ import io.metersphere.commons.utils.LogUtil; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.concurrent.TimeUnit; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/service/RemakeReportService.java b/api-test/backend/src/main/java/io/metersphere/service/RemakeReportService.java index 80303e274e..a9dc2c6c0f 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/RemakeReportService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/RemakeReportService.java @@ -29,7 +29,7 @@ import io.metersphere.utils.LoggerUtil; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service public class RemakeReportService { diff --git a/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java b/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java index 2a00708dda..5cca195a3e 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java @@ -29,7 +29,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java b/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java index 8fc3c14d88..5971cbc75d 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java @@ -28,7 +28,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseExecutionInfoService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseExecutionInfoService.java index 212e3a6896..b6bcbb4e45 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseExecutionInfoService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseExecutionInfoService.java @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseResultService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseResultService.java index b437af213a..c1fcdb34c0 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseResultService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiCaseResultService.java @@ -6,7 +6,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.LinkedList; import java.util.Map; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionEnvService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionEnvService.java index 949490d940..9cee9d5c6e 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionEnvService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionEnvService.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.UUID; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionExecResultService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionExecResultService.java index ad44293ca5..2e2687a114 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionExecResultService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionExecResultService.java @@ -33,7 +33,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java index 657c5b9d28..24b7f253a5 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java @@ -34,7 +34,7 @@ import org.json.JSONObject; import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionService.java index 149684dda8..7934d8414e 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionService.java @@ -73,7 +73,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.net.MalformedURLException; import java.util.*; import java.util.function.Function; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java index 55a0896b06..c8966d130a 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java @@ -14,7 +14,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiModuleService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiModuleService.java index cecf69b2cf..1f5da828af 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiModuleService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiModuleService.java @@ -36,8 +36,16 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import java.util.*; +import jakarta.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.UUID; import java.util.function.Function; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiTestCaseService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiTestCaseService.java index 0563e4c77c..cd34f38a94 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiTestCaseService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiTestCaseService.java @@ -54,7 +54,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; +import java.io.File; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/TcpApiParamService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/TcpApiParamService.java index 256aaab45a..815b388008 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/TcpApiParamService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/TcpApiParamService.java @@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import jakarta.annotation.Resource; import java.util.List; /** diff --git a/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiScheduleService.java b/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiScheduleService.java index 367c730db1..813a8397e6 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiScheduleService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiScheduleService.java @@ -29,10 +29,10 @@ import org.quartz.TriggerKey; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; import java.util.List; import java.util.Map; import java.util.UUID; +import jakarta.annotation.Resource; import java.util.stream.Collectors; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiTaskService.java b/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiTaskService.java index c80469f493..c861eb2e48 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiTaskService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ext/ExtApiTaskService.java @@ -32,7 +32,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/service/ext/ExtProjectApplicationService.java b/api-test/backend/src/main/java/io/metersphere/service/ext/ExtProjectApplicationService.java index c28ee2d1d7..507b6159bf 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ext/ExtProjectApplicationService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ext/ExtProjectApplicationService.java @@ -26,7 +26,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanApiCaseService.java b/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanApiCaseService.java index 620a8ea842..26e8894239 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanApiCaseService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanApiCaseService.java @@ -49,7 +49,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java b/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java index da5963fdb4..80bf059ce3 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java @@ -52,7 +52,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/remote/ApiProjectSettingService.java b/api-test/backend/src/main/java/io/metersphere/service/remote/ApiProjectSettingService.java index a9e82063ff..fef2e63c14 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/remote/ApiProjectSettingService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/remote/ApiProjectSettingService.java @@ -6,7 +6,7 @@ import io.metersphere.service.MicroService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service @Transactional(rollbackFor = Exception.class) diff --git a/api-test/backend/src/main/java/io/metersphere/service/remote/CustomFunctionService.java b/api-test/backend/src/main/java/io/metersphere/service/remote/CustomFunctionService.java index 3020194222..81f2c2d223 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/remote/CustomFunctionService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/remote/CustomFunctionService.java @@ -7,7 +7,7 @@ import io.metersphere.commons.constants.MicroServiceName; import io.metersphere.service.MicroService; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service public class CustomFunctionService { diff --git a/api-test/backend/src/main/java/io/metersphere/service/remote/RemoteTestPlanService.java b/api-test/backend/src/main/java/io/metersphere/service/remote/RemoteTestPlanService.java index 73e366d639..53acb0d0ea 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/remote/RemoteTestPlanService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/remote/RemoteTestPlanService.java @@ -7,7 +7,7 @@ import io.metersphere.commons.utils.LogUtil; import io.metersphere.service.MicroService; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioExecutionInfoService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioExecutionInfoService.java index 7712e8a189..dff22eb0c8 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioExecutionInfoService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioExecutionInfoService.java @@ -15,7 +15,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java index fe04b69c89..c65f10036d 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java @@ -32,7 +32,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.apache.commons.collections.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Function; diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java index e33dff4574..14f85be55d 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java @@ -20,7 +20,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportResultService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportResultService.java index c98b6c184e..61f2f65a82 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportResultService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportResultService.java @@ -15,7 +15,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java index 33ee0da64b..fb6eff5695 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java @@ -43,7 +43,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java index d6504d4d88..333ed578a0 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java @@ -26,7 +26,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.concurrent.atomic.AtomicLong; diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioRerunService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioRerunService.java index 4e1306b354..5ea7cfafee 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioRerunService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioRerunService.java @@ -36,7 +36,7 @@ import org.apache.commons.collections4.comparators.FixedOrderComparator; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java index db41f98df0..201189e8fb 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java @@ -77,7 +77,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; diff --git a/api-test/backend/src/main/java/io/metersphere/websocket/IndexWebSocket.java b/api-test/backend/src/main/java/io/metersphere/websocket/IndexWebSocket.java index 25f695d156..d91d308ad4 100644 --- a/api-test/backend/src/main/java/io/metersphere/websocket/IndexWebSocket.java +++ b/api-test/backend/src/main/java/io/metersphere/websocket/IndexWebSocket.java @@ -8,9 +8,9 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; +import jakarta.websocket.*; +import jakarta.websocket.server.PathParam; +import jakarta.websocket.server.ServerEndpoint; import java.io.IOException; @Slf4j diff --git a/framework/eureka/Dockerfile b/framework/eureka/Dockerfile index 5db474fa81..14b862fe68 100644 --- a/framework/eureka/Dockerfile +++ b/framework/eureka/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -13,7 +13,7 @@ COPY ${DEPENDENCY}/BOOT-INF/classes /app ENV JAVA_CLASSPATH=/app:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.eureka.EurekaApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/framework/eureka/pom.xml b/framework/eureka/pom.xml index ce04c46c11..06fc32b626 100644 --- a/framework/eureka/pom.xml +++ b/framework/eureka/pom.xml @@ -13,16 +13,6 @@ org.springframework.cloud spring-cloud-starter-netflix-eureka-server - - - org.springframework.boot - spring-boot-starter-tomcat - - - - - org.springframework.boot - spring-boot-starter-jetty org.apache.commons diff --git a/framework/eureka/src/main/java/io/metersphere/eureka/config/SyncEurekaServer.java b/framework/eureka/src/main/java/io/metersphere/eureka/config/SyncEurekaServer.java index b24c4b6e0a..9bea29c058 100644 --- a/framework/eureka/src/main/java/io/metersphere/eureka/config/SyncEurekaServer.java +++ b/framework/eureka/src/main/java/io/metersphere/eureka/config/SyncEurekaServer.java @@ -1,5 +1,6 @@ package io.metersphere.eureka.config; +import jakarta.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.RegExUtils; @@ -14,7 +15,6 @@ import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; -import javax.annotation.Resource; import java.net.InetAddress; import java.net.URL; import java.util.ArrayList; diff --git a/framework/gateway/Dockerfile b/framework/gateway/Dockerfile index d44b1a87d8..8f4497b54f 100644 --- a/framework/gateway/Dockerfile +++ b/framework/gateway/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -24,7 +24,7 @@ COPY src/main/resources/static/*.worker.js /app/static/ ENV JAVA_CLASSPATH=/app:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.gateway.GatewayApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED -Dreactor.netty.pool.leasingStrategy=lifo" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Dreactor.netty.pool.leasingStrategy=lifo" CMD ["/deployments/run-java.sh"] diff --git a/framework/gateway/pom.xml b/framework/gateway/pom.xml index be9cca8968..3831bcec3a 100644 --- a/framework/gateway/pom.xml +++ b/framework/gateway/pom.xml @@ -194,6 +194,10 @@ xz org.tukaani + + springdoc-openapi-ui + org.springdoc + diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/config/RsaConfig.java b/framework/gateway/src/main/java/io/metersphere/gateway/config/RsaConfig.java index dd7d782cad..c0ed327818 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/config/RsaConfig.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/config/RsaConfig.java @@ -7,7 +7,7 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.context.annotation.Configuration; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Configuration public class RsaConfig implements ApplicationRunner { diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/controller/LdapController.java b/framework/gateway/src/main/java/io/metersphere/gateway/controller/LdapController.java index 4a47b5dcc1..6ee7126bdd 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/controller/LdapController.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/controller/LdapController.java @@ -11,7 +11,7 @@ import org.springframework.web.server.WebSession; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Locale; @RestController diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java b/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java index 01482aa3d2..7e392a7c72 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java @@ -26,7 +26,7 @@ import org.springframework.web.server.WebSession; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.IOException; import java.util.List; import java.util.Locale; diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/controller/SSOController.java b/framework/gateway/src/main/java/io/metersphere/gateway/controller/SSOController.java index 7639becedd..36fca09208 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/controller/SSOController.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/controller/SSOController.java @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.reactive.result.view.Rendering; import org.springframework.web.server.WebSession; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Locale; import java.util.Optional; diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/filter/SessionFilter.java b/framework/gateway/src/main/java/io/metersphere/gateway/filter/SessionFilter.java index f9389e4ff7..73a3c484ce 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/filter/SessionFilter.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/filter/SessionFilter.java @@ -11,7 +11,7 @@ import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebFilterChain; import reactor.core.publisher.Mono; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Optional; @Component diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/log/aspect/MsLogAspect.java b/framework/gateway/src/main/java/io/metersphere/gateway/log/aspect/MsLogAspect.java index 0933e4c778..2dd4253398 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/log/aspect/MsLogAspect.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/log/aspect/MsLogAspect.java @@ -20,7 +20,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.expression.spel.support.StandardEvaluationContext; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.lang.reflect.Method; import java.util.UUID; diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/service/AuthSourceService.java b/framework/gateway/src/main/java/io/metersphere/gateway/service/AuthSourceService.java index 2b52937433..f526773ee8 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/service/AuthSourceService.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/service/AuthSourceService.java @@ -5,7 +5,7 @@ import io.metersphere.base.domain.AuthSourceExample; import io.metersphere.base.mapper.AuthSourceMapper; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/service/BaseDisplayService.java b/framework/gateway/src/main/java/io/metersphere/gateway/service/BaseDisplayService.java index ffbf90c700..89d4823a4e 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/service/BaseDisplayService.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/service/BaseDisplayService.java @@ -16,7 +16,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.IOException; import java.util.ArrayList; import java.util.Comparator; diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/service/FileService.java b/framework/gateway/src/main/java/io/metersphere/gateway/service/FileService.java index f3f5586b3a..23ac75ef76 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/service/FileService.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/service/FileService.java @@ -12,7 +12,7 @@ import org.apache.commons.lang3.SerializationUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service @Transactional(rollbackFor = Exception.class) diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/service/LdapService.java b/framework/gateway/src/main/java/io/metersphere/gateway/service/LdapService.java index 86e697c36f..4cce8cd432 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/service/LdapService.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/service/LdapService.java @@ -30,7 +30,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.server.WebSession; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import javax.naming.directory.DirContext; import java.util.*; diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/service/SSOService.java b/framework/gateway/src/main/java/io/metersphere/gateway/service/SSOService.java index cf7204f679..5006d6690f 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/service/SSOService.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/service/SSOService.java @@ -10,22 +10,23 @@ import io.metersphere.commons.user.SessionUser; import io.metersphere.commons.utils.*; import io.metersphere.i18n.Translator; import io.metersphere.request.LoginRequest; +import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.config.Registry; -import org.apache.http.config.RegistryBuilder; -import org.apache.http.conn.socket.ConnectionSocketFactory; -import org.apache.http.conn.socket.PlainConnectionSocketFactory; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.TrustStrategy; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.impl.conn.BasicHttpClientConnectionManager; -import org.apache.http.ssl.SSLContexts; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; +import org.apache.hc.client5.http.io.HttpClientConnectionManager; +import org.apache.hc.client5.http.socket.ConnectionSocketFactory; +import org.apache.hc.client5.http.socket.PlainConnectionSocketFactory; +import org.apache.hc.client5.http.ssl.NoopHostnameVerifier; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder; +import org.apache.hc.core5.http.config.Registry; +import org.apache.hc.core5.http.config.RegistryBuilder; +import org.apache.hc.core5.ssl.SSLContexts; +import org.apache.hc.core5.ssl.TrustStrategy; import org.springframework.core.env.Environment; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.http.*; @@ -37,7 +38,6 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; import org.springframework.web.server.WebSession; -import javax.annotation.Resource; import javax.net.ssl.SSLContext; import java.nio.charset.StandardCharsets; import java.security.KeyManagementException; @@ -102,19 +102,23 @@ public class SSOService { private RestTemplate getRestTemplateIgnoreSSL() throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException { TrustStrategy acceptingTrustStrategy = (cert, authType) -> true; SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy).build(); - SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, - NoopHostnameVerifier.INSTANCE); + SSLConnectionSocketFactory sslsf = SSLConnectionSocketFactoryBuilder.create() + .setSslContext(sslContext) + .setHostnameVerifier(NoopHostnameVerifier.INSTANCE) + .build(); - Registry socketFactoryRegistry = - RegistryBuilder.create() - .register("https", sslsf) - .register("http", new PlainConnectionSocketFactory()) - .build(); +// Registry socketFactoryRegistry = RegistryBuilder.create() +// .register("https", sslsf) +// .register("http", new PlainConnectionSocketFactory()) +// .build(); - BasicHttpClientConnectionManager connectionManager = - new BasicHttpClientConnectionManager(socketFactoryRegistry); - CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(sslsf) - .setConnectionManager(connectionManager).build(); + HttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create() + .setSSLSocketFactory(sslsf) + .build(); + + CloseableHttpClient httpClient = HttpClients.custom() + .setConnectionManager(connectionManager) + .build(); HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient); @@ -172,39 +176,44 @@ public class SSOService { String redirectUrl = ((String) config.get("redirectUrl")).replace("${authId}", authId); String validateUrl = (String) config.get("validateUrl"); - HttpClient httpclient = HttpClientBuilder.create().build(); - String serviceValidateUrl = validateUrl + "?service=" + redirectUrl + "&ticket=" + ticket; - HttpGet httpGet = new HttpGet(serviceValidateUrl); - HttpResponse response = httpclient.execute(httpGet); - String body = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); - String name = StringUtils.substringBetween(body, "", ""); - LoginRequest loginRequest = new LoginRequest(); - loginRequest.setUsername(name); - loginRequest.setPassword("nothing"); - loginRequest.setAuthenticate(authSource.getType()); - User u = userLoginService.selectUser(name, name); - if (u == null) { - // 新建用户 - User user = new User(); - user.setId(name); - user.setName(name); - user.setEmail(StringUtils.contains(name, "@") ? name : null); - user.setSource(authSource.getType()); - userLoginService.createOssUser(user); - } else { - if (StringUtils.equals(u.getEmail(), name) && !StringUtils.equals(u.getId(), name)) { - MSException.throwException("email already exists!"); - } - } - Optional userOptional = userLoginService.login(loginRequest, session, locale); - session.getAttributes().put("authenticate", authSource.getType()); - session.getAttributes().put("authId", authSource.getId()); - session.getAttributes().put("casTicket", ticket); - // 记录cas对应关系 - Duration timeout = env.getProperty("spring.session.timeout", Duration.class, Duration.ofHours(12)); - stringRedisTemplate.opsForValue().set(ticket, name, timeout); + try ( + CloseableHttpClient httpclient = HttpClients.createDefault() - return userOptional; + ) { + + String serviceValidateUrl = validateUrl + "?service=" + redirectUrl + "&ticket=" + ticket; + HttpGet httpGet = new HttpGet(serviceValidateUrl); + CloseableHttpResponse response = httpclient.execute(httpGet); + String body = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); + String name = StringUtils.substringBetween(body, "", ""); + LoginRequest loginRequest = new LoginRequest(); + loginRequest.setUsername(name); + loginRequest.setPassword("nothing"); + loginRequest.setAuthenticate(authSource.getType()); + User u = userLoginService.selectUser(name, name); + if (u == null) { + // 新建用户 + User user = new User(); + user.setId(name); + user.setName(name); + user.setEmail(StringUtils.contains(name, "@") ? name : null); + user.setSource(authSource.getType()); + userLoginService.createOssUser(user); + } else { + if (StringUtils.equals(u.getEmail(), name) && !StringUtils.equals(u.getId(), name)) { + MSException.throwException("email already exists!"); + } + } + Optional userOptional = userLoginService.login(loginRequest, session, locale); + session.getAttributes().put("authenticate", authSource.getType()); + session.getAttributes().put("authId", authSource.getId()); + session.getAttributes().put("casTicket", ticket); + // 记录cas对应关系 + Duration timeout = env.getProperty("spring.session.timeout", Duration.class, Duration.ofHours(12)); + stringRedisTemplate.opsForValue().set(ticket, name, timeout); + + return userOptional; + } } public void kickOutUser(String logoutToken) { @@ -236,7 +245,8 @@ public class SSOService { public Optional exchangeOauth2Token(String code, String authId, WebSession session, Locale locale) throws Exception { AuthSource authSource = authSourceService.getAuthSource(authId); - Map config = JSON.parseObject(authSource.getConfiguration(), new TypeReference>() {}); + Map config = JSON.parseObject(authSource.getConfiguration(), new TypeReference>() { + }); String url = config.get("tokenUrl") + "?client_id=" + config.get("clientId") + "&client_secret=" + config.get("secret") @@ -254,7 +264,8 @@ public class SSOService { HttpEntity param = new HttpEntity<>(headers); ResponseEntity response = restTemplate.postForEntity(url, param, String.class); String content = response.getBody(); - resultObj = JSON.parseObject(content, new TypeReference>() {}); + resultObj = JSON.parseObject(content, new TypeReference>() { + }); } catch (Exception e) { LogUtil.error("fail to get access_token", e); MSException.throwException("fail to get access_token!"); @@ -273,14 +284,16 @@ public class SSOService { Map oauth2Config = null; Map resultObj = null; try { - oauth2Config = JSON.parseObject(authSource.getConfiguration(), new TypeReference>() {}); + oauth2Config = JSON.parseObject(authSource.getConfiguration(), new TypeReference>() { + }); String userInfoUrl = oauth2Config.get("userInfoUrl"); HttpHeaders headers = new HttpHeaders(); headers.set("Authorization", "Bearer " + accessToken); RestTemplate restTemplate = getRestTemplateIgnoreSSL(); HttpEntity> httpEntity = new HttpEntity<>(headers); ResponseEntity response = restTemplate.exchange(userInfoUrl, HttpMethod.GET, httpEntity, String.class); - resultObj = JSON.parseObject(response.getBody(), new TypeReference>() {}); + resultObj = JSON.parseObject(response.getBody(), new TypeReference>() { + }); LogUtil.info("user info: " + response.getBody()); } catch (Exception e) { LogUtil.error("fail to get user info", e); @@ -341,7 +354,8 @@ public class SSOService { private Map getOauth2AttrMapping(String mappingStr) { Map mapping = new HashMap<>(); try { - mapping = JSON.parseObject(mappingStr, new TypeReference>() {}); + mapping = JSON.parseObject(mappingStr, new TypeReference>() { + }); } catch (Exception e) { LogUtil.error("get oauth2 mapping config error!", e); MSException.throwException(Translator.get("oauth_mapping_config_error")); diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/service/SystemParameterService.java b/framework/gateway/src/main/java/io/metersphere/gateway/service/SystemParameterService.java index 6b0124a995..2a25c87d01 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/service/SystemParameterService.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/service/SystemParameterService.java @@ -9,7 +9,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java b/framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java index eb6e1f778e..7c82ccde6a 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java @@ -21,7 +21,7 @@ import org.springframework.session.FindByIndexNameSessionRepository; import org.springframework.stereotype.Service; import org.springframework.web.server.WebSession; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/pom.xml b/framework/sdk-parent/sdk/pom.xml index 3e8c661014..1654d558ed 100644 --- a/framework/sdk-parent/sdk/pom.xml +++ b/framework/sdk-parent/sdk/pom.xml @@ -23,6 +23,10 @@ org.springframework.cloud spring-cloud-starter-netflix-eureka-client + + org.springframework.cloud + spring-cloud-starter + org.mybatis.spring.boot mybatis-spring-boot-starter @@ -37,6 +41,10 @@ org.flywaydb flyway-core + + org.flywaydb + flyway-mysql + org.springframework.boot spring-boot-starter-aop @@ -172,7 +180,36 @@ org.apache.shiro shiro-spring-boot-starter ${shiro.version} + + + org.apache.shiro + shiro-web + + + org.apache.shiro + shiro-spring + + + + org.apache.shiro + shiro-web + ${shiro.version} + jakarta + + + org.apache.shiro + shiro-spring + ${shiro.version} + jakarta + + + shiro-web + org.apache.shiro + + + + io.metersphere diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/AsyncConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/AsyncConfig.java index a0fc9e5bef..0f249dd64e 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/AsyncConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/AsyncConfig.java @@ -11,7 +11,7 @@ import java.util.concurrent.ThreadPoolExecutor; public class AsyncConfig { @Bean - public AsyncTaskExecutor taskExecutor() { + public AsyncTaskExecutor asyncTaskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setThreadNamePrefix("Async-Executor-"); executor.setCorePoolSize(5); diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/I18nConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/I18nConfig.java index df1dbfa6d1..729be2bc83 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/I18nConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/I18nConfig.java @@ -8,7 +8,7 @@ import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; -import javax.validation.Validator; +import jakarta.validation.Validator; public class I18nConfig { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/PermissionConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/PermissionConfig.java index 3aab4e7523..372027aa8a 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/PermissionConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/PermissionConfig.java @@ -8,7 +8,7 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.data.redis.core.StringRedisTemplate; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.InputStream; import java.nio.charset.StandardCharsets; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RedissonConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RedissonConfig.java deleted file mode 100644 index ef5f67ad31..0000000000 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RedissonConfig.java +++ /dev/null @@ -1,21 +0,0 @@ -package io.metersphere.autoconfigure; - -import org.redisson.config.Config; -import org.redisson.spring.starter.RedissonAutoConfigurationCustomizer; -import org.springframework.boot.autoconfigure.data.redis.RedisProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; - -import javax.annotation.Resource; - -@EnableConfigurationProperties({RedisProperties.class}) -public class RedissonConfig implements RedissonAutoConfigurationCustomizer { - @Resource - private RedisProperties redisProperties; - - @Override - public void customize(Config configuration) { - int maxActive = redisProperties.getLettuce().getPool().getMaxActive(); - configuration.setNettyThreads(maxActive); - configuration.setThreads(maxActive / 2 == 0 ? 1 : maxActive / 2); - } -} diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RestTemplateConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RestTemplateConfig.java index c94d85d5ff..139de02de5 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RestTemplateConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RestTemplateConfig.java @@ -5,30 +5,33 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import io.metersphere.commons.utils.LogUtil; import io.metersphere.utils.LoggerUtil; -import org.apache.http.NoHttpResponseException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.config.Registry; -import org.apache.http.config.RegistryBuilder; -import org.apache.http.conn.ConnectTimeoutException; -import org.apache.http.conn.socket.ConnectionSocketFactory; -import org.apache.http.conn.socket.PlainConnectionSocketFactory; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.protocol.HttpContext; +import org.apache.hc.client5.http.ConnectTimeoutException; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.client5.http.socket.ConnectionSocketFactory; +import org.apache.hc.client5.http.socket.PlainConnectionSocketFactory; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.core5.http.HttpRequest; +import org.apache.hc.core5.http.NoHttpResponseException; +import org.apache.hc.core5.http.config.Registry; +import org.apache.hc.core5.http.config.RegistryBuilder; +import org.apache.hc.core5.http.io.SocketConfig; +import org.apache.hc.core5.http.protocol.HttpContext; import org.springframework.context.annotation.Bean; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import java.io.IOException; import java.net.ConnectException; import java.net.SocketException; +import java.util.concurrent.TimeUnit; -public class RestTemplateConfig implements WebMvcConfigurer { +public class RestTemplateConfig { private final static int RETRY_COUNT = 3; private final static long RETRY_INTERVAL_TIME = 1000L; private final static int MAX_TOTAL = 1000; @@ -58,14 +61,14 @@ public class RestTemplateConfig implements WebMvcConfigurer { connectionManager.setMaxTotal(MAX_TOTAL); //路由是对maxTotal的细分 connectionManager.setDefaultMaxPerRoute(MAX_PER_ROUTE); + //服务器返回数据(response)的时间,超过该时间抛出read timeout + connectionManager.setDefaultSocketConfig(SocketConfig.custom().setSoTimeout(SOCKET_TIMEOUT, TimeUnit.MILLISECONDS).build()); RequestConfig requestConfig = RequestConfig.custom() - //服务器返回数据(response)的时间,超过该时间抛出read timeout - .setSocketTimeout(SOCKET_TIMEOUT) //连接上服务器(握手成功)的时间,超出该时间抛出connect timeout - .setConnectTimeout(CONNECT_TIMEOUT) + .setConnectTimeout(CONNECT_TIMEOUT, TimeUnit.MILLISECONDS) //从连接池中获取连接的超时时间,超过该时间未拿到可用连接,Timeout waiting for connection from pool - .setConnectionRequestTimeout(CONN_REQUEST_TIMEOUT) + .setConnectionRequestTimeout(CONN_REQUEST_TIMEOUT, TimeUnit.MILLISECONDS) .build(); // 重试次数 HttpClientBuilder client = getHttpClientBuilder(); @@ -91,24 +94,27 @@ public class RestTemplateConfig implements WebMvcConfigurer { private HttpClientBuilder getHttpClientBuilder() { HttpClientBuilder httpClientBuilder = HttpClients.custom(); // 只有io异常才会触发重试 - httpClientBuilder.setRetryHandler((IOException exception, int curRetryCount, HttpContext context) -> { - // curRetryCount 每一次都会递增,从1开始 - if (curRetryCount > RETRY_COUNT) return false; - try { - //重试延迟 - Thread.sleep(curRetryCount * RETRY_INTERVAL_TIME); - } catch (InterruptedException e) { - e.printStackTrace(); - LogUtil.error(e); + httpClientBuilder.setRetryStrategy(new DefaultHttpRequestRetryStrategy() { + @Override + public boolean retryRequest(HttpRequest request, IOException exception, int execCount, HttpContext context) { + // curRetryCount 每一次都会递增,从1开始 + if (execCount > RETRY_COUNT) return false; + try { + //重试延迟 + Thread.sleep(execCount * RETRY_INTERVAL_TIME); + } catch (InterruptedException e) { + e.printStackTrace(); + LogUtil.error(e); + } + if (exception instanceof ConnectTimeoutException || + exception instanceof NoHttpResponseException || + exception instanceof ConnectException || + exception instanceof SocketException) { + LoggerUtil.info("重试次数: " + execCount); + return true; + } + return false; } - if (exception instanceof ConnectTimeoutException || - exception instanceof NoHttpResponseException || - exception instanceof ConnectException || - exception instanceof SocketException) { - LoggerUtil.info("重试次数: " + curRetryCount); - return true; - } - return false; }); return httpClientBuilder; } diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RsaConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RsaConfig.java index ca3be452d6..7ea76420a3 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RsaConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/RsaConfig.java @@ -6,7 +6,7 @@ import io.metersphere.service.FileService; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; -import javax.annotation.Resource; +import jakarta.annotation.Resource; public class RsaConfig implements ApplicationRunner { @Resource diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java index fa82175b25..599e22c754 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java @@ -24,8 +24,8 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.DependsOn; -import javax.servlet.DispatcherType; -import javax.servlet.Filter; +import jakarta.servlet.DispatcherType; +import jakarta.servlet.Filter; import java.util.*; public class ShiroConfig { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/SessionUtils.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/SessionUtils.java index aa07badaf2..18f9c46ba5 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/SessionUtils.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/SessionUtils.java @@ -14,7 +14,7 @@ import org.springframework.session.data.redis.RedisIndexedSessionRepository; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseCustomFieldTemplateController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseCustomFieldTemplateController.java index 143f888c0e..a592b2fff7 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseCustomFieldTemplateController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseCustomFieldTemplateController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/custom/field/template") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java index 25789ed4aa..da66493c54 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/personal/relate") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectApplicationController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectApplicationController.java index f91dd3cae2..1f403a68f7 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectApplicationController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectApplicationController.java @@ -5,7 +5,7 @@ import io.metersphere.dto.ProjectConfig; import io.metersphere.service.BaseProjectApplicationService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/project_application") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectController.java index 73f4e38cad..62dda8db40 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseProjectController.java @@ -13,7 +13,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseShareInfoController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseShareInfoController.java index 2e8f432b2c..2897190f6b 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseShareInfoController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseShareInfoController.java @@ -6,7 +6,7 @@ import io.metersphere.dto.ShareInfoDTO; import io.metersphere.service.BaseShareInfoService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/share") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java index ff63dedff8..7c0d2fa369 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java @@ -13,7 +13,7 @@ import io.metersphere.request.member.QueryMemberRequest; import io.metersphere.service.BaseUserService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.Objects; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseWorkspaceController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseWorkspaceController.java index d530a1a646..7521c00a42 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseWorkspaceController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseWorkspaceController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ListModuleController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ListModuleController.java index e9d16bb5b4..c7be411a94 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ListModuleController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ListModuleController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java index bfa99159d2..3019330f15 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java @@ -27,8 +27,9 @@ import org.springframework.http.ResponseEntity; import org.springframework.session.data.redis.RedisIndexedSessionRepository; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; import java.io.IOException; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/RelationshipEdgeController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/RelationshipEdgeController.java index 1ca8ce9253..32daf884db 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/RelationshipEdgeController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/RelationshipEdgeController.java @@ -5,7 +5,7 @@ import io.metersphere.request.RelationshipEdgeRequest; import io.metersphere.service.RelationshipEdgeService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RequestMapping("relationship/edge") @RestController diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ResourceController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ResourceController.java index 7a4fc8aba6..dfb31fe3ab 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ResourceController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ResourceController.java @@ -7,7 +7,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/resource") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SSOLogoutController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SSOLogoutController.java index 8aa04ba77b..162998f28d 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SSOLogoutController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SSOLogoutController.java @@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("sso") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ServiceIntegrationController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ServiceIntegrationController.java index f1d66e1125..34067bae34 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ServiceIntegrationController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/ServiceIntegrationController.java @@ -9,7 +9,7 @@ import io.metersphere.request.IntegrationRequest; import io.metersphere.service.BaseIntegrationService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("service/integration") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java index 2fa57963a2..ec37ff4349 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java @@ -16,7 +16,7 @@ import io.metersphere.service.SystemParameterService; import org.springframework.core.env.Environment; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.Duration; import java.util.HashMap; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/UserKeysController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/UserKeysController.java index 707927b8d9..6c45ceb905 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/UserKeysController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/UserKeysController.java @@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; -import javax.servlet.ServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.ServletRequest; import java.util.List; @RestController diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/RestControllerExceptionHandler.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/RestControllerExceptionHandler.java index a5e5e448bd..c5569620fb 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/RestControllerExceptionHandler.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/RestControllerExceptionHandler.java @@ -5,12 +5,13 @@ import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; import org.apache.shiro.ShiroException; import org.apache.shiro.authz.UnauthorizedException; + import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.sql.SQLException; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/WebLogAspect.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/WebLogAspect.java index d32a86dc95..d4869b9cc2 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/WebLogAspect.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/handler/WebLogAspect.java @@ -14,7 +14,7 @@ import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Arrays; @Aspect diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/remote/BasePlatformPluginController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/remote/BasePlatformPluginController.java index 67002fa9b3..3405dbb310 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/remote/BasePlatformPluginController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/remote/BasePlatformPluginController.java @@ -3,8 +3,8 @@ package io.metersphere.controller.remote; import io.metersphere.service.remote.BaseSystemSettingService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping("/global/platform/plugin") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/EnvironmentRelateController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/EnvironmentRelateController.java index 5481eb5224..b3ede14630 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/EnvironmentRelateController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/EnvironmentRelateController.java @@ -4,7 +4,7 @@ import io.metersphere.commons.constants.MicroServiceName; import io.metersphere.service.MicroService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/environment/relate") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java index f817e0dc9a..beb4199eca 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java @@ -22,7 +22,7 @@ import org.json.JSONObject; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.sql.DriverManager; import java.util.List; import java.util.Map; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvGroupProjectService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvGroupProjectService.java index 0dbf111d22..8bd4b9ce6d 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvGroupProjectService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvGroupProjectService.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java index 6837256e91..80a899da2f 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java @@ -38,7 +38,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java index 884bc84646..e2a5fdac98 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java @@ -8,7 +8,7 @@ import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; import org.apache.poi.ss.SpreadsheetVersion; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.lang.reflect.Field; import java.net.URLEncoder; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java index 8fc6f737f2..3d9d135c82 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java @@ -3,11 +3,11 @@ package io.metersphere.excel.utils; import com.alibaba.excel.annotation.ExcelProperty; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; -import javax.validation.groups.Default; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validator; +import jakarta.validation.groups.Default; import java.lang.reflect.Field; import java.util.Set; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/i18n/Translator.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/i18n/Translator.java index 1b0cebec47..048b22e192 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/i18n/Translator.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/i18n/Translator.java @@ -3,7 +3,7 @@ package io.metersphere.i18n; import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; -import javax.annotation.Resource; +import jakarta.annotation.Resource; public class Translator { private static MessageSource messageSource; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/controller/LdapController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/controller/LdapController.java index 9c97601f88..7a48261f5f 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/controller/LdapController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/controller/LdapController.java @@ -8,7 +8,7 @@ import io.metersphere.ldap.service.LdapService; import io.metersphere.log.annotation.MsAuditLog; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/ldap") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/service/LdapService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/service/LdapService.java index 98351b3d6e..9c11e5dcf1 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/service/LdapService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/ldap/service/LdapService.java @@ -24,7 +24,7 @@ import org.springframework.ldap.query.SearchScope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; import java.util.Hashtable; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/aspect/MsLogAspect.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/aspect/MsLogAspect.java index fcedefdc92..1b152fe30e 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/aspect/MsLogAspect.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/aspect/MsLogAspect.java @@ -31,8 +31,8 @@ import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; import java.lang.reflect.Method; import java.util.List; import java.util.UUID; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/controller/OperatingLogController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/controller/OperatingLogController.java index 5ddb039882..558812403d 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/controller/OperatingLogController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/controller/OperatingLogController.java @@ -10,7 +10,7 @@ import io.metersphere.log.vo.OperatingLogDTO; import io.metersphere.log.vo.OperatingLogRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/service/OperatingLogService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/service/OperatingLogService.java index 309e742b14..4ffb365e27 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/service/OperatingLogService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/log/service/OperatingLogService.java @@ -23,7 +23,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileMetadataController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileMetadataController.java index e73f0963dd..9bc1f7f8a6 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileMetadataController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileMetadataController.java @@ -21,7 +21,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/file/metadata") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileModuleController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileModuleController.java index 51bcd3545b..9d6e7553b2 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileModuleController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/controller/FileModuleController.java @@ -10,7 +10,7 @@ import io.metersphere.metadata.vo.FileModuleVo; import io.metersphere.service.BaseCheckPermissionService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/file/module") diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/repository/MinIOFileRepository.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/repository/MinIOFileRepository.java index 9f4e5b7c6c..664e8af765 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/repository/MinIOFileRepository.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/repository/MinIOFileRepository.java @@ -12,7 +12,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileAssociationService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileAssociationService.java index 457affbe42..c97438e784 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileAssociationService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileAssociationService.java @@ -18,7 +18,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.UUID; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java index 97a264d51b..3fa3b84df9 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java @@ -33,7 +33,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.io.InputStream; import java.util.*; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileModuleService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileModuleService.java index b5ba7e24a6..b3d7918250 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileModuleService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileModuleService.java @@ -31,7 +31,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java index cdf9dbb547..12755fc520 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java @@ -8,7 +8,7 @@ import io.metersphere.notice.domain.MessageDetail; import io.metersphere.notice.service.NoticeService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NotificationController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NotificationController.java index ab687564db..21587c2037 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NotificationController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NotificationController.java @@ -9,7 +9,7 @@ import io.metersphere.commons.utils.Pager; import io.metersphere.notice.service.NotificationService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java index 8c161468a0..f0f34d53d5 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java @@ -23,7 +23,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.text.StringSubstitutor; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AfterReturningNoticeSendService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AfterReturningNoticeSendService.java index 4554b9eb51..223952e5fb 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AfterReturningNoticeSendService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AfterReturningNoticeSendService.java @@ -10,7 +10,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/SendNoticeAspect.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/SendNoticeAspect.java index 614b516a6b..47159dd7c5 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/SendNoticeAspect.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/SendNoticeAspect.java @@ -22,7 +22,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.expression.spel.support.StandardEvaluationContext; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/InSiteNoticeSender.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/InSiteNoticeSender.java index 8f11663cf4..31fbe58bc3 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/InSiteNoticeSender.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/InSiteNoticeSender.java @@ -14,7 +14,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java index af021432b9..8930056bd9 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java @@ -18,9 +18,9 @@ import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.stereotype.Component; -import javax.annotation.Resource; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeMessage; +import jakarta.annotation.Resource; +import jakarta.mail.internet.InternetAddress; +import jakarta.mail.internet.MimeMessage; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeSendService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeSendService.java index a1762abfa9..d1f568c1f7 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeSendService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeSendService.java @@ -12,7 +12,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java index 86231cfcab..34becbc8a8 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NotificationService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NotificationService.java index 5f728b4f10..3a91cf4626 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NotificationService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NotificationService.java @@ -11,7 +11,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/sechedule/ScheduleManager.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/sechedule/ScheduleManager.java index 55c08d1381..8c5d0ed70a 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/sechedule/ScheduleManager.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/sechedule/ScheduleManager.java @@ -4,7 +4,7 @@ import io.metersphere.base.domain.Schedule; import io.metersphere.commons.utils.LogUtil; import org.quartz.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyFilter.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyFilter.java index c8783da3dc..491d521483 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyFilter.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyFilter.java @@ -7,10 +7,10 @@ import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.web.filter.authc.AnonymousFilter; import org.apache.shiro.web.util.WebUtils; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; public class ApiKeyFilter extends AnonymousFilter { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyHandler.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyHandler.java index 101aeb8199..fef1072e6c 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyHandler.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/ApiKeyHandler.java @@ -6,7 +6,7 @@ import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.service.UserKeyService; import org.apache.commons.lang3.StringUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ApiKeyHandler { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/CsrfFilter.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/CsrfFilter.java index 41739ded56..f30793fc9b 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/CsrfFilter.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/CsrfFilter.java @@ -14,10 +14,10 @@ import org.apache.shiro.web.util.WebUtils; import org.springframework.core.env.Environment; import org.springframework.http.HttpHeaders; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Arrays; public class CsrfFilter extends AnonymousFilter { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/SSOSessionHandler.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/SSOSessionHandler.java index 68300c2306..5bf639b4d8 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/SSOSessionHandler.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/SSOSessionHandler.java @@ -6,7 +6,7 @@ import io.metersphere.commons.utils.CodingUtil; import io.metersphere.commons.utils.LogUtil; import org.apache.commons.lang3.StringUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.UUID; public class SSOSessionHandler { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/realm/LocalRealm.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/realm/LocalRealm.java index c1b0c5285a..2f14a3ffcc 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/realm/LocalRealm.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/security/realm/LocalRealm.java @@ -17,7 +17,7 @@ import org.apache.shiro.subject.PrincipalCollection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Collections; import java.util.Set; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ApiPoolDebugService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ApiPoolDebugService.java index 93124c125b..c891b70818 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ApiPoolDebugService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ApiPoolDebugService.java @@ -11,7 +11,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCheckPermissionService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCheckPermissionService.java index fda13d7e3f..d602204f24 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCheckPermissionService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCheckPermissionService.java @@ -16,7 +16,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Set; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldService.java index 2a5b0cc816..391c6e48d9 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldService.java @@ -13,7 +13,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldTemplateService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldTemplateService.java index f820aea59c..38163d92b6 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldTemplateService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseCustomFieldTemplateService.java @@ -5,7 +5,7 @@ import io.metersphere.base.mapper.CustomFieldTemplateMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service @Transactional(rollbackFor = Exception.class) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseDisplayService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseDisplayService.java index 281a8c2370..de1cf8ac62 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseDisplayService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseDisplayService.java @@ -14,7 +14,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.IOException; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java index 70a7205270..4f2f41f751 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java @@ -18,7 +18,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.UUID; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java index e12d7b4ffe..c53d0727bd 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java @@ -10,7 +10,7 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.InputStream; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectApplicationService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectApplicationService.java index 8759b2eb42..d14be415c7 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectApplicationService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectApplicationService.java @@ -19,7 +19,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.HashMap; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectService.java index 16ee74751d..b4f7e691b2 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseProjectService.java @@ -30,7 +30,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseScheduleService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseScheduleService.java index 7f3f9b6079..110b8cf333 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseScheduleService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseScheduleService.java @@ -29,7 +29,7 @@ import org.quartz.SchedulerException; import org.quartz.TriggerKey; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseShareInfoService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseShareInfoService.java index f2992d8680..bec9d290f3 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseShareInfoService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseShareInfoService.java @@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourcePoolService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourcePoolService.java index 8a48b4a1f4..5c25dea436 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourcePoolService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourcePoolService.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourceService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourceService.java index 4c40dc102d..a2b4f3e9e1 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourceService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseTestResourceService.java @@ -6,7 +6,7 @@ import io.metersphere.base.mapper.TestResourceMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseUserService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseUserService.java index b05deac3ad..c310e79f71 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseUserService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseUserService.java @@ -36,7 +36,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseWorkspaceService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseWorkspaceService.java index dd427de01a..3e4c8f3302 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseWorkspaceService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseWorkspaceService.java @@ -9,7 +9,7 @@ import io.metersphere.dto.RelatedSource; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/CustomFieldResourceService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/CustomFieldResourceService.java index 0f434eca00..f4a76ca1ac 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/CustomFieldResourceService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/CustomFieldResourceService.java @@ -13,7 +13,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/FileService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/FileService.java index 1866851e64..e453c666c7 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/FileService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/FileService.java @@ -17,7 +17,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.io.IOException; import java.util.ArrayList; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/JarConfigService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/JarConfigService.java index 000e494dd2..97840813cc 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/JarConfigService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/JarConfigService.java @@ -21,7 +21,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Service diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ListModuleService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ListModuleService.java index 313f155898..504e6c3c8c 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ListModuleService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ListModuleService.java @@ -8,7 +8,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java index f5f4098597..69e51515be 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java @@ -20,7 +20,7 @@ import org.springframework.util.CollectionUtils; import org.springframework.web.client.HttpServerErrorException; import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.concurrent.*; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeResourcePoolService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeResourcePoolService.java index 5c2899d92c..7120da13cd 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeResourcePoolService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeResourcePoolService.java @@ -20,7 +20,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.Collection; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RelationshipEdgeService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RelationshipEdgeService.java index a6839d3cce..6175a187cd 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RelationshipEdgeService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RelationshipEdgeService.java @@ -18,7 +18,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RemoteService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RemoteService.java index c305090b2d..f29670852f 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RemoteService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/RemoteService.java @@ -3,8 +3,8 @@ package io.metersphere.service; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; import java.util.Optional; @Service diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ResourceService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ResourceService.java index 8278b1bba9..826f9e2dd8 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ResourceService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/ResourceService.java @@ -14,7 +14,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java index 1ac8725b02..38cfbd7283 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java @@ -13,8 +13,8 @@ import org.springframework.session.data.redis.RedisIndexedSessionRepository; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.util.Map; @Service diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SystemParameterService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SystemParameterService.java index d58ba34751..eea42a42c4 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SystemParameterService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SystemParameterService.java @@ -31,8 +31,8 @@ import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import javax.mail.MessagingException; +import jakarta.annotation.Resource; +import jakarta.mail.MessagingException; import java.util.Arrays; import java.util.HashMap; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/UserKeyService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/UserKeyService.java index 5515d2a60b..ef1dffda30 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/UserKeyService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/UserKeyService.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/controller/TaskController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/controller/TaskController.java index 4c7bcd648f..f7df9bad22 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/controller/TaskController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/controller/TaskController.java @@ -15,7 +15,7 @@ import io.metersphere.task.dto.TaskStatisticsDTO; import io.metersphere.task.service.TaskService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Date; import java.util.List; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java index faff95a16d..9b14e05a98 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java @@ -24,8 +24,11 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import java.util.*; +import jakarta.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; @Service diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/NotificationWebSocket.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/NotificationWebSocket.java index a9d6ee9bc1..008222fe3e 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/NotificationWebSocket.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/NotificationWebSocket.java @@ -10,10 +10,10 @@ import lombok.Data; import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; +import jakarta.annotation.Resource; +import jakarta.websocket.*; +import jakarta.websocket.server.PathParam; +import jakarta.websocket.server.ServerEndpoint; import java.io.IOException; import java.util.HashSet; import java.util.Set; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/ServerEndpointConfigurator.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/ServerEndpointConfigurator.java index 79ed53042d..be9de9e2bc 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/ServerEndpointConfigurator.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/ServerEndpointConfigurator.java @@ -2,9 +2,9 @@ package io.metersphere.websocket; import io.metersphere.commons.utils.SessionUtils; -import javax.websocket.HandshakeResponse; -import javax.websocket.server.HandshakeRequest; -import javax.websocket.server.ServerEndpointConfig; +import jakarta.websocket.HandshakeResponse; +import jakarta.websocket.server.HandshakeRequest; +import jakarta.websocket.server.ServerEndpointConfig; public class ServerEndpointConfigurator extends ServerEndpointConfig.Configurator { @Override diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/TaskCenterWebSocket.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/TaskCenterWebSocket.java index 9454ad7713..24ca73b86a 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/TaskCenterWebSocket.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/TaskCenterWebSocket.java @@ -9,10 +9,10 @@ import io.metersphere.task.service.TaskService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; +import jakarta.annotation.Resource; +import jakarta.websocket.*; +import jakarta.websocket.server.PathParam; +import jakarta.websocket.server.ServerEndpoint; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ConcurrentHashMap; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/WebSocketServer.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/WebSocketServer.java index 414c1384f2..8211598f03 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/WebSocketServer.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/websocket/WebSocketServer.java @@ -2,8 +2,8 @@ package io.metersphere.websocket; import org.springframework.stereotype.Component; -import javax.websocket.*; -import javax.websocket.server.ServerEndpoint; +import jakarta.websocket.*; +import jakarta.websocket.server.ServerEndpoint; import java.io.IOException; @ServerEndpoint(value = "/socket", configurator = ServerEndpointConfigurator.class) diff --git a/framework/sdk-parent/sdk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framework/sdk-parent/sdk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 485f9cf3ad..cbd2ecfec2 100644 --- a/framework/sdk-parent/sdk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/framework/sdk-parent/sdk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -10,4 +10,3 @@ io.metersphere.autoconfigure.ScheduleConfig io.metersphere.autoconfigure.ShiroConfig io.metersphere.autoconfigure.AsyncConfig io.metersphere.autoconfigure.MinIOConfig -io.metersphere.autoconfigure.RedissonConfig diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/controller/ValidQuotaResourcePoolController.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/controller/ValidQuotaResourcePoolController.java index 45b50686d8..3efeb69caa 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/controller/ValidQuotaResourcePoolController.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/controller/ValidQuotaResourcePoolController.java @@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/service/ValidQuotaResourcePoolService.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/service/ValidQuotaResourcePoolService.java index 8067d407e6..372aa88859 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/service/ValidQuotaResourcePoolService.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/resourcepool/service/ValidQuotaResourcePoolService.java @@ -13,7 +13,7 @@ import io.metersphere.xpack.resourcepool.engine.KubernetesResourcePoolService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Set; import java.util.stream.Collectors; diff --git a/performance-test/Dockerfile b/performance-test/Dockerfile index 32479ddf31..9e3fcc7c00 100644 --- a/performance-test/Dockerfile +++ b/performance-test/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -22,7 +22,7 @@ RUN mv /app/lib/ms-jmeter-core-*.jar /app/lib/ms-jmeter-core.jar ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.PerformanceApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/performance-test/backend/src/main/java/io/metersphere/api/controller/ApiPerformanceController.java b/performance-test/backend/src/main/java/io/metersphere/api/controller/ApiPerformanceController.java index 6d66745d2e..17d11e4854 100644 --- a/performance-test/backend/src/main/java/io/metersphere/api/controller/ApiPerformanceController.java +++ b/performance-test/backend/src/main/java/io/metersphere/api/controller/ApiPerformanceController.java @@ -7,7 +7,7 @@ import io.metersphere.request.EditTestPlanRequest; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/") diff --git a/performance-test/backend/src/main/java/io/metersphere/api/service/ApiPerformanceService.java b/performance-test/backend/src/main/java/io/metersphere/api/service/ApiPerformanceService.java index 5d56b4f2c1..827b0a391a 100644 --- a/performance-test/backend/src/main/java/io/metersphere/api/service/ApiPerformanceService.java +++ b/performance-test/backend/src/main/java/io/metersphere/api/service/ApiPerformanceService.java @@ -21,7 +21,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.nio.charset.StandardCharsets; import java.util.List; diff --git a/performance-test/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java b/performance-test/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java index 8f9fffcf01..c5062ebdeb 100644 --- a/performance-test/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java +++ b/performance-test/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java @@ -7,7 +7,7 @@ import org.aspectj.lang.annotation.Pointcut; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Aspect @Component diff --git a/performance-test/backend/src/main/java/io/metersphere/consul/CatalogApi.java b/performance-test/backend/src/main/java/io/metersphere/consul/CatalogApi.java index 6beb6aa4a5..065bb91955 100644 --- a/performance-test/backend/src/main/java/io/metersphere/consul/CatalogApi.java +++ b/performance-test/backend/src/main/java/io/metersphere/consul/CatalogApi.java @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/performance-test/backend/src/main/java/io/metersphere/consul/ConsulService.java b/performance-test/backend/src/main/java/io/metersphere/consul/ConsulService.java index bf85bbeb6c..26f5db598a 100644 --- a/performance-test/backend/src/main/java/io/metersphere/consul/ConsulService.java +++ b/performance-test/backend/src/main/java/io/metersphere/consul/ConsulService.java @@ -16,7 +16,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Collections; import java.util.HashMap; import java.util.List; diff --git a/performance-test/backend/src/main/java/io/metersphere/controller/JmeterFileController.java b/performance-test/backend/src/main/java/io/metersphere/controller/JmeterFileController.java index 2a2656810c..629e2ccba0 100644 --- a/performance-test/backend/src/main/java/io/metersphere/controller/JmeterFileController.java +++ b/performance-test/backend/src/main/java/io/metersphere/controller/JmeterFileController.java @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; diff --git a/performance-test/backend/src/main/java/io/metersphere/controller/MetricQueryController.java b/performance-test/backend/src/main/java/io/metersphere/controller/MetricQueryController.java index be46e7fc95..46cd615aa7 100644 --- a/performance-test/backend/src/main/java/io/metersphere/controller/MetricQueryController.java +++ b/performance-test/backend/src/main/java/io/metersphere/controller/MetricQueryController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceReportController.java b/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceReportController.java index efcdedae8d..9fb8c8c21f 100644 --- a/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceReportController.java +++ b/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceReportController.java @@ -24,8 +24,8 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; @RestController diff --git a/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java b/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java index e6662cdb8d..8828ee3bce 100644 --- a/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java +++ b/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java @@ -28,7 +28,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/performance-test/backend/src/main/java/io/metersphere/controller/ShareController.java b/performance-test/backend/src/main/java/io/metersphere/controller/ShareController.java index e1523efa2c..720e276004 100644 --- a/performance-test/backend/src/main/java/io/metersphere/controller/ShareController.java +++ b/performance-test/backend/src/main/java/io/metersphere/controller/ShareController.java @@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; @RestController diff --git a/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java b/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java index 05833af0e1..78bf0ad26b 100644 --- a/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java +++ b/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java @@ -23,7 +23,7 @@ import org.dom4j.Element; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.nio.charset.StandardCharsets; diff --git a/performance-test/backend/src/main/java/io/metersphere/listener/AppStartListener.java b/performance-test/backend/src/main/java/io/metersphere/listener/AppStartListener.java index f56885ed69..8a6c72ebc7 100644 --- a/performance-test/backend/src/main/java/io/metersphere/listener/AppStartListener.java +++ b/performance-test/backend/src/main/java/io/metersphere/listener/AppStartListener.java @@ -8,7 +8,7 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class AppStartListener implements ApplicationRunner { diff --git a/performance-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java b/performance-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java index 04b0e792e1..cb338f8b59 100644 --- a/performance-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java +++ b/performance-test/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java @@ -11,7 +11,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.LocalDate; import java.time.ZoneId; diff --git a/performance-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java b/performance-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java index 784159fa63..65ff730d14 100644 --- a/performance-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java +++ b/performance-test/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java @@ -13,7 +13,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.stream.Collectors; diff --git a/performance-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java b/performance-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java index 255be2d2a1..c6194bf69a 100644 --- a/performance-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java +++ b/performance-test/backend/src/main/java/io/metersphere/listener/TestPlanDeletedListener.java @@ -10,7 +10,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Component diff --git a/performance-test/backend/src/main/java/io/metersphere/notice/LoadTestVumEvent.java b/performance-test/backend/src/main/java/io/metersphere/notice/LoadTestVumEvent.java index 28de2d8ba0..80cb779461 100644 --- a/performance-test/backend/src/main/java/io/metersphere/notice/LoadTestVumEvent.java +++ b/performance-test/backend/src/main/java/io/metersphere/notice/LoadTestVumEvent.java @@ -18,7 +18,7 @@ import org.redisson.api.RLock; import org.redisson.api.RedissonClient; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.math.BigDecimal; /** diff --git a/performance-test/backend/src/main/java/io/metersphere/notice/PerformanceNoticeEvent.java b/performance-test/backend/src/main/java/io/metersphere/notice/PerformanceNoticeEvent.java index c4e7927e2d..1cd6efba01 100644 --- a/performance-test/backend/src/main/java/io/metersphere/notice/PerformanceNoticeEvent.java +++ b/performance-test/backend/src/main/java/io/metersphere/notice/PerformanceNoticeEvent.java @@ -21,7 +21,7 @@ import org.apache.commons.beanutils.BeanMap; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.Map; diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/controller/PerfExecController.java b/performance-test/backend/src/main/java/io/metersphere/plan/controller/PerfExecController.java index 71aaa5df36..de897ff6ad 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/controller/PerfExecController.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/controller/PerfExecController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Map; @RestController diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/controller/ShareTestPlanLoadCaseController.java b/performance-test/backend/src/main/java/io/metersphere/plan/controller/ShareTestPlanLoadCaseController.java index 173d23b805..5fd2f6061b 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/controller/ShareTestPlanLoadCaseController.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/controller/ShareTestPlanLoadCaseController.java @@ -6,7 +6,7 @@ import io.metersphere.plan.service.TestPlanLoadCaseService; import io.metersphere.service.ShareInfoService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/controller/TestPlanLoadCaseController.java b/performance-test/backend/src/main/java/io/metersphere/plan/controller/TestPlanLoadCaseController.java index 9bd02e25a1..d40f290fdc 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/controller/TestPlanLoadCaseController.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/controller/TestPlanLoadCaseController.java @@ -24,7 +24,7 @@ import io.metersphere.request.ResetOrderRequest; import io.metersphere.request.RunTestPlanRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/test/plan/load/case") diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/notice/LoadReportStatusEvent.java b/performance-test/backend/src/main/java/io/metersphere/plan/notice/LoadReportStatusEvent.java index 3f5d34cc50..7a3f4d3c3c 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/notice/LoadReportStatusEvent.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/notice/LoadReportStatusEvent.java @@ -11,7 +11,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component @Transactional(rollbackFor = Exception.class) diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/notice/PerformanceQueueEvent.java b/performance-test/backend/src/main/java/io/metersphere/plan/notice/PerformanceQueueEvent.java index cc535b61d6..44a973bfa8 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/notice/PerformanceQueueEvent.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/notice/PerformanceQueueEvent.java @@ -8,7 +8,7 @@ import io.metersphere.plan.service.PerfQueueService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class PerformanceQueueEvent implements LoadTestFinishEvent { diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfExecService.java b/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfExecService.java index 87eeab3378..da7eb3ed0d 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfExecService.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfExecService.java @@ -12,7 +12,7 @@ import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Service diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfModeExecService.java b/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfModeExecService.java index 4ea20aa05a..06ee6a9818 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfModeExecService.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfModeExecService.java @@ -8,7 +8,7 @@ import io.metersphere.request.RunTestPlanRequest; import io.metersphere.service.PerformanceTestService; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfQueueService.java b/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfQueueService.java index a55edd3ca7..6c9e38a4ba 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfQueueService.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/service/PerfQueueService.java @@ -22,7 +22,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/performance-test/backend/src/main/java/io/metersphere/plan/service/TestPlanLoadCaseService.java b/performance-test/backend/src/main/java/io/metersphere/plan/service/TestPlanLoadCaseService.java index 08cb15923e..be5720e5b7 100644 --- a/performance-test/backend/src/main/java/io/metersphere/plan/service/TestPlanLoadCaseService.java +++ b/performance-test/backend/src/main/java/io/metersphere/plan/service/TestPlanLoadCaseService.java @@ -36,7 +36,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PathVariable; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/performance-test/backend/src/main/java/io/metersphere/service/JmeterFileService.java b/performance-test/backend/src/main/java/io/metersphere/service/JmeterFileService.java index e072e3219d..55f6e75e8b 100644 --- a/performance-test/backend/src/main/java/io/metersphere/service/JmeterFileService.java +++ b/performance-test/backend/src/main/java/io/metersphere/service/JmeterFileService.java @@ -11,7 +11,7 @@ import io.metersphere.engine.EngineFactory; import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.HashMap; diff --git a/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java b/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java index 5b1549b78b..315393d0ce 100644 --- a/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java +++ b/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java @@ -20,7 +20,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.text.DecimalFormat; import java.util.*; import java.util.stream.Collectors; diff --git a/performance-test/backend/src/main/java/io/metersphere/service/PerformanceReportService.java b/performance-test/backend/src/main/java/io/metersphere/service/PerformanceReportService.java index a0e564455b..033bc150fa 100644 --- a/performance-test/backend/src/main/java/io/metersphere/service/PerformanceReportService.java +++ b/performance-test/backend/src/main/java/io/metersphere/service/PerformanceReportService.java @@ -37,9 +37,9 @@ import org.redisson.api.RedissonClient; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletResponse; import java.io.InputStream; import java.io.OutputStream; import java.math.BigDecimal; diff --git a/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java b/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java index d40ab0d0d9..23e0f060e7 100644 --- a/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java +++ b/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java @@ -38,7 +38,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.math.BigDecimal; import java.net.InetSocketAddress; import java.net.Socket; diff --git a/performance-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java b/performance-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java index 476d45f5fe..88e92415a9 100644 --- a/performance-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java +++ b/performance-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java @@ -14,7 +14,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import static io.metersphere.commons.user.ShareUtil.getTimeMills; diff --git a/performance-test/backend/src/main/java/io/metersphere/track/controller/TestCaseRelevancePerformanceController.java b/performance-test/backend/src/main/java/io/metersphere/track/controller/TestCaseRelevancePerformanceController.java index f72f8a40e3..f92a1c925b 100644 --- a/performance-test/backend/src/main/java/io/metersphere/track/controller/TestCaseRelevancePerformanceController.java +++ b/performance-test/backend/src/main/java/io/metersphere/track/controller/TestCaseRelevancePerformanceController.java @@ -9,7 +9,7 @@ import io.metersphere.plan.request.LoadCaseRequest; import io.metersphere.track.service.PerformanceTestCaseService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/performance-test/backend/src/main/java/io/metersphere/track/service/PerformanceTestCaseService.java b/performance-test/backend/src/main/java/io/metersphere/track/service/PerformanceTestCaseService.java index f81bcb3d61..ef97cfb18a 100644 --- a/performance-test/backend/src/main/java/io/metersphere/track/service/PerformanceTestCaseService.java +++ b/performance-test/backend/src/main/java/io/metersphere/track/service/PerformanceTestCaseService.java @@ -10,7 +10,7 @@ import io.metersphere.xpack.version.service.ProjectVersionService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/performance-test/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java b/performance-test/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java index b8348469e9..9ef97ec925 100644 --- a/performance-test/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java +++ b/performance-test/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java @@ -8,10 +8,10 @@ import io.metersphere.service.PerformanceTestService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; +import jakarta.annotation.Resource; +import jakarta.websocket.*; +import jakarta.websocket.server.PathParam; +import jakarta.websocket.server.ServerEndpoint; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ConcurrentHashMap; diff --git a/pom.xml b/pom.xml index f286ac4859..673ad9a47e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.7 + 3.0.1 @@ -18,13 +18,12 @@ MeterSphere - main - 11 - 2021.0.5 + spring-boot-3.0 + 17 + 2022.0.0 2.7.18 1.3.0 - 7.15.0 - 1.10.1 + 1.11.0 7.4.1.jre8 42.3.8 1.5.3 @@ -33,10 +32,10 @@ 31.1-jre 5.3.2 1.5 - 1.0.6 - 3.17.7 + 1.0.7 + 3.19.0 5.1.0 - 2.3.0 + 3.0.0 0.10.2 1.70 2.11.0 @@ -57,12 +56,12 @@ 2.4 2.2.14 1.9 - 1.6.11 + 1.6.13 1.2.7 5.5 3.0.11 2.7.0 - 3.2.13 + 3.2.14 3.4.4 19.7.0.0 3.8.0 @@ -100,10 +99,6 @@ - - org.springframework.cloud - spring-cloud-starter - org.springframework.boot spring-boot-configuration-processor diff --git a/project-management/Dockerfile b/project-management/Dockerfile index dd9d5f987d..db5d3941c9 100644 --- a/project-management/Dockerfile +++ b/project-management/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -22,7 +22,7 @@ RUN mv /app/lib/ms-jmeter-core-*.jar /app/lib/ms-jmeter-core.jar ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.ProjectApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/project-management/backend/src/main/java/io/metersphere/code/snippet/controller/CustomFunctionController.java b/project-management/backend/src/main/java/io/metersphere/code/snippet/controller/CustomFunctionController.java index 090653cb29..a8e3d88cb5 100644 --- a/project-management/backend/src/main/java/io/metersphere/code/snippet/controller/CustomFunctionController.java +++ b/project-management/backend/src/main/java/io/metersphere/code/snippet/controller/CustomFunctionController.java @@ -11,7 +11,7 @@ import io.metersphere.dto.MsExecResponseDTO; import io.metersphere.request.CustomFunctionRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; /** diff --git a/project-management/backend/src/main/java/io/metersphere/code/snippet/service/CustomFunctionService.java b/project-management/backend/src/main/java/io/metersphere/code/snippet/service/CustomFunctionService.java index 90847d2d25..b80829d7de 100644 --- a/project-management/backend/src/main/java/io/metersphere/code/snippet/service/CustomFunctionService.java +++ b/project-management/backend/src/main/java/io/metersphere/code/snippet/service/CustomFunctionService.java @@ -27,7 +27,7 @@ import org.apache.jorphan.collections.HashTree; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.ByteArrayInputStream; import java.lang.reflect.Field; import java.nio.charset.StandardCharsets; diff --git a/project-management/backend/src/main/java/io/metersphere/code/snippet/socket/IndexWebSocket.java b/project-management/backend/src/main/java/io/metersphere/code/snippet/socket/IndexWebSocket.java index 54fe1fd32f..a5d8931aea 100644 --- a/project-management/backend/src/main/java/io/metersphere/code/snippet/socket/IndexWebSocket.java +++ b/project-management/backend/src/main/java/io/metersphere/code/snippet/socket/IndexWebSocket.java @@ -7,9 +7,9 @@ import io.metersphere.utils.LoggerUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; +import jakarta.websocket.*; +import jakarta.websocket.server.PathParam; +import jakarta.websocket.server.ServerEndpoint; import java.io.IOException; @Slf4j diff --git a/project-management/backend/src/main/java/io/metersphere/code/snippet/util/WebSocketUtils.java b/project-management/backend/src/main/java/io/metersphere/code/snippet/util/WebSocketUtils.java index 014eed0f1c..58e4f9eb50 100644 --- a/project-management/backend/src/main/java/io/metersphere/code/snippet/util/WebSocketUtils.java +++ b/project-management/backend/src/main/java/io/metersphere/code/snippet/util/WebSocketUtils.java @@ -3,8 +3,8 @@ package io.metersphere.code.snippet.util; import io.metersphere.code.snippet.dto.MsgDto; import io.metersphere.utils.LoggerUtil; -import javax.websocket.RemoteEndpoint; -import javax.websocket.Session; +import jakarta.websocket.RemoteEndpoint; +import jakarta.websocket.Session; import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; diff --git a/project-management/backend/src/main/java/io/metersphere/controller/ApiTemplateController.java b/project-management/backend/src/main/java/io/metersphere/controller/ApiTemplateController.java index 6d5c9c86f0..9ecab56b41 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/ApiTemplateController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/ApiTemplateController.java @@ -14,7 +14,7 @@ import io.metersphere.request.UpdateApiTemplateRequest; import io.metersphere.service.ApiTemplateService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("field/template/api") diff --git a/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldController.java b/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldController.java index 3d844ad793..d8c3710d64 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldController.java @@ -12,7 +12,7 @@ import io.metersphere.request.QueryCustomFieldRequest; import io.metersphere.service.CustomFieldService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("custom/field") diff --git a/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldTemplateController.java b/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldTemplateController.java index fe87a3d413..6ef1222bec 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldTemplateController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/CustomFieldTemplateController.java @@ -7,7 +7,7 @@ import io.metersphere.dto.CustomFieldTemplateDao; import io.metersphere.service.CustomFieldTemplateService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/project-management/backend/src/main/java/io/metersphere/controller/FileRepositoryController.java b/project-management/backend/src/main/java/io/metersphere/controller/FileRepositoryController.java index b0332b0589..dad29ed558 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/FileRepositoryController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/FileRepositoryController.java @@ -13,7 +13,7 @@ import io.metersphere.service.FileRepositoryService; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/file/repository") diff --git a/project-management/backend/src/main/java/io/metersphere/controller/GroupController.java b/project-management/backend/src/main/java/io/metersphere/controller/GroupController.java index ade2389247..11e57c87ed 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/GroupController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/GroupController.java @@ -23,7 +23,7 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.UUID; diff --git a/project-management/backend/src/main/java/io/metersphere/controller/IssueTemplateController.java b/project-management/backend/src/main/java/io/metersphere/controller/IssueTemplateController.java index 3f59e21e98..2f26123164 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/IssueTemplateController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/IssueTemplateController.java @@ -17,7 +17,7 @@ import io.metersphere.service.IssueTemplateService; import org.apache.commons.collections.CollectionUtils; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/field/template/issue") diff --git a/project-management/backend/src/main/java/io/metersphere/controller/ProjectApplicationController.java b/project-management/backend/src/main/java/io/metersphere/controller/ProjectApplicationController.java index b9e68f09c3..0ab97676ca 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/ProjectApplicationController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/ProjectApplicationController.java @@ -9,7 +9,7 @@ import io.metersphere.request.ProjectApplicationRequest; import io.metersphere.service.ProjectApplicationService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/project_application") diff --git a/project-management/backend/src/main/java/io/metersphere/controller/ProjectController.java b/project-management/backend/src/main/java/io/metersphere/controller/ProjectController.java index 21a4ac6566..24c7142250 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/ProjectController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/ProjectController.java @@ -29,7 +29,7 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Collection; import java.util.List; diff --git a/project-management/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java b/project-management/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java index 38c8e3a0c6..90a23b457a 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java @@ -15,7 +15,7 @@ import io.metersphere.request.UpdateCaseFieldTemplateRequest; import io.metersphere.service.TestCaseTemplateService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/field/template/case") diff --git a/project-management/backend/src/main/java/io/metersphere/controller/remote/SystemSettingController.java b/project-management/backend/src/main/java/io/metersphere/controller/remote/SystemSettingController.java index 8875819f08..71157d7c19 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/remote/SystemSettingController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/remote/SystemSettingController.java @@ -4,9 +4,9 @@ import io.metersphere.remote.service.PlatformPluginService; import io.metersphere.service.remote.BaseSystemSettingService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; @RestController @RequestMapping(path = { diff --git a/project-management/backend/src/main/java/io/metersphere/controller/remote/UiTestController.java b/project-management/backend/src/main/java/io/metersphere/controller/remote/UiTestController.java index 3a93a3c33e..122d6342f9 100644 --- a/project-management/backend/src/main/java/io/metersphere/controller/remote/UiTestController.java +++ b/project-management/backend/src/main/java/io/metersphere/controller/remote/UiTestController.java @@ -3,8 +3,8 @@ package io.metersphere.controller.remote; import io.metersphere.service.remote.UiTestService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/project-management/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java b/project-management/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java index 99dc7c60af..e0219e745f 100644 --- a/project-management/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java +++ b/project-management/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java @@ -7,7 +7,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class ProjectDeletedListener { diff --git a/project-management/backend/src/main/java/io/metersphere/remote/service/ApiRelateService.java b/project-management/backend/src/main/java/io/metersphere/remote/service/ApiRelateService.java index 8c64bd4dfa..f988629ffa 100644 --- a/project-management/backend/src/main/java/io/metersphere/remote/service/ApiRelateService.java +++ b/project-management/backend/src/main/java/io/metersphere/remote/service/ApiRelateService.java @@ -15,7 +15,7 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/project-management/backend/src/main/java/io/metersphere/remote/service/LoadTestRemoteService.java b/project-management/backend/src/main/java/io/metersphere/remote/service/LoadTestRemoteService.java index 40c0a01544..95993f1464 100644 --- a/project-management/backend/src/main/java/io/metersphere/remote/service/LoadTestRemoteService.java +++ b/project-management/backend/src/main/java/io/metersphere/remote/service/LoadTestRemoteService.java @@ -9,7 +9,7 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/project-management/backend/src/main/java/io/metersphere/remote/service/PlatformPluginService.java b/project-management/backend/src/main/java/io/metersphere/remote/service/PlatformPluginService.java index fa66a5fc9a..82a3afbd9d 100644 --- a/project-management/backend/src/main/java/io/metersphere/remote/service/PlatformPluginService.java +++ b/project-management/backend/src/main/java/io/metersphere/remote/service/PlatformPluginService.java @@ -4,8 +4,8 @@ import io.metersphere.commons.utils.LogUtil; import io.metersphere.service.BasePluginService; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; diff --git a/project-management/backend/src/main/java/io/metersphere/remote/service/TestTrackRemoteService.java b/project-management/backend/src/main/java/io/metersphere/remote/service/TestTrackRemoteService.java index 31e722a5bf..205b6b0c5d 100644 --- a/project-management/backend/src/main/java/io/metersphere/remote/service/TestTrackRemoteService.java +++ b/project-management/backend/src/main/java/io/metersphere/remote/service/TestTrackRemoteService.java @@ -9,7 +9,7 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/project-management/backend/src/main/java/io/metersphere/service/ApiTemplateService.java b/project-management/backend/src/main/java/io/metersphere/service/ApiTemplateService.java index f935589cec..10687f04b9 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/ApiTemplateService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/ApiTemplateService.java @@ -26,7 +26,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.UUID; diff --git a/project-management/backend/src/main/java/io/metersphere/service/CustomFieldService.java b/project-management/backend/src/main/java/io/metersphere/service/CustomFieldService.java index 8869f311c2..689f6d3669 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/CustomFieldService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/CustomFieldService.java @@ -24,7 +24,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/project-management/backend/src/main/java/io/metersphere/service/CustomFieldTemplateService.java b/project-management/backend/src/main/java/io/metersphere/service/CustomFieldTemplateService.java index 7fc95f8713..0a561fb105 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/CustomFieldTemplateService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/CustomFieldTemplateService.java @@ -18,7 +18,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java b/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java index 45d49f4d06..43bfb39bf0 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java @@ -15,7 +15,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java b/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java index 6792f33126..3f210bf9c8 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java @@ -22,7 +22,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/project-management/backend/src/main/java/io/metersphere/service/FileRepositoryService.java b/project-management/backend/src/main/java/io/metersphere/service/FileRepositoryService.java index 0202e52dba..9f321b4fe9 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/FileRepositoryService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/FileRepositoryService.java @@ -27,7 +27,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/project-management/backend/src/main/java/io/metersphere/service/GroupService.java b/project-management/backend/src/main/java/io/metersphere/service/GroupService.java index c21333ef49..e5ce4fa2da 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/GroupService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/GroupService.java @@ -36,7 +36,7 @@ import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/project-management/backend/src/main/java/io/metersphere/service/IssueTemplateService.java b/project-management/backend/src/main/java/io/metersphere/service/IssueTemplateService.java index aecb838bca..7c6cf75137 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/IssueTemplateService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/IssueTemplateService.java @@ -26,7 +26,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/project-management/backend/src/main/java/io/metersphere/service/ProjectApplicationService.java b/project-management/backend/src/main/java/io/metersphere/service/ProjectApplicationService.java index bd4a32bc67..e3bda8471d 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/ProjectApplicationService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/ProjectApplicationService.java @@ -27,7 +27,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.*; diff --git a/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java b/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java index b77ef6825f..17972b84d1 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java @@ -35,11 +35,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.UUID; +import jakarta.annotation.Resource; +import java.util.*; import java.util.stream.Collectors; @Service diff --git a/project-management/backend/src/main/java/io/metersphere/service/TestCaseTemplateService.java b/project-management/backend/src/main/java/io/metersphere/service/TestCaseTemplateService.java index b800363113..5ded253f79 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/TestCaseTemplateService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/TestCaseTemplateService.java @@ -25,7 +25,7 @@ import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/project-management/backend/src/main/java/io/metersphere/service/UserGroupService.java b/project-management/backend/src/main/java/io/metersphere/service/UserGroupService.java index dbd6b2b208..f6e1ef3ebd 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/UserGroupService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/UserGroupService.java @@ -6,7 +6,7 @@ import io.metersphere.base.mapper.UserGroupMapper; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/report-stat/Dockerfile b/report-stat/Dockerfile index 0c200ac414..574f89929d 100644 --- a/report-stat/Dockerfile +++ b/report-stat/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -22,7 +22,7 @@ RUN mv /app/lib/ms-jmeter-core-*.jar /app/lib/ms-jmeter-core.jar ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.ReportApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/EnterpriseTestReportController.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/EnterpriseTestReportController.java index d0aca82c76..848a08f102 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/EnterpriseTestReportController.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/EnterpriseTestReportController.java @@ -21,7 +21,7 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/HistoryReportController.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/HistoryReportController.java index f690546f22..1e116fa068 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/HistoryReportController.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/HistoryReportController.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; /** diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportResourceController.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportResourceController.java index ceb6f20de2..3809b4aca1 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportResourceController.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportResourceController.java @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportStatShareController.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportStatShareController.java index 832746cdc2..c7ecfb17d9 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportStatShareController.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/ReportStatShareController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/report/stat/share") diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestAnalysisController.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestAnalysisController.java index f7746b183b..c20eedfed8 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestAnalysisController.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestAnalysisController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/report/test/analysis") diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestCaseCountController.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestCaseCountController.java index 07a4029c21..a284f28213 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestCaseCountController.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/controller/TestCaseCountController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java index 4243621165..8817735185 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java @@ -43,7 +43,7 @@ import org.springframework.core.io.FileSystemResource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.io.InputStream; import java.net.URL; diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/ReportStatisticsService.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/ReportStatisticsService.java index 2abd1b4e76..6e544146f0 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/ReportStatisticsService.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/ReportStatisticsService.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; /** diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestAnalysisService.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestAnalysisService.java index 1618952cdd..6652e7ed07 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestAnalysisService.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestAnalysisService.java @@ -14,7 +14,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java index f4fe08415a..2b909e3bff 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java @@ -23,7 +23,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Service diff --git a/system-setting/Dockerfile b/system-setting/Dockerfile index 7174a28be4..1446e36104 100644 --- a/system-setting/Dockerfile +++ b/system-setting/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -22,7 +22,7 @@ RUN mv /app/lib/ms-jmeter-core-*.jar /app/lib/ms-jmeter-core.jar ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.SettingApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/system-setting/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java b/system-setting/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java index 9ee4acabbf..a263d42da9 100644 --- a/system-setting/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java +++ b/system-setting/backend/src/main/java/io/metersphere/consul/CacheNodeAspect.java @@ -9,7 +9,7 @@ import org.aspectj.lang.annotation.Pointcut; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Aspect @Component diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/EnvironmentGroupController.java b/system-setting/backend/src/main/java/io/metersphere/controller/EnvironmentGroupController.java index 31d928c616..1de6cd4d85 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/EnvironmentGroupController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/EnvironmentGroupController.java @@ -6,7 +6,7 @@ import io.metersphere.service.EnvironmentGroupProjectService; import io.metersphere.service.EnvironmentGroupService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Map; @RestController diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/GroupController.java b/system-setting/backend/src/main/java/io/metersphere/controller/GroupController.java index 27d8d083cd..7697605ccb 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/GroupController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/GroupController.java @@ -23,7 +23,7 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.UUID; diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/ModuleController.java b/system-setting/backend/src/main/java/io/metersphere/controller/ModuleController.java index 3ba7019e85..09a2154158 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/ModuleController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/ModuleController.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("module") diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/PlatformPluginController.java b/system-setting/backend/src/main/java/io/metersphere/controller/PlatformPluginController.java index 01b4f39eef..cf37d993fe 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/PlatformPluginController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/PlatformPluginController.java @@ -5,8 +5,8 @@ import io.metersphere.dto.PlatformProjectOptionRequest; import io.metersphere.service.PlatformPluginService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/PluginController.java b/system-setting/backend/src/main/java/io/metersphere/controller/PluginController.java index a83bb944f1..a9c74ddc90 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/PluginController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/PluginController.java @@ -11,7 +11,7 @@ import io.metersphere.service.PluginService; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/SystemController.java b/system-setting/backend/src/main/java/io/metersphere/controller/SystemController.java index 6a20f706e3..d11556e625 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/SystemController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/SystemController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping("/system") diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/SystemDemoController.java b/system-setting/backend/src/main/java/io/metersphere/controller/SystemDemoController.java index 63d67c7381..5550ea600e 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/SystemDemoController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/SystemDemoController.java @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/SystemProjectController.java b/system-setting/backend/src/main/java/io/metersphere/controller/SystemProjectController.java index 70634a10a7..ee2c859282 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/SystemProjectController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/SystemProjectController.java @@ -24,8 +24,8 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; import java.util.Collection; import java.util.List; diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java b/system-setting/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java index 2dc534f678..d74ebf1ad1 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java @@ -14,7 +14,7 @@ import io.metersphere.request.resourcepool.QueryResourcePoolRequest; import io.metersphere.service.TestResourcePoolService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("testresourcepool") diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java b/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java index ae4b52ea53..8083bd9d0e 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java @@ -26,9 +26,9 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/WorkspaceController.java b/system-setting/backend/src/main/java/io/metersphere/controller/WorkspaceController.java index 6add7a15f0..b182225a8a 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/WorkspaceController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/WorkspaceController.java @@ -20,7 +20,7 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("workspace") diff --git a/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataCn.java b/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataCn.java index d7ea6f4958..a0cd84562b 100644 --- a/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataCn.java +++ b/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataCn.java @@ -5,8 +5,8 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; @Data @ColumnWidth(15) diff --git a/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataTw.java b/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataTw.java index 6201f4f295..611549fdc4 100644 --- a/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataTw.java +++ b/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataTw.java @@ -5,8 +5,8 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; @Data @ColumnWidth(15) diff --git a/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataUs.java b/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataUs.java index 0bba263b27..722641dc1f 100644 --- a/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataUs.java +++ b/system-setting/backend/src/main/java/io/metersphere/excel/domain/UserExcelDataUs.java @@ -5,8 +5,8 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; @Data diff --git a/system-setting/backend/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java b/system-setting/backend/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java index 823557ce87..d36d5969b9 100644 --- a/system-setting/backend/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java +++ b/system-setting/backend/src/main/java/io/metersphere/excel/utils/EasyExcelExporter.java @@ -7,7 +7,7 @@ import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/system-setting/backend/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java b/system-setting/backend/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java index 8fc6f737f2..3d9d135c82 100644 --- a/system-setting/backend/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java +++ b/system-setting/backend/src/main/java/io/metersphere/excel/utils/ExcelValidateHelper.java @@ -3,11 +3,11 @@ package io.metersphere.excel.utils; import com.alibaba.excel.annotation.ExcelProperty; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; -import javax.validation.groups.Default; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validator; +import jakarta.validation.groups.Default; import java.lang.reflect.Field; import java.util.Set; diff --git a/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanNotificationJob.java b/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanNotificationJob.java index 0a03d88e38..fbd8dd177a 100644 --- a/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanNotificationJob.java +++ b/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanNotificationJob.java @@ -9,7 +9,7 @@ import io.metersphere.commons.utils.LogUtil; import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.LocalDate; import java.time.ZoneId; import java.util.ArrayList; diff --git a/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanSessionJob.java b/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanSessionJob.java index 5b94941312..1c6c318ed9 100644 --- a/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanSessionJob.java +++ b/system-setting/backend/src/main/java/io/metersphere/job/schedule/CleanSessionJob.java @@ -11,7 +11,7 @@ import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.session.data.redis.RedisIndexedSessionRepository; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.HashMap; diff --git a/system-setting/backend/src/main/java/io/metersphere/listener/InitListener.java b/system-setting/backend/src/main/java/io/metersphere/listener/InitListener.java index c596c741d0..ac80d8d8dd 100644 --- a/system-setting/backend/src/main/java/io/metersphere/listener/InitListener.java +++ b/system-setting/backend/src/main/java/io/metersphere/listener/InitListener.java @@ -7,7 +7,7 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class InitListener implements ApplicationRunner { diff --git a/system-setting/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java b/system-setting/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java index 25b3496413..f8aba40781 100644 --- a/system-setting/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java +++ b/system-setting/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java @@ -8,7 +8,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class PlatformPluginListener { diff --git a/system-setting/backend/src/main/java/io/metersphere/security/session/RefreshSessionAspect.java b/system-setting/backend/src/main/java/io/metersphere/security/session/RefreshSessionAspect.java index e03b92c7d4..72d62287d8 100644 --- a/system-setting/backend/src/main/java/io/metersphere/security/session/RefreshSessionAspect.java +++ b/system-setting/backend/src/main/java/io/metersphere/security/session/RefreshSessionAspect.java @@ -11,7 +11,7 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Aspect @Component diff --git a/system-setting/backend/src/main/java/io/metersphere/service/ApiPluginService.java b/system-setting/backend/src/main/java/io/metersphere/service/ApiPluginService.java index ba4198a350..0435dddd25 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/ApiPluginService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/ApiPluginService.java @@ -21,7 +21,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.lang.reflect.Method; import java.net.URL; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java b/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java index c97399fcb4..0c84540eff 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupProjectService.java @@ -14,7 +14,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java b/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java index 3bbea36ee4..b55595215d 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java @@ -22,7 +22,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/GroupService.java b/system-setting/backend/src/main/java/io/metersphere/service/GroupService.java index e48ba9c066..d738bb42f0 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/GroupService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/GroupService.java @@ -35,7 +35,7 @@ import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/ModuleService.java b/system-setting/backend/src/main/java/io/metersphere/service/ModuleService.java index 38271d5b71..cf323b9f29 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/ModuleService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/ModuleService.java @@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.LinkedList; @Service diff --git a/system-setting/backend/src/main/java/io/metersphere/service/PlatformPluginService.java b/system-setting/backend/src/main/java/io/metersphere/service/PlatformPluginService.java index 70b60db239..17f68c11e5 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/PlatformPluginService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/PlatformPluginService.java @@ -25,8 +25,8 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/PluginService.java b/system-setting/backend/src/main/java/io/metersphere/service/PluginService.java index 51b6911f61..ac919a544a 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/PluginService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/PluginService.java @@ -26,7 +26,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.lang.reflect.Method; import java.net.URL; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/SystemDemoService.java b/system-setting/backend/src/main/java/io/metersphere/service/SystemDemoService.java index c0063e1d4d..2cee939969 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/SystemDemoService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/SystemDemoService.java @@ -7,7 +7,7 @@ import io.metersphere.dto.ProjectDTO; import io.metersphere.dto.UserDTO; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java b/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java index 2e4dea29fd..7a215e8fdc 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java @@ -34,10 +34,8 @@ import org.springframework.kafka.core.KafkaTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import java.util.LinkedList; -import java.util.List; -import java.util.UUID; +import jakarta.annotation.Resource; +import java.util.*; import java.util.stream.Collectors; @Service diff --git a/system-setting/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java b/system-setting/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java index d77bb9a4c9..3be031a9a3 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java @@ -28,7 +28,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.lang.reflect.InvocationTargetException; import java.util.*; import java.util.stream.Collectors; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/UserGroupService.java b/system-setting/backend/src/main/java/io/metersphere/service/UserGroupService.java index dbd6b2b208..f6e1ef3ebd 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/UserGroupService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/UserGroupService.java @@ -6,7 +6,7 @@ import io.metersphere.base.mapper.UserGroupMapper; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/UserService.java b/system-setting/backend/src/main/java/io/metersphere/service/UserService.java index 84c37357ed..6485bb8e6d 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/UserService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/UserService.java @@ -44,9 +44,9 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; diff --git a/system-setting/backend/src/main/java/io/metersphere/service/WorkspaceService.java b/system-setting/backend/src/main/java/io/metersphere/service/WorkspaceService.java index 0b085eabdd..1ce7cd06a1 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/WorkspaceService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/WorkspaceService.java @@ -29,7 +29,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; diff --git a/test-track/Dockerfile b/test-track/Dockerfile index bd9f0c13bb..9711e440d4 100644 --- a/test-track/Dockerfile +++ b/test-track/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -22,7 +22,7 @@ RUN mv /app/lib/ms-jmeter-core-*.jar /app/lib/ms-jmeter-core.jar ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.TrackApplication ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/test-track/backend/src/main/java/io/metersphere/controller/AttachmentController.java b/test-track/backend/src/main/java/io/metersphere/controller/AttachmentController.java index c29e9cb8c0..d53d981193 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/AttachmentController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/AttachmentController.java @@ -11,7 +11,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/IssueCommentController.java b/test-track/backend/src/main/java/io/metersphere/controller/IssueCommentController.java index d98e9b77eb..0c0dd8c344 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/IssueCommentController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/IssueCommentController.java @@ -16,7 +16,7 @@ import io.metersphere.service.TestCaseCommentService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/IssueProxyResourceController.java b/test-track/backend/src/main/java/io/metersphere/controller/IssueProxyResourceController.java index a35f8485fa..c971acad9d 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/IssueProxyResourceController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/IssueProxyResourceController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController @RequestMapping(value = "/resource") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/IssuesController.java b/test-track/backend/src/main/java/io/metersphere/controller/IssuesController.java index 9c27f998f8..4dbf63f3ac 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/IssuesController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/IssuesController.java @@ -33,8 +33,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.util.Collections; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/MinderExtraNodeController.java b/test-track/backend/src/main/java/io/metersphere/controller/MinderExtraNodeController.java index 3953036e5a..c763f1cb24 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/MinderExtraNodeController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/MinderExtraNodeController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java b/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java index 1730d1fc31..155b96a6ed 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java @@ -13,8 +13,8 @@ import io.metersphere.service.ShareInfoService; import io.metersphere.xpack.track.dto.IssuesDao; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.io.UnsupportedEncodingException; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/ShareReportController.java b/test-track/backend/src/main/java/io/metersphere/controller/ShareReportController.java index 7ac4f34143..d027ac0c4e 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/ShareReportController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/ShareReportController.java @@ -5,7 +5,7 @@ import io.metersphere.plan.service.TestPlanService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RestController public class ShareReportController { diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseCommentController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseCommentController.java index 48f5c982f6..1dfcc442c0 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseCommentController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseCommentController.java @@ -14,7 +14,7 @@ import io.metersphere.service.TestCaseService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/test/case/comment") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseController.java index 00259a3d07..fbfb8ae53d 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseController.java @@ -33,9 +33,9 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseIssuesController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseIssuesController.java index 39eb6779a8..ad346bfefb 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseIssuesController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseIssuesController.java @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("test/case/issues") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseNodeController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseNodeController.java index 66261a5c6c..50c651cc65 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseNodeController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseNodeController.java @@ -15,7 +15,7 @@ import io.metersphere.service.TestCaseNodeService; import io.metersphere.service.wapper.CheckPermissionService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.Optional; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportController.java index 4b522c82c5..1075bc6b1f 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportController.java @@ -8,7 +8,7 @@ import io.metersphere.request.testCaseReport.CreateReportRequest; import io.metersphere.service.TestCaseReportService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java index b41fedaec6..276253d964 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java @@ -8,7 +8,7 @@ import io.metersphere.request.testCaseReport.QueryTemplateRequest; import io.metersphere.service.TestCaseReportTemplateService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/case/report/template") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReviewController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReviewController.java index ed397dff41..3d15620afd 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReviewController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestCaseReviewController.java @@ -22,7 +22,7 @@ import io.metersphere.service.wapper.CheckPermissionService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java index e549627258..2c92463a93 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java @@ -33,8 +33,8 @@ import io.metersphere.service.wapper.CheckPermissionService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.io.UnsupportedEncodingException; import java.util.List; import java.util.Map; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java index fc47eba036..9d51f5ad4a 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java @@ -20,7 +20,7 @@ import io.metersphere.plan.service.TestPlanReportService; import io.metersphere.request.report.QueryTestPlanReportRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanTestCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanTestCaseController.java index 8c6b2dc665..dc44375e1a 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanTestCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanTestCaseController.java @@ -18,7 +18,7 @@ import io.metersphere.request.ResetOrderRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Arrays; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestReviewTestCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestReviewTestCaseController.java index 7313d0b19e..ef631944df 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestReviewTestCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestReviewTestCaseController.java @@ -19,7 +19,7 @@ import io.metersphere.service.TestReviewTestCaseService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/test/review/case") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TrackController.java b/test-track/backend/src/main/java/io/metersphere/controller/TrackController.java index 58a3ee8857..52c829dbe9 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TrackController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TrackController.java @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.text.DecimalFormat; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiCaseController.java index 382e1f180b..a7e9872475 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiCaseController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RequestMapping("/api/testcase") @RestController diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiDefinitionController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiDefinitionController.java index ce6f2edebf..213c8cab39 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiDefinitionController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiDefinitionController.java @@ -6,7 +6,7 @@ import io.metersphere.plan.service.TestPlanService; import io.metersphere.plan.service.remote.api.PlanApiDefinitionService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RequestMapping("/api/definition") @RestController diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiTestController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiTestController.java index 6f91d52ad5..b4f971851d 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiTestController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackApiTestController.java @@ -3,8 +3,8 @@ package io.metersphere.controller.remote; import io.metersphere.service.remote.api.TrackApiTestService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackPerformanceTestController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackPerformanceTestController.java index c4af252341..011b626479 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackPerformanceTestController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackPerformanceTestController.java @@ -3,8 +3,8 @@ package io.metersphere.controller.remote; import io.metersphere.service.remote.project.TrackPerformanceTestService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackProjectSettingController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackProjectSettingController.java index 30a5c2b756..ad406ec7a7 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackProjectSettingController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackProjectSettingController.java @@ -3,8 +3,8 @@ package io.metersphere.controller.remote; import io.metersphere.service.remote.project.TrackProjectSettingService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackSystemSettingController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackSystemSettingController.java index 02e1ed5345..ff092c8df4 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackSystemSettingController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackSystemSettingController.java @@ -3,8 +3,8 @@ package io.metersphere.controller.remote; import io.metersphere.service.remote.project.TrackSystemSettingService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanApiCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanApiCaseController.java index 38add1351a..e83237b67d 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanApiCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanApiCaseController.java @@ -7,7 +7,7 @@ import io.metersphere.plan.service.remote.api.PlanTestPlanApiCaseService; import io.metersphere.service.wapper.CheckPermissionService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/test/plan/api/case") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanLoadCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanLoadCaseController.java index 7d298fd711..b683a5deb9 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanLoadCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanLoadCaseController.java @@ -4,7 +4,7 @@ import io.metersphere.plan.request.performance.LoadCaseRequest; import io.metersphere.plan.service.remote.performance.PlanTestPlanLoadCaseService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RequestMapping("/test/plan/load/case") @RestController diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanScenarioCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanScenarioCaseController.java index 9b0d3bea61..88af4c73c8 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanScenarioCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanScenarioCaseController.java @@ -7,7 +7,7 @@ import io.metersphere.plan.service.remote.api.PlanTestPlanScenarioCaseService; import io.metersphere.service.wapper.CheckPermissionService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/test/plan/scenario/case") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanUiScenarioCaseController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanUiScenarioCaseController.java index 81e3e0901a..72efb70488 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanUiScenarioCaseController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackTestPlanUiScenarioCaseController.java @@ -8,7 +8,7 @@ import io.metersphere.request.ResetOrderRequest; import io.metersphere.service.wapper.CheckPermissionService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RequestMapping("/test/plan/uiScenario/case") diff --git a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackUiTestController.java b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackUiTestController.java index 60eeea70ea..ade0ba10fa 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackUiTestController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/remote/TrackUiTestController.java @@ -3,8 +3,8 @@ package io.metersphere.controller.remote; import io.metersphere.service.remote.project.TrackUiTestService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/test-track/backend/src/main/java/io/metersphere/controller/wapper/TrackGraphController.java b/test-track/backend/src/main/java/io/metersphere/controller/wapper/TrackGraphController.java index b53021ba3c..1fb295be06 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/wapper/TrackGraphController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/wapper/TrackGraphController.java @@ -5,7 +5,7 @@ import io.metersphere.service.wapper.TrackGraphService; import io.metersphere.xpack.graph.request.GraphBatchRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @RequestMapping("/graph") @RestController diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataCn.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataCn.java index 5b9bacf060..3c6d1f1f4b 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataCn.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataCn.java @@ -7,7 +7,7 @@ import io.metersphere.request.issues.IssueExportRequest; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; import java.util.List; import java.util.Locale; diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataTw.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataTw.java index f789adda81..c5b98ce0b7 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataTw.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataTw.java @@ -7,7 +7,7 @@ import io.metersphere.request.issues.IssueExportRequest; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; import java.util.List; import java.util.Locale; diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataUs.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataUs.java index 1e9a6b885b..084184935f 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataUs.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelDataUs.java @@ -7,7 +7,7 @@ import io.metersphere.request.issues.IssueExportRequest; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; import java.util.List; import java.util.Locale; diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataCn.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataCn.java index f35750686d..5da8e1947d 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataCn.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataCn.java @@ -7,8 +7,8 @@ import io.metersphere.excel.annotation.NotRequired; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; import java.util.List; import java.util.Locale; diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataTw.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataTw.java index fa31c7f905..62cf100c78 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataTw.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataTw.java @@ -7,8 +7,8 @@ import io.metersphere.excel.annotation.NotRequired; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; import java.util.List; import java.util.Locale; diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataUs.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataUs.java index c322d19047..52bf75fa09 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataUs.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/TestCaseExcelDataUs.java @@ -7,8 +7,8 @@ import io.metersphere.excel.annotation.NotRequired; import lombok.Data; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; import java.util.List; import java.util.Locale; diff --git a/test-track/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java b/test-track/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java index b4a97b1743..7d47088ca6 100644 --- a/test-track/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java +++ b/test-track/backend/src/main/java/io/metersphere/listener/CleanUpReportListener.java @@ -11,7 +11,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.LocalDate; import java.time.ZoneId; diff --git a/test-track/backend/src/main/java/io/metersphere/listener/ExecReportListener.java b/test-track/backend/src/main/java/io/metersphere/listener/ExecReportListener.java index a9b923ab66..3280ec6ad2 100644 --- a/test-track/backend/src/main/java/io/metersphere/listener/ExecReportListener.java +++ b/test-track/backend/src/main/java/io/metersphere/listener/ExecReportListener.java @@ -14,7 +14,7 @@ import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/listener/InitListener.java b/test-track/backend/src/main/java/io/metersphere/listener/InitListener.java index ab69687b0c..c45c927636 100644 --- a/test-track/backend/src/main/java/io/metersphere/listener/InitListener.java +++ b/test-track/backend/src/main/java/io/metersphere/listener/InitListener.java @@ -8,7 +8,7 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class InitListener implements ApplicationRunner { diff --git a/test-track/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java b/test-track/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java index 1a9e258fe0..7b57ae0d3c 100644 --- a/test-track/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java +++ b/test-track/backend/src/main/java/io/metersphere/listener/PlatformPluginListener.java @@ -7,7 +7,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class PlatformPluginListener { diff --git a/test-track/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java b/test-track/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java index 71c54880ee..0ce854958c 100644 --- a/test-track/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java +++ b/test-track/backend/src/main/java/io/metersphere/listener/ProjectCreatedListener.java @@ -12,7 +12,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java b/test-track/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java index 4e12a018b4..8b7234f7ad 100644 --- a/test-track/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java +++ b/test-track/backend/src/main/java/io/metersphere/listener/ProjectDeletedListener.java @@ -10,7 +10,7 @@ import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Component diff --git a/test-track/backend/src/main/java/io/metersphere/listener/TrackAppStartListener.java b/test-track/backend/src/main/java/io/metersphere/listener/TrackAppStartListener.java index d9167e7677..24d118c51b 100644 --- a/test-track/backend/src/main/java/io/metersphere/listener/TrackAppStartListener.java +++ b/test-track/backend/src/main/java/io/metersphere/listener/TrackAppStartListener.java @@ -6,7 +6,7 @@ import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Component public class TrackAppStartListener implements ApplicationListener { diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanExecutionQueueService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanExecutionQueueService.java index 78fc5d861e..c7c556015c 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanExecutionQueueService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanExecutionQueueService.java @@ -6,7 +6,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Optional; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanFollowService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanFollowService.java index 35a121c245..dda929fcfa 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanFollowService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanFollowService.java @@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanMessageService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanMessageService.java index 7e5325b36d..27c6945c12 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanMessageService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanMessageService.java @@ -23,7 +23,7 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanPrincipalService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanPrincipalService.java index 3b6eddcf75..00d1b679a9 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanPrincipalService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanPrincipalService.java @@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanProjectService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanProjectService.java index 1f5d0c836f..5dbb3bc72a 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanProjectService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanProjectService.java @@ -10,7 +10,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java index 435949c42c..08ed727b8b 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java @@ -41,7 +41,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanRerunService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanRerunService.java index d1c813a739..80999abea8 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanRerunService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanRerunService.java @@ -11,7 +11,7 @@ import io.metersphere.service.remote.api.ApiRerunService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service public class TestPlanRerunService { diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index af79ff0fa3..ab64c2e6f8 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -67,9 +67,9 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletResponse; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanTestCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanTestCaseService.java index 683b96fd87..c5c5cfef92 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanTestCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanTestCaseService.java @@ -46,7 +46,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanApiDefinitionService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanApiDefinitionService.java index 2d72bd1d1d..2437c82ec3 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanApiDefinitionService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanApiDefinitionService.java @@ -7,7 +7,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service public class PlanApiDefinitionService extends ApiTestService { diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java index 934dabd537..b6186e7aca 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java @@ -17,7 +17,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java index 95ab801694..bc9b09949f 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java @@ -17,7 +17,7 @@ import org.jetbrains.annotations.NotNull; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java index f9d667d607..073e8958ad 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java @@ -19,7 +19,7 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/ui/PlanTestPlanUiScenarioCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/ui/PlanTestPlanUiScenarioCaseService.java index d1755974a2..2fe8160493 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/ui/PlanTestPlanUiScenarioCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/ui/PlanTestPlanUiScenarioCaseService.java @@ -22,7 +22,7 @@ import org.jetbrains.annotations.NotNull; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/service/AttachmentService.java b/test-track/backend/src/main/java/io/metersphere/service/AttachmentService.java index d8fc654552..1d5b93dbd2 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/AttachmentService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/AttachmentService.java @@ -32,7 +32,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.*; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/service/CustomFieldIssuesService.java b/test-track/backend/src/main/java/io/metersphere/service/CustomFieldIssuesService.java index ca7b25bee6..f28f9df99c 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/CustomFieldIssuesService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/CustomFieldIssuesService.java @@ -16,7 +16,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/service/CustomFieldResourceCompatibleService.java b/test-track/backend/src/main/java/io/metersphere/service/CustomFieldResourceCompatibleService.java index c15fc1ab48..aa1470df02 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/CustomFieldResourceCompatibleService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/CustomFieldResourceCompatibleService.java @@ -23,7 +23,7 @@ import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Service diff --git a/test-track/backend/src/main/java/io/metersphere/service/FunctionCaseExecutionInfoService.java b/test-track/backend/src/main/java/io/metersphere/service/FunctionCaseExecutionInfoService.java index d4c426bb96..dec91b2fe2 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/FunctionCaseExecutionInfoService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/FunctionCaseExecutionInfoService.java @@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/service/IssueCommentService.java b/test-track/backend/src/main/java/io/metersphere/service/IssueCommentService.java index c0db340920..5c1f19ed7e 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/IssueCommentService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/IssueCommentService.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @Service diff --git a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java index df1064f3e0..65ca38e77e 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java @@ -75,8 +75,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.util.*; diff --git a/test-track/backend/src/main/java/io/metersphere/service/MinderExtraNodeService.java b/test-track/backend/src/main/java/io/metersphere/service/MinderExtraNodeService.java index a44e536aba..1c747707d9 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/MinderExtraNodeService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/MinderExtraNodeService.java @@ -9,7 +9,7 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; diff --git a/test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java b/test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java index cd63bc59f3..abd3e351e6 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java @@ -21,7 +21,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.InputStream; import java.util.List; import java.util.Map; diff --git a/test-track/backend/src/main/java/io/metersphere/service/ShareInfoService.java b/test-track/backend/src/main/java/io/metersphere/service/ShareInfoService.java index e3bd049432..7f54dd37e5 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/ShareInfoService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/ShareInfoService.java @@ -15,7 +15,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import static io.metersphere.commons.user.ShareUtil.getTimeMills; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseCommentService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseCommentService.java index 6ee6be6b04..46332be3fb 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseCommentService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseCommentService.java @@ -28,7 +28,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java index eec69749d6..37bd142283 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java @@ -15,7 +15,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java index 5e9e0e8e64..0c11d411d4 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java @@ -40,7 +40,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportService.java index 901767881f..7a1612d539 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportService.java @@ -19,7 +19,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java index 2516cd0997..8c41ce5205 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java @@ -16,7 +16,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.UUID; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java index bfde7ccff1..f44998893a 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java @@ -35,7 +35,7 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.lang.reflect.InvocationTargetException; import java.text.SimpleDateFormat; import java.util.*; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java index 60bb799edf..5acb3a36a9 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java @@ -68,9 +68,9 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestReviewProjectService.java b/test-track/backend/src/main/java/io/metersphere/service/TestReviewProjectService.java index be4645a2c3..05993f14af 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestReviewProjectService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestReviewProjectService.java @@ -9,7 +9,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java b/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java index efbb751303..ed1a89ca8d 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java @@ -27,7 +27,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; diff --git a/test-track/backend/src/main/java/io/metersphere/service/TrackService.java b/test-track/backend/src/main/java/io/metersphere/service/TrackService.java index 5216774135..3c2585cb94 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TrackService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TrackService.java @@ -29,7 +29,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.math.BigDecimal; import java.text.DecimalFormat; import java.util.*; diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/client/BaseClient.java b/test-track/backend/src/main/java/io/metersphere/service/issue/client/BaseClient.java index aa5d493007..5be54f3dcb 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/client/BaseClient.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/client/BaseClient.java @@ -4,11 +4,14 @@ import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.EncryptUtils; import io.metersphere.commons.utils.JSON; import io.metersphere.commons.utils.LogUtil; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.TrustStrategy; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.impl.conn.SystemDefaultRoutePlanner; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; +import org.apache.hc.client5.http.impl.routing.SystemDefaultRoutePlanner; +import org.apache.hc.client5.http.io.HttpClientConnectionManager; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.core5.ssl.SSLContexts; +import org.apache.hc.core5.ssl.TrustStrategy; import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; @@ -20,19 +23,24 @@ import java.util.Arrays; public abstract class BaseClient { - protected RestTemplate restTemplate; + protected RestTemplate restTemplate; - { + { try { TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true; - SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom() + SSLContext sslContext = SSLContexts.custom() .loadTrustMaterial(null, acceptingTrustStrategy) .build(); SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext); + + HttpClientConnectionManager cm = PoolingHttpClientConnectionManagerBuilder.create() + .setSSLSocketFactory(csf) + .build(); + CloseableHttpClient httpClient = HttpClients.custom() // 可以支持设置系统代理 .setRoutePlanner(new SystemDefaultRoutePlanner(new EnvProxySelector())) - .setSSLSocketFactory(csf) + .setConnectionManager(cm) .build(); HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); requestFactory.setHttpClient(httpClient); @@ -43,7 +51,7 @@ public abstract class BaseClient { } } - protected HttpHeaders getBasicHttpHeaders(String userName, String passWd) { + protected HttpHeaders getBasicHttpHeaders(String userName, String passWd) { String authKey = EncryptUtils.base64Encoding(userName + ":" + passWd); HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", "Basic " + authKey); @@ -51,21 +59,21 @@ public abstract class BaseClient { return headers; } - protected String getResult(ResponseEntity response) { + protected String getResult(ResponseEntity response) { int statusCodeValue = response.getStatusCodeValue(); LogUtil.info("responseCode: " + statusCodeValue); - if(statusCodeValue >= 400){ + if (statusCodeValue >= 400) { MSException.throwException(response.getBody()); } LogUtil.info("result: " + response.getBody()); return response.getBody(); } - protected Object getResultForList(Class clazz, ResponseEntity response) { + protected Object getResultForList(Class clazz, ResponseEntity response) { return Arrays.asList(JSON.parseArray(getResult(response), clazz).toArray()); } - protected Object getResultForObject(Class clazz,ResponseEntity response) { + protected Object getResultForObject(Class clazz, ResponseEntity response) { return JSON.parseObject(getResult(response), clazz); } } diff --git a/test-track/backend/src/main/java/io/metersphere/service/wapper/CheckPermissionService.java b/test-track/backend/src/main/java/io/metersphere/service/wapper/CheckPermissionService.java index d13f94e940..7cec1830d9 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/wapper/CheckPermissionService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/wapper/CheckPermissionService.java @@ -10,7 +10,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Set; @Service diff --git a/test-track/backend/src/main/java/io/metersphere/service/wapper/IssueProxyResourceService.java b/test-track/backend/src/main/java/io/metersphere/service/wapper/IssueProxyResourceService.java index 86665d1e7f..b30c6cf379 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/wapper/IssueProxyResourceService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/wapper/IssueProxyResourceService.java @@ -5,7 +5,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service @Transactional(rollbackFor = Exception.class) diff --git a/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackGraphService.java b/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackGraphService.java index 2d8b54a2ad..1cff092150 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackGraphService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackGraphService.java @@ -9,7 +9,7 @@ import io.metersphere.xpack.graph.request.GraphBatchRequest; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; @Service @Transactional(rollbackFor = Exception.class) diff --git a/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java b/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java index 40360cafa5..766e2071e7 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java @@ -11,7 +11,7 @@ import io.metersphere.service.BaseProjectService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.stream.Collectors; diff --git a/test-track/backend/src/main/java/io/metersphere/service/wapper/UserService.java b/test-track/backend/src/main/java/io/metersphere/service/wapper/UserService.java index 8ea394a862..5c75c0df51 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/wapper/UserService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/wapper/UserService.java @@ -9,7 +9,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Map; @Service diff --git a/test-track/backend/src/main/java/io/metersphere/utils/WebSocketUtil.java b/test-track/backend/src/main/java/io/metersphere/utils/WebSocketUtil.java index 9b6a78d029..c5bc3c454a 100644 --- a/test-track/backend/src/main/java/io/metersphere/utils/WebSocketUtil.java +++ b/test-track/backend/src/main/java/io/metersphere/utils/WebSocketUtil.java @@ -3,8 +3,8 @@ package io.metersphere.utils; import io.metersphere.dto.MsgDTO; import org.apache.commons.lang3.StringUtils; -import javax.websocket.RemoteEndpoint; -import javax.websocket.Session; +import jakarta.websocket.RemoteEndpoint; +import jakarta.websocket.Session; import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; diff --git a/test-track/backend/src/main/java/io/metersphere/websocket/ExecReportWebSocket.java b/test-track/backend/src/main/java/io/metersphere/websocket/ExecReportWebSocket.java index c77da10245..ab02b736c3 100644 --- a/test-track/backend/src/main/java/io/metersphere/websocket/ExecReportWebSocket.java +++ b/test-track/backend/src/main/java/io/metersphere/websocket/ExecReportWebSocket.java @@ -7,14 +7,14 @@ import io.metersphere.utils.WebSocketUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; -import javax.websocket.OnClose; -import javax.websocket.OnError; -import javax.websocket.OnMessage; -import javax.websocket.OnOpen; -import javax.websocket.RemoteEndpoint; -import javax.websocket.Session; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; +import jakarta.websocket.OnClose; +import jakarta.websocket.OnError; +import jakarta.websocket.OnMessage; +import jakarta.websocket.OnOpen; +import jakarta.websocket.RemoteEndpoint; +import jakarta.websocket.Session; +import jakarta.websocket.server.PathParam; +import jakarta.websocket.server.ServerEndpoint; import java.io.IOException; @Slf4j diff --git a/test-track/backend/src/main/java/io/metersphere/xmind/utils/CommonsMultipartFile.java b/test-track/backend/src/main/java/io/metersphere/xmind/utils/CommonsMultipartFile.java new file mode 100644 index 0000000000..cb43935c27 --- /dev/null +++ b/test-track/backend/src/main/java/io/metersphere/xmind/utils/CommonsMultipartFile.java @@ -0,0 +1,226 @@ +/* + * Copyright 2002-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.metersphere.xmind.utils; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.Serializable; +import java.nio.file.Files; +import java.nio.file.Path; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.disk.DiskFileItem; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.springframework.core.log.LogFormatUtils; +import org.springframework.util.FileCopyUtils; +import org.springframework.util.StreamUtils; +import org.springframework.web.multipart.MultipartFile; + +/** + * {@link MultipartFile} implementation for Apache Commons FileUpload. + * + * @author Trevor D. Cook + * @author Juergen Hoeller + * @since 29.09.2003 + * @see CommonsMultipartResolver + */ +@SuppressWarnings("serial") +public class CommonsMultipartFile implements MultipartFile, Serializable { + + protected static final Log logger = LogFactory.getLog(CommonsMultipartFile.class); + + private final FileItem fileItem; + + private final long size; + + private boolean preserveFilename = false; + + /** + * Create an instance wrapping the given FileItem. + * @param fileItem the FileItem to wrap + */ + public CommonsMultipartFile(FileItem fileItem) { + this.fileItem = fileItem; + this.size = this.fileItem.getSize(); + } + + /** + * Return the underlying {@code org.apache.commons.fileupload.FileItem} + * instance. There is hardly any need to access this. + */ + public final FileItem getFileItem() { + return this.fileItem; + } + + /** + * Set whether to preserve the filename as sent by the client, not stripping off + * path information in {@link CommonsMultipartFile#getOriginalFilename()}. + *

Default is "false", stripping off path information that may prefix the + * actual filename e.g. from Opera. Switch this to "true" for preserving the + * client-specified filename as-is, including potential path separators. + * @since 4.3.5 + * @see #getOriginalFilename() + * @see CommonsMultipartResolver#setPreserveFilename(boolean) + */ + public void setPreserveFilename(boolean preserveFilename) { + this.preserveFilename = preserveFilename; + } + + @Override + public String getName() { + return this.fileItem.getFieldName(); + } + + @Override + public String getOriginalFilename() { + String filename = this.fileItem.getName(); + if (filename == null) { + // Should never happen. + return ""; + } + if (this.preserveFilename) { + // Do not try to strip off a path... + return filename; + } + + // Check for Unix-style path + int unixSep = filename.lastIndexOf('/'); + // Check for Windows-style path + int winSep = filename.lastIndexOf('\\'); + // Cut off at latest possible point + int pos = Math.max(winSep, unixSep); + if (pos != -1) { + // Any sort of path separator found... + return filename.substring(pos + 1); + } else { + // A plain name + return filename; + } + } + + @Override + public String getContentType() { + return this.fileItem.getContentType(); + } + + @Override + public boolean isEmpty() { + return (this.size == 0); + } + + @Override + public long getSize() { + return this.size; + } + + @Override + public byte[] getBytes() { + if (!isAvailable()) { + throw new IllegalStateException("File has been moved - cannot be read again"); + } + byte[] bytes = this.fileItem.get(); + return (bytes != null ? bytes : new byte[0]); + } + + @Override + public InputStream getInputStream() throws IOException { + if (!isAvailable()) { + throw new IllegalStateException("File has been moved - cannot be read again"); + } + InputStream inputStream = this.fileItem.getInputStream(); + return (inputStream != null ? inputStream : StreamUtils.emptyInput()); + } + + @Override + public void transferTo(File dest) throws IOException, IllegalStateException { + if (!isAvailable()) { + throw new IllegalStateException("File has already been moved - cannot be transferred again"); + } + + if (dest.exists() && !dest.delete()) { + throw new IOException( + "Destination file [" + dest.getAbsolutePath() + "] already exists and could not be deleted"); + } + + try { + this.fileItem.write(dest); + LogFormatUtils.traceDebug(logger, traceOn -> { + String action = "transferred"; + if (!this.fileItem.isInMemory()) { + action = (isAvailable() ? "copied" : "moved"); + } + return "Part '" + getName() + "', filename '" + getOriginalFilename() + "'" + + (traceOn ? ", stored " + getStorageDescription() : "") + ": " + action + " to [" + + dest.getAbsolutePath() + "]"; + }); + } catch (FileUploadException ex) { + throw new IllegalStateException(ex.getMessage(), ex); + } catch (IllegalStateException | IOException ex) { + // Pass through IllegalStateException when coming from FileItem directly, + // or propagate an exception from I/O operations within FileItem.write + throw ex; + } catch (Exception ex) { + throw new IOException("File transfer failed", ex); + } + } + + @Override + public void transferTo(Path dest) throws IOException, IllegalStateException { + if (!isAvailable()) { + throw new IllegalStateException("File has already been moved - cannot be transferred again"); + } + + FileCopyUtils.copy(this.fileItem.getInputStream(), Files.newOutputStream(dest)); + } + + /** + * Determine whether the multipart content is still available. + * If a temporary file has been moved, the content is no longer available. + */ + protected boolean isAvailable() { + // If in memory, it's available. + if (this.fileItem.isInMemory()) { + return true; + } + // Check actual existence of temporary file. + if (this.fileItem instanceof DiskFileItem) { + return ((DiskFileItem) this.fileItem).getStoreLocation().exists(); + } + // Check whether current file size is different than original one. + return (this.fileItem.getSize() == this.size); + } + + /** + * Return a description for the storage location of the multipart content. + * Tries to be as specific as possible: mentions the file location in case + * of a temporary file. + */ + public String getStorageDescription() { + if (this.fileItem.isInMemory()) { + return "in memory"; + } else if (this.fileItem instanceof DiskFileItem) { + return "at [" + ((DiskFileItem) this.fileItem).getStoreLocation().getAbsolutePath() + "]"; + } else { + return "on disk"; + } + } + +} \ No newline at end of file diff --git a/test-track/backend/src/main/java/io/metersphere/xmind/utils/FileUtil.java b/test-track/backend/src/main/java/io/metersphere/xmind/utils/FileUtil.java index 72ce0b2b53..225c62fd69 100644 --- a/test-track/backend/src/main/java/io/metersphere/xmind/utils/FileUtil.java +++ b/test-track/backend/src/main/java/io/metersphere/xmind/utils/FileUtil.java @@ -5,7 +5,6 @@ import io.metersphere.commons.utils.LogUtil; import org.apache.commons.fileupload.disk.DiskFileItem; import org.springframework.http.MediaType; import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.commons.CommonsMultipartFile; import java.io.*; diff --git a/test-track/backend/src/main/java/io/metersphere/xmind/utils/XmindExportUtil.java b/test-track/backend/src/main/java/io/metersphere/xmind/utils/XmindExportUtil.java index 6a40e1858d..215a0cf02f 100644 --- a/test-track/backend/src/main/java/io/metersphere/xmind/utils/XmindExportUtil.java +++ b/test-track/backend/src/main/java/io/metersphere/xmind/utils/XmindExportUtil.java @@ -12,7 +12,7 @@ import org.xmind.core.*; import org.xmind.core.style.IStyle; import org.xmind.core.style.IStyleSheet; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; diff --git a/workstation/Dockerfile b/workstation/Dockerfile index fc04b0cbb4..adf5ef8804 100644 --- a/workstation/Dockerfile +++ b/workstation/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk11-jre +FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre LABEL maintainer="FIT2CLOUD " @@ -22,7 +22,7 @@ ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/l ENV JAVA_MAIN_CLASS=io.metersphere.WorkstationApplication ENV AB_OFF=true ENV MS_VERSION=${MS_VERSION} -ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED" +ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED" CMD ["/deployments/run-java.sh"] diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/controller/WorkstationController.java b/workstation/backend/src/main/java/io/metersphere/workstation/controller/WorkstationController.java index 7e587e99fe..b1147f3d7e 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/controller/WorkstationController.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/controller/WorkstationController.java @@ -3,7 +3,7 @@ package io.metersphere.workstation.controller; import io.metersphere.workstation.service.WorkstationService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Map; @RequestMapping("workstation") diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ApiController.java b/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ApiController.java index 9b5258ecd2..27efeb01b3 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ApiController.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ApiController.java @@ -3,8 +3,8 @@ package io.metersphere.workstation.controller.api; import io.metersphere.workstation.service.api.ApiService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ExtProjectController.java b/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ExtProjectController.java index 6c8ddb9eab..e1c37afe0d 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ExtProjectController.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/controller/api/ExtProjectController.java @@ -13,7 +13,7 @@ import io.metersphere.service.BaseUserService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Collection; import java.util.List; diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/controller/performance/PerformanceController.java b/workstation/backend/src/main/java/io/metersphere/workstation/controller/performance/PerformanceController.java index 4cbf97a466..cb409373fc 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/controller/performance/PerformanceController.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/controller/performance/PerformanceController.java @@ -3,8 +3,8 @@ package io.metersphere.workstation.controller.performance; import io.metersphere.workstation.service.performance.PerformanceService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/controller/projectmanage/ProjectManagementController.java b/workstation/backend/src/main/java/io/metersphere/workstation/controller/projectmanage/ProjectManagementController.java index e903b0436b..ba5a60c43d 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/controller/projectmanage/ProjectManagementController.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/controller/projectmanage/ProjectManagementController.java @@ -3,8 +3,8 @@ package io.metersphere.workstation.controller.projectmanage; import io.metersphere.workstation.service.projectmanage.ProjectManagementService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/controller/system/SystemSettingController.java b/workstation/backend/src/main/java/io/metersphere/workstation/controller/system/SystemSettingController.java index ea04821c92..1909262572 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/controller/system/SystemSettingController.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/controller/system/SystemSettingController.java @@ -3,8 +3,8 @@ package io.metersphere.workstation.controller.system; import io.metersphere.workstation.service.system.SystemSettingService; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping(path = { diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/controller/track/TrackController.java b/workstation/backend/src/main/java/io/metersphere/workstation/controller/track/TrackController.java index aec3db06f1..1da3c34227 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/controller/track/TrackController.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/controller/track/TrackController.java @@ -1,10 +1,10 @@ package io.metersphere.workstation.controller.track; import io.metersphere.workstation.service.track.TrackSettingService; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; @RestController @RequestMapping(path = { diff --git a/workstation/backend/src/main/java/io/metersphere/workstation/service/WorkstationService.java b/workstation/backend/src/main/java/io/metersphere/workstation/service/WorkstationService.java index c1c125f006..92c0c567f6 100644 --- a/workstation/backend/src/main/java/io/metersphere/workstation/service/WorkstationService.java +++ b/workstation/backend/src/main/java/io/metersphere/workstation/service/WorkstationService.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.text.SimpleDateFormat; import java.time.DayOfWeek; import java.time.LocalDate;