You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2023/03/06 14:52:01 UTC
[incubator-streampark] branch resource created (now eab98ee0a)
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a change to branch resource
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
at eab98ee0a [Improve] @Autowired change to @Resource
This branch includes the following new commits:
new eab98ee0a [Improve] @Autowired change to @Resource
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-streampark] 01/01: [Improve] @Autowired change to @Resource
Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch resource
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
commit eab98ee0aea348d7d811d175cf86ee5d03ac9dff
Author: benjobs <be...@apache.org>
AuthorDate: Mon Mar 6 22:51:45 2023 +0800
[Improve] @Autowired change to @Resource
---
.../console/base/config/WebMvcConfig.java | 5 ++--
.../console/core/aspect/StreamParkAspect.java | 5 ++--
.../console/core/controller/AlertController.java | 6 ++--
.../ApplicationBuildPipelineController.java | 9 +++---
.../core/controller/ApplicationController.java | 11 +++----
.../controller/ApplicationHistoryController.java | 5 ++--
.../console/core/controller/ConfigController.java | 5 ++--
.../core/controller/ExternalLinkController.java | 4 +--
.../core/controller/FlinkClusterController.java | 5 ++--
.../core/controller/FlinkEnvController.java | 5 ++--
.../core/controller/FlinkSqlController.java | 8 ++---
.../console/core/controller/MetricsController.java | 5 ++--
.../console/core/controller/ProjectController.java | 5 ++--
.../core/controller/SavePointController.java | 6 ++--
.../console/core/controller/SettingController.java | 5 ++--
.../core/controller/TutorialController.java | 5 ++--
.../core/controller/VariableController.java | 4 +--
.../console/core/runner/EnvInitializer.java | 7 +++--
.../service/alert/impl/AlertConfigServiceImpl.java | 5 ++--
.../core/service/alert/impl/AlertServiceImpl.java | 5 ++--
.../alert/impl/EmailAlertNotifyServiceImpl.java | 4 +--
.../impl/HttpCallbackAlertNotifyServiceImpl.java | 7 +++--
.../core/service/impl/AppBuildPipeServiceImpl.java | 20 ++++++-------
.../service/impl/ApplicationBackUpServiceImpl.java | 11 +++----
.../service/impl/ApplicationConfigServiceImpl.java | 11 +++----
.../core/service/impl/ApplicationServiceImpl.java | 34 +++++++++++-----------
.../core/service/impl/CommonServiceImpl.java | 5 ++--
.../core/service/impl/ExternalLinkServiceImpl.java | 13 +++++----
.../core/service/impl/FlinkClusterServiceImpl.java | 9 +++---
.../core/service/impl/FlinkSqlServiceImpl.java | 9 +++---
.../core/service/impl/ProjectServiceImpl.java | 7 +++--
.../core/service/impl/SavePointServiceImpl.java | 14 ++++-----
.../core/service/impl/VariableServiceImpl.java | 9 +++---
.../console/core/task/CheckpointProcessor.java | 8 ++---
.../core/task/FlinkK8sChangeEventListener.java | 9 +++---
.../console/core/task/FlinkK8sWatcherWrapper.java | 6 ++--
.../console/core/task/FlinkRESTAPIWatcher.java | 12 ++++----
.../console/system/authentication/ShiroRealm.java | 6 ++--
.../system/controller/AccessTokenController.java | 6 ++--
.../system/controller/MemberController.java | 4 +--
.../console/system/controller/MenuController.java | 6 ++--
.../system/controller/PassportController.java | 8 ++---
.../console/system/controller/RoleController.java | 6 ++--
.../console/system/controller/TeamController.java | 4 +--
.../console/system/controller/UserController.java | 8 ++---
.../console/system/runner/StartedUpRunner.java | 5 ++--
.../system/security/impl/AuthenticatorImpl.java | 7 +++--
.../service/impl/AccessTokenServiceImpl.java | 5 ++--
.../system/service/impl/MemberServiceImpl.java | 9 +++---
.../system/service/impl/MenuServiceImpl.java | 7 +++--
.../system/service/impl/RoleServiceImpl.java | 9 +++---
.../system/service/impl/TeamServiceImpl.java | 15 +++++-----
.../system/service/impl/UserServiceImpl.java | 6 ++--
.../core/service/ApplicationServiceTest.java | 5 ++--
.../console/core/service/VariableServiceTest.java | 5 ++--
55 files changed, 229 insertions(+), 195 deletions(-)
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/WebMvcConfig.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/WebMvcConfig.java
index 1b633ea68..e2aa3f07f 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/WebMvcConfig.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/WebMvcConfig.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
@@ -36,13 +35,15 @@ import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import javax.annotation.Resource;
+
import java.text.SimpleDateFormat;
import java.util.List;
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
- @Autowired private UploadFileTypeInterceptor uploadFileTypeInterceptor;
+ @Resource private UploadFileTypeInterceptor uploadFileTypeInterceptor;
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/aspect/StreamParkAspect.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/aspect/StreamParkAspect.java
index d6dbc5676..291cc9ced 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/aspect/StreamParkAspect.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/aspect/StreamParkAspect.java
@@ -33,9 +33,10 @@ import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+
import java.util.Objects;
@Slf4j
@@ -43,7 +44,7 @@ import java.util.Objects;
@Aspect
public class StreamParkAspect {
- @Autowired private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
+ @Resource private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
@Pointcut(
"execution(public"
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/AlertController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/AlertController.java
index 316276811..e3d6b5ec1 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/AlertController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/AlertController.java
@@ -33,7 +33,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -42,6 +41,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 javax.validation.constraints.NotNull;
import java.util.Date;
@@ -55,9 +55,9 @@ import java.util.TimeZone;
@RequestMapping("/flink/alert")
public class AlertController {
- @Autowired private AlertConfigService alertConfigService;
+ @Resource private AlertConfigService alertConfigService;
- @Autowired private AlertService alertService;
+ @Resource private AlertService alertService;
@ApiOperation(value = "Create alert config")
@PostMapping(value = "/add")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java
index debaf46c6..8f4004bc9 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java
@@ -37,12 +37,13 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
@@ -54,11 +55,11 @@ import java.util.Optional;
@RequestMapping("flink/pipe")
public class ApplicationBuildPipelineController {
- @Autowired private AppBuildPipeService appBuildPipeService;
+ @Resource private AppBuildPipeService appBuildPipeService;
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private FlinkSqlService flinkSqlService;
+ @Resource private FlinkSqlService flinkSqlService;
/**
* Release application building pipeline.
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java
index 7d9ccbc76..89b5d1bb1 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java
@@ -44,7 +44,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -52,6 +51,8 @@ import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore;
+import javax.annotation.Resource;
+
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
@@ -68,13 +69,13 @@ import java.util.stream.Collectors;
@RequestMapping("flink/app")
public class ApplicationController {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private ApplicationBackUpService backUpService;
+ @Resource private ApplicationBackUpService backUpService;
- @Autowired private ApplicationLogService applicationLogService;
+ @Resource private ApplicationLogService applicationLogService;
- @Autowired private AppBuildPipeService appBuildPipeService;
+ @Resource private AppBuildPipeService appBuildPipeService;
@ApiAccess
@PostMapping("get")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationHistoryController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationHistoryController.java
index 15b9e3d5b..92caeee56 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationHistoryController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationHistoryController.java
@@ -25,12 +25,13 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
import java.util.ArrayList;
import java.util.List;
@@ -43,7 +44,7 @@ import java.util.List;
@RequestMapping("flink/history")
public class ApplicationHistoryController {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
@PostMapping("uploadJars")
@RequiresPermissions("app:create")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ConfigController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ConfigController.java
index a31647921..1f0b6f662 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ConfigController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ConfigController.java
@@ -29,12 +29,13 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.collect.ImmutableMap;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
import java.util.List;
import java.util.Map;
@@ -44,7 +45,7 @@ import java.util.Map;
@RequestMapping("flink/conf")
public class ConfigController {
- @Autowired private ApplicationConfigService applicationConfigService;
+ @Resource private ApplicationConfigService applicationConfigService;
@PostMapping("get")
public RestResponse get(Long id) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ExternalLinkController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ExternalLinkController.java
index 11c75a87a..1d24f0015 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ExternalLinkController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ExternalLinkController.java
@@ -29,7 +29,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -37,6 +36,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 javax.validation.Valid;
import javax.validation.constraints.NotNull;
@@ -49,7 +49,7 @@ import java.util.List;
@RequestMapping("/flink/externalLink")
public class ExternalLinkController {
- @Autowired private ExternalLinkService externalLinkService;
+ @Resource private ExternalLinkService externalLinkService;
@ApiOperation(value = "List externalLink")
@PostMapping("/list")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkClusterController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkClusterController.java
index 9465cad5f..096c6b602 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkClusterController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkClusterController.java
@@ -26,12 +26,13 @@ import org.apache.streampark.console.core.service.FlinkClusterService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
import java.util.List;
@Slf4j
@@ -40,7 +41,7 @@ import java.util.List;
@RequestMapping("flink/cluster")
public class FlinkClusterController {
- @Autowired private FlinkClusterService flinkClusterService;
+ @Resource private FlinkClusterService flinkClusterService;
@PostMapping("list")
public RestResponse list() {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java
index 7c2cc7b92..5f8b90073 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java
@@ -23,12 +23,13 @@ import org.apache.streampark.console.core.entity.FlinkEnv;
import org.apache.streampark.console.core.service.FlinkEnvService;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
import java.util.List;
@Slf4j
@@ -37,7 +38,7 @@ import java.util.List;
@RequestMapping("flink/env")
public class FlinkEnvController {
- @Autowired private FlinkEnvService flinkEnvService;
+ @Resource private FlinkEnvService flinkEnvService;
@PostMapping("list")
public RestResponse list() {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkSqlController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkSqlController.java
index 32515b465..55d795856 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkSqlController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkSqlController.java
@@ -28,12 +28,12 @@ import org.apache.streampark.flink.core.FlinkSqlValidationResult;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.constraints.NotNull;
import java.util.List;
@@ -47,11 +47,11 @@ import java.util.List;
@RequestMapping("flink/sql")
public class FlinkSqlController {
- @Autowired private FlinkSqlService flinkSqlService;
+ @Resource private FlinkSqlService flinkSqlService;
- @Autowired private VariableService variableService;
+ @Resource private VariableService variableService;
- @Autowired private SqlCompleteService sqlComplete;
+ @Resource private SqlCompleteService sqlComplete;
@PostMapping("verify")
public RestResponse verify(String sql, Long versionId, Long teamId) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/MetricsController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/MetricsController.java
index ad8f6a9e5..19bd64fdf 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/MetricsController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/MetricsController.java
@@ -25,19 +25,20 @@ import org.apache.streampark.console.core.service.MessageService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
@Slf4j
@Validated
@RestController
@RequestMapping("metrics")
public class MetricsController {
- @Autowired private MessageService messageService;
+ @Resource private MessageService messageService;
@PostMapping("notice")
public RestResponse notice(Integer type, RestRequest request) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ProjectController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ProjectController.java
index 8ad1ae081..8bdc905f7 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ProjectController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ProjectController.java
@@ -29,13 +29,14 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
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 java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -46,7 +47,7 @@ import java.util.Map;
@RequestMapping("flink/project")
public class ProjectController {
- @Autowired private ProjectService projectService;
+ @Resource private ProjectService projectService;
@PostMapping("create")
@RequiresPermissions("project:create")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SavePointController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SavePointController.java
index 7ba61296c..6725fe725 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SavePointController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SavePointController.java
@@ -33,13 +33,13 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Nullable;
+import javax.annotation.Resource;
@Slf4j
@Validated
@@ -47,9 +47,9 @@ import javax.annotation.Nullable;
@RequestMapping("flink/savepoint")
public class SavePointController {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private SavePointService savePointService;
+ @Resource private SavePointService savePointService;
@PostMapping("latest")
public RestResponse latest(Long appId) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SettingController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SettingController.java
index 06aa1aeac..6b70580a5 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SettingController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SettingController.java
@@ -26,12 +26,13 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
import java.util.List;
@Slf4j
@@ -40,7 +41,7 @@ import java.util.List;
@RequestMapping("flink/setting")
public class SettingController {
- @Autowired private SettingService settingService;
+ @Resource private SettingService settingService;
@PostMapping("all")
@RequiresPermissions("setting:view")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/TutorialController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/TutorialController.java
index b6c2200df..1eddc57ca 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/TutorialController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/TutorialController.java
@@ -22,12 +22,13 @@ import org.apache.streampark.console.core.entity.Tutorial;
import org.apache.streampark.console.core.service.TutorialService;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
import java.io.IOException;
@Slf4j
@@ -36,7 +37,7 @@ import java.io.IOException;
@RequestMapping("tutorial")
public class TutorialController {
- @Autowired private TutorialService tutorialService;
+ @Resource private TutorialService tutorialService;
@PostMapping("get")
public RestResponse get(String name) throws IOException {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/VariableController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/VariableController.java
index 3c068e0c5..d8dd9add9 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/VariableController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/VariableController.java
@@ -28,7 +28,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -37,6 +36,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 javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@@ -48,7 +48,7 @@ import java.util.List;
@RequestMapping("variable")
public class VariableController {
- @Autowired private VariableService variableService;
+ @Resource private VariableService variableService;
/**
* Get variable list by page.
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/runner/EnvInitializer.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/runner/EnvInitializer.java
index 04155ae23..4501bb65f 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/runner/EnvInitializer.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/runner/EnvInitializer.java
@@ -33,7 +33,6 @@ import org.apache.streampark.console.core.service.SettingService;
import org.apache.commons.lang3.StringUtils;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.ApplicationContext;
@@ -41,6 +40,8 @@ import org.springframework.core.annotation.Order;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
@@ -59,9 +60,9 @@ import static org.apache.streampark.common.enums.StorageType.LFS;
@Component
public class EnvInitializer implements ApplicationRunner {
- @Autowired private ApplicationContext context;
+ @Resource private ApplicationContext context;
- @Autowired private SettingService settingService;
+ @Resource private SettingService settingService;
private final Set<StorageType> initialized = new HashSet<>(2);
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertConfigServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertConfigServiceImpl.java
index 4074298e7..59e369ad4 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertConfigServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertConfigServiceImpl.java
@@ -34,11 +34,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.stream.Collectors;
@Service
@@ -47,7 +48,7 @@ import java.util.stream.Collectors;
public class AlertConfigServiceImpl extends ServiceImpl<AlertConfigMapper, AlertConfig>
implements AlertConfigService {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
@Override
public IPage<AlertConfigWithParams> page(AlertConfigWithParams params, RestRequest request) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertServiceImpl.java
index 19a40249e..1dd643b0e 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/AlertServiceImpl.java
@@ -34,16 +34,17 @@ import org.apache.streampark.console.core.service.alert.AlertService;
import org.apache.flink.api.java.tuple.Tuple2;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
+import javax.annotation.Resource;
+
import java.util.List;
@Slf4j
@Service
public class AlertServiceImpl implements AlertService {
- @Autowired private AlertConfigService alertConfigService;
+ @Resource private AlertConfigService alertConfigService;
@Override
public void alert(Application application, CheckPointStatus checkPointStatus) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/EmailAlertNotifyServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/EmailAlertNotifyServiceImpl.java
index 3c1d974ba..ffbcdb800 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/EmailAlertNotifyServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/EmailAlertNotifyServiceImpl.java
@@ -29,12 +29,12 @@ import org.apache.commons.mail.HtmlEmail;
import freemarker.template.Template;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@@ -47,7 +47,7 @@ public class EmailAlertNotifyServiceImpl implements AlertNotifyService {
private Template template;
- @Autowired private SettingService settingService;
+ @Resource private SettingService settingService;
@PostConstruct
public void loadTemplateFile() throws Exception {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/HttpCallbackAlertNotifyServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/HttpCallbackAlertNotifyServiceImpl.java
index db80701bb..c9e96826f 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/HttpCallbackAlertNotifyServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/HttpCallbackAlertNotifyServiceImpl.java
@@ -28,7 +28,6 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import freemarker.template.Template;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -41,15 +40,17 @@ import org.springframework.web.client.RequestCallback;
import org.springframework.web.client.ResponseExtractor;
import org.springframework.web.client.RestTemplate;
+import javax.annotation.Resource;
+
import java.util.Map;
@Slf4j
@Service
@Lazy
public class HttpCallbackAlertNotifyServiceImpl implements AlertNotifyService {
- @Autowired private RestTemplate alertRestTemplate;
+ @Resource private RestTemplate alertRestTemplate;
- @Autowired private ObjectMapper mapper;
+ @Resource private ObjectMapper mapper;
@Override
public boolean doAlert(AlertConfigWithParams alertConfig, AlertTemplate alertTemplate)
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java
index 7a978e1b0..2828b45a9 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java
@@ -76,12 +76,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Nonnull;
+import javax.annotation.Resource;
import java.io.File;
import java.util.Collections;
@@ -101,23 +101,23 @@ public class AppBuildPipeServiceImpl
extends ServiceImpl<ApplicationBuildPipelineMapper, AppBuildPipeline>
implements AppBuildPipeService {
- @Autowired private FlinkEnvService flinkEnvService;
+ @Resource private FlinkEnvService flinkEnvService;
- @Autowired private FlinkSqlService flinkSqlService;
+ @Resource private FlinkSqlService flinkSqlService;
- @Autowired private ApplicationBackUpService backUpService;
+ @Resource private ApplicationBackUpService backUpService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
- @Autowired private SettingService settingService;
+ @Resource private SettingService settingService;
- @Autowired private MessageService messageService;
+ @Resource private MessageService messageService;
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
+ @Resource private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
- @Autowired private ApplicationConfigService applicationConfigService;
+ @Resource private ApplicationConfigService applicationConfigService;
private final ExecutorService executorService =
new ThreadPoolExecutor(
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java
index d2a48594d..1d3151a87 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java
@@ -42,11 +42,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
@@ -59,13 +60,13 @@ public class ApplicationBackUpServiceImpl
extends ServiceImpl<ApplicationBackUpMapper, ApplicationBackUp>
implements ApplicationBackUpService {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private ApplicationConfigService configService;
+ @Resource private ApplicationConfigService configService;
- @Autowired private EffectiveService effectiveService;
+ @Resource private EffectiveService effectiveService;
- @Autowired private FlinkSqlService flinkSqlService;
+ @Resource private FlinkSqlService flinkSqlService;
private final ExecutorService executorService =
new ThreadPoolExecutor(
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationConfigServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationConfigServiceImpl.java
index bb020c11c..8b96c0b96 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationConfigServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationConfigServiceImpl.java
@@ -38,13 +38,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.Base64;
import java.util.Date;
import java.util.List;
@@ -59,9 +59,9 @@ public class ApplicationConfigServiceImpl
private String flinkConfTemplate = null;
- @Autowired private ResourceLoader resourceLoader;
+ @Resource private ResourceLoader resourceLoader;
- @Autowired private EffectiveService effectiveService;
+ @Resource private EffectiveService effectiveService;
@Override
@Transactional(rollbackFor = {Exception.class})
@@ -230,7 +230,8 @@ public class ApplicationConfigServiceImpl
public synchronized String readTemplate() {
if (flinkConfTemplate == null) {
try {
- Resource resource = resourceLoader.getResource("classpath:flink-application.conf");
+ org.springframework.core.io.Resource resource =
+ resourceLoader.getResource("classpath:flink-application.conf");
Scanner scanner = new Scanner(resource.getInputStream());
StringBuilder stringBuffer = new StringBuilder();
while (scanner.hasNextLine()) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
index df264c826..c056ff35d 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
@@ -111,13 +111,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.fabric8.kubernetes.client.KubernetesClientException;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
@@ -174,37 +174,37 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Appli
private static final Pattern SINGLE_SPACE_PATTERN = Pattern.compile("^\\S+(\\s\\S+)*$");
- @Autowired private ProjectService projectService;
+ @Resource private ProjectService projectService;
- @Autowired private ApplicationBackUpService backUpService;
+ @Resource private ApplicationBackUpService backUpService;
- @Autowired private ApplicationConfigService configService;
+ @Resource private ApplicationConfigService configService;
- @Autowired private ApplicationLogService applicationLogService;
+ @Resource private ApplicationLogService applicationLogService;
- @Autowired private FlinkEnvService flinkEnvService;
+ @Resource private FlinkEnvService flinkEnvService;
- @Autowired private FlinkSqlService flinkSqlService;
+ @Resource private FlinkSqlService flinkSqlService;
- @Autowired private SavePointService savePointService;
+ @Resource private SavePointService savePointService;
- @Autowired private EffectiveService effectiveService;
+ @Resource private EffectiveService effectiveService;
- @Autowired private SettingService settingService;
+ @Resource private SettingService settingService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
- @Autowired private EnvInitializer envInitializer;
+ @Resource private EnvInitializer envInitializer;
- @Autowired private FlinkK8sWatcher k8SFlinkTrackMonitor;
+ @Resource private FlinkK8sWatcher k8SFlinkTrackMonitor;
- @Autowired private AppBuildPipeService appBuildPipeService;
+ @Resource private AppBuildPipeService appBuildPipeService;
- @Autowired private FlinkClusterService flinkClusterService;
+ @Resource private FlinkClusterService flinkClusterService;
- @Autowired private VariableService variableService;
+ @Resource private VariableService variableService;
- @Autowired private LogClientService logClient;
+ @Resource private LogClientService logClient;
@PostConstruct
public void resetOptionState() {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/CommonServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/CommonServiceImpl.java
index 2a6f9abe6..1c96df20f 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/CommonServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/CommonServiceImpl.java
@@ -27,9 +27,10 @@ import org.apache.streampark.console.system.service.UserService;
import org.apache.shiro.SecurityUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+
import java.io.File;
import java.util.Arrays;
import java.util.List;
@@ -41,7 +42,7 @@ public class CommonServiceImpl implements CommonService {
private String sqlClientJar = null;
- @Autowired private UserService userService;
+ @Resource private UserService userService;
@Override
public User getCurrentUser() {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java
index 41015e544..006b8c2a3 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java
@@ -28,12 +28,13 @@ import org.apache.streampark.console.core.service.ExternalLinkService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.PropertyPlaceholderHelper;
+import javax.annotation.Resource;
+
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -44,11 +45,11 @@ import java.util.List;
public class ExternalLinkServiceImpl extends ServiceImpl<ExternalLinkMapper, ExternalLink>
implements ExternalLinkService {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
@Override
public void create(ExternalLink externalLink) {
- if (!this.check(externalLink)) {
+ if (this.check(externalLink)) {
return;
}
externalLink.setCreateTime(new Date());
@@ -59,7 +60,7 @@ public class ExternalLinkServiceImpl extends ServiceImpl<ExternalLinkMapper, Ext
@Override
public void update(ExternalLink externalLink) {
- if (!this.check(externalLink)) {
+ if (this.check(externalLink)) {
return;
}
externalLink.setModifyTime(new Date());
@@ -106,7 +107,7 @@ public class ExternalLinkServiceImpl extends ServiceImpl<ExternalLinkMapper, Ext
}
ExternalLink result = this.getOne(queryWrapper);
if (result == null) {
- return true;
+ return false;
}
Utils.required(
!result.getBadgeName().equals(params.getBadgeName()),
@@ -114,6 +115,6 @@ public class ExternalLinkServiceImpl extends ServiceImpl<ExternalLinkMapper, Ext
Utils.required(
!result.getLinkUrl().equals(params.getLinkUrl()),
String.format("The linkUrl: %s is already existing.", result.getLinkUrl()));
- return false;
+ return true;
}
}
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkClusterServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkClusterServiceImpl.java
index eb2789d6f..8b53fe4e0 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkClusterServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkClusterServiceImpl.java
@@ -44,11 +44,12 @@ import org.apache.commons.lang3.exception.ExceptionUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
@@ -74,11 +75,11 @@ public class FlinkClusterServiceImpl extends ServiceImpl<FlinkClusterMapper, Fli
ThreadUtils.threadFactory("streampark-cluster-executor"),
new ThreadPoolExecutor.AbortPolicy());
- @Autowired private FlinkEnvService flinkEnvService;
+ @Resource private FlinkEnvService flinkEnvService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
@Override
public ResponseResult check(FlinkCluster cluster) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkSqlServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkSqlServiceImpl.java
index 7e662a75b..defc6e849 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkSqlServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkSqlServiceImpl.java
@@ -37,11 +37,12 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.lang.reflect.Method;
import java.util.List;
@@ -51,11 +52,11 @@ import java.util.List;
public class FlinkSqlServiceImpl extends ServiceImpl<FlinkSqlMapper, FlinkSql>
implements FlinkSqlService {
- @Autowired private EffectiveService effectiveService;
+ @Resource private EffectiveService effectiveService;
- @Autowired private ApplicationBackUpService backUpService;
+ @Resource private ApplicationBackUpService backUpService;
- @Autowired private FlinkEnvService flinkEnvService;
+ @Resource private FlinkEnvService flinkEnvService;
private static final String FLINKSQL_VALIDATOR_CLASS =
"org.apache.streampark.flink.core.FlinkSqlValidator";
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
index 4f335b5a7..0af9939a0 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
@@ -49,11 +49,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -79,9 +80,9 @@ import java.util.concurrent.TimeUnit;
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project>
implements ProjectService {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
+ @Resource private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
private final ExecutorService executorService =
new ThreadPoolExecutor(
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java
index f36eeb2a1..47b82087b 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java
@@ -59,12 +59,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Nullable;
+import javax.annotation.Resource;
import java.net.URI;
import java.util.Date;
@@ -83,17 +83,17 @@ import java.util.concurrent.TimeoutException;
public class SavePointServiceImpl extends ServiceImpl<SavePointMapper, SavePoint>
implements SavePointService {
- @Autowired private FlinkEnvService flinkEnvService;
+ @Resource private FlinkEnvService flinkEnvService;
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private ApplicationConfigService configService;
+ @Resource private ApplicationConfigService configService;
- @Autowired private FlinkClusterService flinkClusterService;
+ @Resource private FlinkClusterService flinkClusterService;
- @Autowired private ApplicationLogService applicationLogService;
+ @Resource private ApplicationLogService applicationLogService;
- @Autowired private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
+ @Resource private FlinkRESTAPIWatcher flinkRESTAPIWatcher;
private final ExecutorService executorService =
new ThreadPoolExecutor(
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/VariableServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/VariableServiceImpl.java
index fb58b798d..f07565950 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/VariableServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/VariableServiceImpl.java
@@ -38,11 +38,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -63,11 +64,11 @@ public class VariableServiceImpl extends ServiceImpl<VariableMapper, Variable>
private static final String PLACEHOLDER_END = "}";
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private FlinkSqlService flinkSqlService;
+ @Resource private FlinkSqlService flinkSqlService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
@Override
@Transactional(rollbackFor = Exception.class)
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/CheckpointProcessor.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/CheckpointProcessor.java
index fd6fd5fed..f61c29117 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/CheckpointProcessor.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/CheckpointProcessor.java
@@ -30,10 +30,10 @@ import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import lombok.Data;
import org.jetbrains.annotations.Nullable;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Nonnull;
+import javax.annotation.Resource;
import java.util.Date;
import java.util.Map;
@@ -63,11 +63,11 @@ public class CheckpointProcessor {
private final Map<Long, Counter> checkPointFailedCache = new ConcurrentHashMap<>(0);
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private AlertService alertService;
+ @Resource private AlertService alertService;
- @Autowired private SavePointService savePointService;
+ @Resource private SavePointService savePointService;
public void process(Application application, @Nonnull CheckPoints checkPoints) {
checkPoints.getLatestCheckpoint().forEach(checkPoint -> process(application, checkPoint));
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sChangeEventListener.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sChangeEventListener.java
index cedb776f4..1e8d8f48b 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sChangeEventListener.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sChangeEventListener.java
@@ -37,10 +37,11 @@ import org.apache.streampark.flink.kubernetes.model.TrackId;
import org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher;
import com.google.common.eventbus.Subscribe;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
@@ -56,11 +57,11 @@ import static org.apache.streampark.console.core.enums.FlinkAppState.Bridge.toK8
@Component
public class FlinkK8sChangeEventListener {
- @Lazy @Autowired private ApplicationService applicationService;
+ @Lazy @Resource private ApplicationService applicationService;
- @Lazy @Autowired private AlertService alertService;
+ @Lazy @Resource private AlertService alertService;
- @Lazy @Autowired private CheckpointProcessor checkpointProcessor;
+ @Lazy @Resource private CheckpointProcessor checkpointProcessor;
private final ExecutorService executor =
new ThreadPoolExecutor(
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sWatcherWrapper.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sWatcherWrapper.java
index af3b816d5..79ba88ff9 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sWatcherWrapper.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkK8sWatcherWrapper.java
@@ -31,12 +31,12 @@ import org.apache.commons.collections.CollectionUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.google.common.collect.Lists;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import javax.annotation.Nonnull;
+import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
@@ -58,9 +58,9 @@ import static org.apache.streampark.console.core.enums.FlinkAppState.Bridge.toK8
@Configuration
public class FlinkK8sWatcherWrapper {
- @Lazy @Autowired private FlinkK8sChangeEventListener flinkK8sChangeEventListener;
+ @Lazy @Resource private FlinkK8sChangeEventListener flinkK8sChangeEventListener;
- @Lazy @Autowired private ApplicationService applicationService;
+ @Lazy @Resource private ApplicationService applicationService;
/** Register FlinkTrackMonitor bean for tracking flink job on kubernetes. */
@Bean(destroyMethod = "close")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java
index c3d16acb5..da81c5644 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java
@@ -45,12 +45,12 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
import java.io.IOException;
import java.util.Collection;
@@ -70,15 +70,15 @@ import java.util.stream.Collectors;
@Component
public class FlinkRESTAPIWatcher {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private AlertService alertService;
+ @Resource private AlertService alertService;
- @Autowired private CheckpointProcessor checkpointProcessor;
+ @Resource private CheckpointProcessor checkpointProcessor;
- @Autowired private FlinkClusterService flinkClusterService;
+ @Resource private FlinkClusterService flinkClusterService;
- @Autowired private SavePointService savePointService;
+ @Resource private SavePointService savePointService;
// track interval every 5 seconds
private static final long WATCHING_INTERVAL = 1000L * 5;
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/authentication/ShiroRealm.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/authentication/ShiroRealm.java
index f00d3ca2f..68025d0d5 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/authentication/ShiroRealm.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/authentication/ShiroRealm.java
@@ -34,16 +34,16 @@ import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
-import org.springframework.beans.factory.annotation.Autowired;
+import javax.annotation.Resource;
import java.util.Set;
/** Implementation of ShiroRealm, including two modules: authentication and authorization */
public class ShiroRealm extends AuthorizingRealm {
- @Autowired private UserService userService;
+ @Resource private UserService userService;
- @Autowired private AccessTokenService accessTokenService;
+ @Resource private AccessTokenService accessTokenService;
@Override
public boolean supports(AuthenticationToken token) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/AccessTokenController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/AccessTokenController.java
index d2cef3a16..2cb1567e4 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/AccessTokenController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/AccessTokenController.java
@@ -29,12 +29,12 @@ import org.apache.streampark.console.system.service.AccessTokenService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@@ -42,9 +42,9 @@ import javax.validation.constraints.NotNull;
@RequestMapping("token")
public class AccessTokenController {
- @Autowired private AccessTokenService accessTokenService;
+ @Resource private AccessTokenService accessTokenService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
/** generate token string */
@PostMapping(value = "create")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MemberController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MemberController.java
index 971d51c00..ccafdc913 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MemberController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MemberController.java
@@ -28,7 +28,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -36,6 +35,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@@ -47,7 +47,7 @@ import java.util.List;
@RequestMapping("member")
public class MemberController {
- @Autowired private MemberService memberService;
+ @Resource private MemberService memberService;
@PostMapping("list")
public RestResponse memberList(RestRequest restRequest, Member member) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MenuController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MenuController.java
index 1d846a6cf..0161480b0 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MenuController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MenuController.java
@@ -27,7 +27,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -35,6 +34,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@@ -47,9 +47,9 @@ import java.util.Map;
@RequestMapping("/menu")
public class MenuController {
- @Autowired private MenuService menuService;
+ @Resource private MenuService menuService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
@PostMapping("router")
public RestResponse getUserRouters(Long teamId) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/PassportController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/PassportController.java
index f8de901ed..9bc0a5e28 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/PassportController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/PassportController.java
@@ -33,12 +33,12 @@ import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
@@ -49,11 +49,11 @@ import java.util.Map;
@RequestMapping("passport")
public class PassportController {
- @Autowired private UserService userService;
+ @Resource private UserService userService;
- @Autowired private ShiroProperties properties;
+ @Resource private ShiroProperties properties;
- @Autowired private Authenticator authenticator;
+ @Resource private Authenticator authenticator;
@PostMapping("signin")
public RestResponse signin(
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/RoleController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/RoleController.java
index 3760fd7ab..8aa3a2618 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/RoleController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/RoleController.java
@@ -28,7 +28,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -36,6 +35,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@@ -48,8 +48,8 @@ import java.util.stream.Collectors;
@RequestMapping("role")
public class RoleController {
- @Autowired private RoleService roleService;
- @Autowired private RoleMenuServie roleMenuServie;
+ @Resource private RoleService roleService;
+ @Resource private RoleMenuServie roleMenuServie;
@PostMapping("list")
@RequiresPermissions("role:view")
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/TeamController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/TeamController.java
index fed8b041e..85f7b9b0b 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/TeamController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/TeamController.java
@@ -26,7 +26,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -34,6 +33,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@@ -43,7 +43,7 @@ import javax.validation.constraints.NotBlank;
@RequestMapping("team")
public class TeamController {
- @Autowired private TeamService teamService;
+ @Resource private TeamService teamService;
@PostMapping("list")
public RestResponse teamList(RestRequest restRequest, Team team) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/UserController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/UserController.java
index 570895780..59ee95879 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/UserController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/UserController.java
@@ -36,7 +36,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
@@ -45,6 +44,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@@ -57,11 +57,11 @@ import java.util.Map;
@RequestMapping("user")
public class UserController {
- @Autowired private UserService userService;
+ @Resource private UserService userService;
- @Autowired private TeamService teamService;
+ @Resource private TeamService teamService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
@PostMapping("detail")
public User detail(@NotBlank(message = "{required}") @PathVariable String username) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/runner/StartedUpRunner.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/runner/StartedUpRunner.java
index 4a19b709f..bb71b62ab 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/runner/StartedUpRunner.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/runner/StartedUpRunner.java
@@ -20,19 +20,20 @@ package org.apache.streampark.console.system.runner;
import org.apache.streampark.common.conf.ConfigConst;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+
@Order
@Slf4j
@Component
public class StartedUpRunner implements ApplicationRunner {
- @Autowired private ConfigurableApplicationContext context;
+ @Resource private ConfigurableApplicationContext context;
@Override
public void run(ApplicationArguments args) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
index e44ee7009..9647875ad 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
@@ -26,15 +26,16 @@ import org.apache.streampark.console.system.service.UserService;
import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+
import java.util.Date;
@Component
public class AuthenticatorImpl implements Authenticator {
- @Autowired private UserService usersService;
- @Autowired private LdapService ldapService;
+ @Resource private UserService usersService;
+ @Resource private LdapService ldapService;
@Override
public User authenticate(String username, String password) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/AccessTokenServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/AccessTokenServiceImpl.java
index 6c646789e..0c9f69087 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/AccessTokenServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/AccessTokenServiceImpl.java
@@ -37,11 +37,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -54,7 +55,7 @@ import java.util.UUID;
public class AccessTokenServiceImpl extends ServiceImpl<AccessTokenMapper, AccessToken>
implements AccessTokenService {
- @Autowired private UserService userService;
+ @Resource private UserService userService;
@Override
public RestResponse generateToken(Long userId, String expireTime, String description) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MemberServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MemberServiceImpl.java
index 56a3b3e18..4edb9fb79 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MemberServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MemberServiceImpl.java
@@ -33,11 +33,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -48,11 +49,11 @@ import java.util.stream.Collectors;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {
- @Autowired private UserService userService;
+ @Resource private UserService userService;
- @Autowired private RoleService roleService;
+ @Resource private RoleService roleService;
- @Autowired private TeamService teamService;
+ @Resource private TeamService teamService;
@Override
@Transactional
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MenuServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MenuServiceImpl.java
index fef5064d2..5fedcee8c 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MenuServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/MenuServiceImpl.java
@@ -34,11 +34,12 @@ import org.apache.commons.lang3.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
@@ -53,9 +54,9 @@ import java.util.stream.Collectors;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {
- @Autowired private UserService userService;
+ @Resource private UserService userService;
- @Autowired private RoleMenuServie roleMenuServie;
+ @Resource private RoleMenuServie roleMenuServie;
@Override
public List<String> findUserPermissions(Long userId, Long teamId) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/RoleServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/RoleServiceImpl.java
index 040e5f934..bc0ef662e 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/RoleServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/RoleServiceImpl.java
@@ -36,11 +36,12 @@ import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -51,11 +52,11 @@ import java.util.Optional;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
- @Autowired private RoleMenuMapper roleMenuMapper;
+ @Resource private RoleMenuMapper roleMenuMapper;
- @Autowired private MemberService memberService;
+ @Resource private MemberService memberService;
- @Autowired private RoleMenuServie roleMenuService;
+ @Resource private RoleMenuServie roleMenuService;
@Override
public IPage<Role> findRoles(Role role, RestRequest request) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/TeamServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/TeamServiceImpl.java
index e4899831c..3a423d63f 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/TeamServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/TeamServiceImpl.java
@@ -36,11 +36,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
import java.util.Date;
import java.util.List;
import java.util.Optional;
@@ -50,17 +51,17 @@ import java.util.Optional;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements TeamService {
- @Autowired private UserService userService;
+ @Resource private UserService userService;
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
- @Autowired private ProjectService projectService;
+ @Resource private ProjectService projectService;
- @Autowired private MemberService memberService;
+ @Resource private MemberService memberService;
- @Autowired private VariableService variableService;
+ @Resource private VariableService variableService;
- @Autowired private CommonService commonService;
+ @Resource private CommonService commonService;
@Override
public IPage<Team> findTeams(Team team, RestRequest request) {
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/UserServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/UserServiceImpl.java
index ef95e0cb1..38800ca6c 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/UserServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/UserServiceImpl.java
@@ -37,12 +37,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Nullable;
+import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
@@ -57,9 +57,9 @@ import java.util.Set;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
- @Autowired private MemberService memberService;
+ @Resource private MemberService memberService;
- @Autowired private MenuService menuService;
+ @Resource private MenuService menuService;
@Override
public User findByName(String username) {
diff --git a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/ApplicationServiceTest.java b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/ApplicationServiceTest.java
index 45c3f4ff4..247896c73 100644
--- a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/ApplicationServiceTest.java
+++ b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/ApplicationServiceTest.java
@@ -27,10 +27,11 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.multipart.MultipartFile;
+import javax.annotation.Resource;
+
import java.io.File;
import java.io.FileInputStream;
import java.nio.file.Path;
@@ -39,7 +40,7 @@ import java.util.Date;
/** org.apache.streampark.console.core.service.ApplicationServiceTest. */
class ApplicationServiceTest extends SpringTestBase {
- @Autowired private ApplicationService applicationService;
+ @Resource private ApplicationService applicationService;
@Test
void revokeTest() {
diff --git a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/VariableServiceTest.java b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/VariableServiceTest.java
index d1c0436d4..9ca3ae10d 100644
--- a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/VariableServiceTest.java
+++ b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/VariableServiceTest.java
@@ -22,12 +22,13 @@ import org.apache.streampark.console.core.entity.Variable;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
+
+import javax.annotation.Resource;
/** org.apache.streampark.console.core.service.VariableServiceTest */
class VariableServiceTest extends SpringTestBase {
- @Autowired private VariableService variableService;
+ @Resource private VariableService variableService;
/** Test whether the variable will be replaced normally */
@Test