build: spring boot 3.0

This commit is contained in:
CaptainB 2022-11-25 08:51:52 +08:00
parent 49e384231d
commit 5983399738
418 changed files with 973 additions and 704 deletions

8
Jenkinsfile vendored
View File

@ -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

View File

@ -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 <support@fit2cloud.com>"
@ -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"]

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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<String> 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<String> 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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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.*;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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;
/**

View File

@ -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

View File

@ -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;

View File

@ -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")

View File

@ -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;

View File

@ -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")

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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 = {

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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")

View File

@ -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;

View File

@ -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")

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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 {

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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 <support@fit2cloud.com>"
@ -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"]

View File

@ -13,16 +13,6 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>

View File

@ -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;

View File

@ -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 <support@fit2cloud.com>"
@ -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"]

View File

@ -194,6 +194,10 @@
<artifactId>xz</artifactId>
<groupId>org.tukaani</groupId>
</exclusion>
<exclusion>
<artifactId>springdoc-openapi-ui</artifactId>
<groupId>org.springdoc</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@ -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 {

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More