You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ki...@apache.org on 2022/07/05 11:50:58 UTC
[incubator-seatunnel] branch dev updated: [seatunnel-1947][seatunnel-server] init & add interface for script/user (#2112)
This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new e1e44266b [seatunnel-1947][seatunnel-server] init & add interface for script/user (#2112)
e1e44266b is described below
commit e1e44266b4f4faff46b8eaa856277f421b177ab5
Author: dijie <nj...@gmail.com>
AuthorDate: Tue Jul 5 19:50:53 2022 +0800
[seatunnel-1947][seatunnel-server] init & add interface for script/user (#2112)
* [seatunnel-1947][seatunnel-server] init & add interface for script/script_param/user
* [seatunnel-1947][seatunnel-server] update mysql connection
* [seatunnel-1947][seatunnel-server] adjust for reviews.
Co-authored-by: dijie <nj...@gmail.com>
---
pom.xml | 56 ++++++
seatunnel-dist/release-docs/LICENSE | 179 ++++++++++++++++++-
.../release-docs/licenses/LICENSE-HikariCP.txt | 191 ++++++++++++++++++++
.../release-docs/licenses/LICENSE-mybatis.txt | 13 ++
.../release-docs/licenses/LICENSE-spring.txt | 125 +++++++++++++
seatunnel-server/pom.xml | 32 ++++
seatunnel-server/seatunnel-app/pom.xml | 170 ++++++++++++++++++
.../apache/seatunnel/app/SeatunnelApplication.java | 38 ++++
.../seatunnel/app/common/DatasourceStatusEnum.java | 41 +++++
.../org/apache/seatunnel/app/common/Result.java | 97 +++++++++++
.../app/common/ScriptParamStatusEnum.java | 40 +++++
.../seatunnel/app/common/ScriptStatusEnum.java | 41 +++++
.../seatunnel/app/common/ScriptTypeEnum.java | 40 +++++
.../seatunnel/app/common/SeatunnelErrorEnum.java | 51 ++++++
.../seatunnel/app/common/SeatunnelException.java | 48 +++++
.../seatunnel/app/common/UserStatusEnum.java | 39 +++++
.../apache/seatunnel/app/common/UserTypeEnum.java | 39 +++++
.../org/apache/seatunnel/app/config/Swagger2.java | 87 +++++++++
.../seatunnel/app/controller/ScriptController.java | 106 +++++++++++
.../seatunnel/app/controller/UserController.java | 99 +++++++++++
.../apache/seatunnel/app/dal/dao/IScriptDao.java | 40 +++++
.../seatunnel/app/dal/dao/IScriptParamDao.java | 31 ++++
.../org/apache/seatunnel/app/dal/dao/IUserDao.java | 40 +++++
.../seatunnel/app/dal/dao/impl/ScriptDaoImpl.java | 86 +++++++++
.../app/dal/dao/impl/ScriptParamDaoImpl.java | 64 +++++++
.../seatunnel/app/dal/dao/impl/UserDaoImpl.java | 95 ++++++++++
.../apache/seatunnel/app/dal/entity/Script.java | 45 +++++
.../seatunnel/app/dal/entity/ScriptParam.java | 39 +++++
.../org/apache/seatunnel/app/dal/entity/User.java | 39 +++++
.../seatunnel/app/dal/mapper/ScriptMapper.java | 38 ++++
.../app/dal/mapper/ScriptParamMapper.java | 34 ++++
.../seatunnel/app/dal/mapper/UserMapper.java | 40 +++++
.../app/domain/dto/script/AddEmptyScriptDto.java | 31 ++++
.../domain/dto/script/CheckScriptDuplicateDto.java | 28 +++
.../app/domain/dto/script/ListScriptsDto.java | 28 +++
.../domain/dto/script/UpdateScriptContentDto.java | 30 ++++
.../domain/dto/script/UpdateScriptParamDto.java | 30 ++++
.../seatunnel/app/domain/dto/user/ListUserDto.java | 27 +++
.../app/domain/dto/user/UpdateUserDto.java | 31 ++++
.../domain/request/script/AddEmptyScriptReq.java | 37 ++++
.../app/domain/request/script/ScriptListReq.java | 35 ++++
.../request/script/UpdateScriptContentReq.java | 39 +++++
.../request/script/UpdateScriptParamReq.java | 34 ++++
.../app/domain/request/user/AddUserReq.java | 24 +++
.../app/domain/request/user/BaseUserReq.java | 37 ++++
.../app/domain/request/user/UpdateUserReq.java | 32 ++++
.../app/domain/request/user/UserListReq.java | 33 ++++
.../domain/response/script/AddEmptyScriptRes.java | 25 +++
.../domain/response/script/BaseScriptInfoRes.java | 43 +++++
.../app/domain/response/script/ScriptParamRes.java | 33 ++++
.../response/script/ScriptSimpleInfoRes.java | 26 +++
.../app/domain/response/user/AddUserRes.java | 25 +++
.../app/domain/response/user/BaseUserInfoRes.java | 39 +++++
.../domain/response/user/UserSimpleInfoRes.java | 24 +++
.../seatunnel/app/service/IScriptService.java | 44 +++++
.../apache/seatunnel/app/service/IUserService.java | 41 +++++
.../app/service/impl/ScriptServiceImpl.java | 194 +++++++++++++++++++++
.../app/service/impl/UserServiceImpl.java | 119 +++++++++++++
.../seatunnel/app/util/GlobalExceptionHandler.java | 62 +++++++
.../org/apache/seatunnel/app/util/Md5Utils.java | 31 ++++
.../apache/seatunnel/app/util/PasswordUtils.java | 30 ++++
.../src/main/resources/application.yml | 25 +++
.../src/main/resources/logback-spring.xml | 56 ++++++
.../seatunnel/app/dal/mapper/ScriptMapper.xml | 89 ++++++++++
.../seatunnel/app/dal/mapper/ScriptParamMapper.xml | 62 +++++++
.../apache/seatunnel/app/dal/mapper/UserMapper.xml | 83 +++++++++
tools/dependencies/known-dependencies.txt | 61 +++++++
67 files changed, 3708 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index a5d6b442e..2378419b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,6 +92,7 @@
<module>seatunnel-plugin-discovery</module>
<module>seatunnel-formats</module>
<module>seatunnel-dist</module>
+ <module>seatunnel-server</module>
</modules>
<properties>
@@ -198,6 +199,12 @@
<seatunnel.shade.package>org.apache.seatunnel.shade</seatunnel.shade.package>
<jmockdata.version>4.3.0</jmockdata.version>
<snappy-java.version>1.1.8.3</snappy-java.version>
+ <spring-boot.version>2.6.8</spring-boot.version>
+ <mybatis-spring-boot-starter.version>2.2.2</mybatis-spring-boot-starter.version>
+ <druid-spring-boot-starter.version>1.2.9</druid-spring-boot-starter.version>
+ <springfox-swagger.version>2.6.1</springfox-swagger.version>
+ <swagger-annotations.version>1.5.10</swagger-annotations.version>
+ <hibernate.validator.version>6.2.2.Final</hibernate.validator.version>
</properties>
<dependencyManagement>
@@ -846,6 +853,55 @@
<version>${javax.servlet.jap.version}</version>
</dependency>
+ <!--springboot-->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <version>${spring-boot.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-jetty</artifactId>
+ <version>${spring-boot.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mybatis.spring.boot</groupId>
+ <artifactId>mybatis-spring-boot-starter</artifactId>
+ <version>${mybatis-spring-boot-starter.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>druid-spring-boot-starter</artifactId>
+ <version>${druid-spring-boot-starter.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.springfox</groupId>
+ <artifactId>springfox-swagger2</artifactId>
+ <version>${springfox-swagger.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.springfox</groupId>
+ <artifactId>springfox-swagger-ui</artifactId>
+ <version>${springfox-swagger.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>${swagger-annotations.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate.validator</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>${hibernate.validator.version}</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
diff --git a/seatunnel-dist/release-docs/LICENSE b/seatunnel-dist/release-docs/LICENSE
index c8c137573..3a24746fb 100644
--- a/seatunnel-dist/release-docs/LICENSE
+++ b/seatunnel-dist/release-docs/LICENSE
@@ -275,6 +275,8 @@ The text of each license is the standard Apache 2.0 license.
(Apache 2) org.roaringbitmap:shims (org.roaringbitmap:shims:0.9.22 - https://github.com/RoaringBitmap/RoaringBitmap)
(Apache 2) scalaj-http (org.scalaj:scalaj-http_2.11:2.3.0 - http://github.com/scalaj/scalaj-http)
(Apache 2) univocity-parsers (com.univocity:univocity-parsers:2.7.3 - http://github.com/univocity/univocity-parsers)
+ (Apache 2) druid (com.alibaba:druid:1.2.9 - https://github.com/alibaba/druid)
+ (Apache 2) druid-spring-boot-starter (com.alibaba:druid-spring-boot-starter:1.2.9 - https://github.com/alibaba/druid)
(Apache 2.0 License) Apache Mina SSHD :: Common support utilities (org.apache.sshd:sshd-common:2.7.0 - https://www.apache.org/sshd/sshd-common/)
(Apache 2.0 License) Apache Mina SSHD :: Core (org.apache.sshd:sshd-core:2.7.0 - https://www.apache.org/sshd/sshd-core/)
(Apache 2.0 License) Apache Mina SSHD :: SCP (org.apache.sshd:sshd-scp:2.7.0 - https://www.apache.org/sshd/sshd-scp/)
@@ -323,7 +325,12 @@ The text of each license is the standard Apache 2.0 license.
(Apache License 2.0) jDBI (org.jdbi:jdbi:2.63.1 - http://jdbi.org/)
(Apache License 2.0) snappy (org.iq80.snappy:snappy:0.2 - http://github.com/dain/snappy)
(Apache License 2.0) snappy (org.iq80.snappy:snappy:0.3 - http://github.com/dain/snappy)
- (Apache License Version 2) Jetty SSLEngine (org.mortbay.jetty:jetty-sslengine:6.1.26 - http://jetty.mortbay.org)
+ (Apache License 2.0) Hibernate Validator Engine (org.hibernate.validator:hibernate-validator:6.2.2.Final - http://hibernate.org/validator/hibernate-validator)
+ (Apache License 2.0) Jakarta Bean Validation API (jakarta.validation:jakarta.validation-api:2.0.2 - https://beanvalidation.org)
+ (Apache License 2.0) swagger-annotations (io.swagger:swagger-annotations:1.5.10 - https://github.com/swagger-api/swagger-core/modules/swagger-annotations)
+ (Apache License 2.0) swagger-models (io.swagger:swagger-models:1.5.10 - https://github.com/swagger-api/swagger-core/modules/swagger-models)
+ (Apache License 2.0) swagger-models (io.swagger:swagger-models:1.5.10 - https://github.com/swagger-api/swagger-core/modules/swagger-models)
+ (Apache License Version 2) HikariCP (com.zaxxer:HikariCP:4.0.3 - https://github.com/brettwooldridge/HikariCP)
(Apache License) HttpClient (commons-httpclient:commons-httpclient:3.1 - http://jakarta.apache.org/httpcomponents/httpclient-3.x/)
(Apache License) HttpClient (org.apache.httpcomponents:httpclient:4.0.1 - http://hc.apache.org/httpcomponents-client)
(Apache License) HttpClient (org.apache.httpcomponents:httpclient:4.2.5 - http://hc.apache.org/httpcomponents-client)
@@ -578,6 +585,29 @@ The text of each license is the standard Apache 2.0 license.
(Apache License, Version 2.0) jmockdata (com.github.jsonzou:jmockdata:4.3.0 - https://github.com/jsonzou/jmockdata)
(Apache License, Version 2.0) stream-lib (com.clearspring.analytics:stream:2.7.0 - https://github.com/addthis/stream-lib)
(Apache License, version 2.0) JBoss Logging 3 (org.jboss.logging:jboss-logging:3.2.1.Final - http://www.jboss.org)
+ (Apache License, Version 2.0) Guava: Google Core Libraries for Java (com.google.guava:guava:31.0.1-jre - https://github.com/google/guava)
+ (Apache License, Version 2.0) SnakeYAML (org.yaml:snakeyaml:1.29 - http://www.snakeyaml.org)
+ (Apache License, Version 2.0) Spring AOP (org.springframework:spring-aop:5.3.20 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring Beans (org.springframework:spring-beans:5.3.20 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring Commons Logging Bridge (org.springframework:spring-jcl:5.3.20 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring Context (org.springframework:spring-context:5.3.20 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring Core (org.springframework:spring-core:5.3.20 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring JDBC (org.springframework:spring-jdbc:5.3.15 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring Plugin - Core (org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE - https://github.com/spring-projects/spring-plugin/spring-plugin-core)
+ (Apache License, Version 2.0) Spring Plugin - Metadata Extension (org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE - https://github.com/spring-projects/spring-plugin/spring-plugin-metadata)
+ (Apache License, Version 2.0) Spring Transaction (org.springframework:spring-tx:5.3.15 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring Web (org.springframework:spring-web:5.3.20 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) Spring Web MVC (org.springframework:spring-webmvc:5.3.20 - https://github.com/spring-projects/spring-framework)
+ (Apache License, Version 2.0) spring-boot (org.springframework.boot:spring-boot:2.6.8 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) spring-boot-autoconfigure (org.springframework.boot:spring-boot-autoconfigure:2.6.8 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) spring-boot-starter (org.springframework.boot:spring-boot-starter:2.6.8 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) spring-boot-starter-jdbc (org.springframework.boot:spring-boot-starter-jdbc:2.6.3 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) spring-boot-starter-jetty (org.springframework.boot:spring-boot-starter-jetty:2.6.8 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) spring-boot-starter-json (org.springframework.boot:spring-boot-starter-json:2.6.8 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) spring-boot-starter-logging (org.springframework.boot:spring-boot-starter-logging:2.6.8 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) spring-boot-starter-web (org.springframework.boot:spring-boot-starter-web:2.6.8 - https://spring.io/projects/spring-boot)
+ (Apache License, Version 2.0) tomcat-embed-el (org.apache.tomcat.embed:tomcat-embed-el:9.0.63 - https://tomcat.apache.org/)
+ (Apache License, version 2.0) JBoss Logging 3 (org.jboss.logging:jboss-logging:3.4.1.Final - http://www.jboss.org)
(Apache v2) BoneCP :: Core Library (com.jolbox:bonecp:0.8.0.RELEASE - http://jolbox.com/bonecp)
(Apache-2.0) json4s-ast (org.json4s:json4s-ast_2.11:3.5.3 - https://github.com/json4s/json4s)
(Apache-2.0) json4s-core (org.json4s:json4s-core_2.11:3.5.3 - https://github.com/json4s/json4s)
@@ -605,6 +635,7 @@ The text of each license is the standard Apache 2.0 license.
(The Apache License, Version 2.0) org.jetbrains.kotlin:kotlin-stdlib-jdk7 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10 - https://kotlinlang.org/)
(The Apache License, Version 2.0) org.jetbrains.kotlin:kotlin-stdlib-jdk8 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 - https://kotlinlang.org/)
(The Apache License, Version 2.0) software.amazon.ion:ion-java (software.amazon.ion:ion-java:1.0.2 - https://github.com/amznlabs/ion-java/)
+ (The Apache License, Version 2.0) com.github.jsonzou:jmockdata (com.github.jsonzou:jmockdata:4.3.0 - https://github.com/jsonzou/jmockdata)
(The Apache Software License, Version 2.0) ASM based accessors helper used by json-smart (net.minidev:accessors-smart:1.2 - http://www.minidev.net/)
(The Apache Software License, Version 2.0) Aggregate Designer Algorithm (net.hydromatic:aggdesigner-algorithm:6.0 - http://github.com/julianhyde/aggdesigner/aggdesigner-algorithm)
(The Apache Software License, Version 2.0) Apache Avro (org.apache.avro:avro:1.7.7 - http://avro.apache.org)
@@ -924,7 +955,64 @@ The text of each license is the standard Apache 2.0 license.
(The Apache Software License, Version 2.0) jasper-runtime (tomcat:jasper-runtime:5.5.23 - http://tomcat.apache.org/jasper-runtime)
(The Apache Software License, Version 2.0) JAX-RS provider for JSON content type (org.codehaus.jackson:jackson-jaxrs:1.9.13 - http://jackson.codehaus.org)
(The Apache Software License, Version 2.0) Xml Compatibility extensions for Jackson (org.codehaus.jackson:jackson-xc:1.9.13 - http://jackson.codehaus.org)
-
+
+ (The Apache Software License, Version 2.0) ClassMate (com.fasterxml:classmate:1.3.1 - http://github.com/cowtowncoder/java-classmate)
+ (The Apache Software License, Version 2.0) Guava: Google Core Libraries for Java (com.google.guava:guava:11.0.2 - http://code.google.com/p/guava-libraries/guava)
+ (The Apache Software License, Version 2.0) Guava: Google Core Libraries for Java (com.google.guava:guava:13.0.1 - http://code.google.com/p/guava-libraries/guava)
+ (The Apache Software License, Version 2.0) Guava: Google Core Libraries for Java (com.google.guava:guava:16.0.1 - http://code.google.com/p/guava-libraries/guava)
+ (The Apache Software License, Version 2.0) Guava: Google Core Libraries for Java (com.google.guava:guava:18.0 - http://code.google.com/p/guava-libraries/guava)
+ (The Apache Software License, Version 2.0) HikariCP (com.zaxxer:HikariCP:4.0.3 - https://github.com/brettwooldridge/HikariCP)
+ (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
+ (The Apache Software License, Version 2.0) Jackson datatype: jdk8 (com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.3 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jdk8)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.10.5 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.11.0 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.11.4 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.4.5 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.6.7 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.7.0 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.7.8 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.9.2 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.10.5 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.11.0 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.11.4 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.13.3 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.6.7 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.7.3 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.7.9 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.8.10 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.8.11 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.9.2 - https://github.com/FasterXML/jackson-core)
+ (The Apache Software License, Version 2.0) Jackson-module-parameter-names (com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.3 - https://github.com/FasterXML/jackson-modules-java8/jackson-module-parameter-names)
+ (The Apache Software License, Version 2.0) MapStruct Core (org.mapstruct:mapstruct:1.0.0.Final - http://mapstruct.org/mapstruct/)
+ (The Apache Software License, Version 2.0) Snappy for Java (org.xerial.snappy:snappy-java:1.0.5 - http://github.com/xerial/snappy-java/)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.12.6 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-module-scala (com.fasterxml.jackson.module:jackson-module-scala_2.11:2.12.6 - http://wiki.fasterxml.com/JacksonModuleScala)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.10.5.1 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.11.0 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.11.4 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.12.6 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.13.3 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.6.7.1 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.7.3 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.9.2 - http://github.com/FasterXML/jackson)
+ (The Apache Software License, Version 2.0) jackson-module-scala (com.fasterxml.jackson.module:jackson-module-scala_2.11:2.6.7.1 - http://wiki.fasterxml.com/JacksonModuleScala)
+ (The Apache Software License, Version 2.0) mybatis (org.mybatis:mybatis:3.5.9 - http://www.mybatis.org/mybatis-3)
+ (The Apache Software License, Version 2.0) mybatis-spring (org.mybatis:mybatis-spring:2.0.7 - http://www.mybatis.org/spring/)
+ (The Apache Software License, Version 2.0) mybatis-spring-boot-autoconfigure (org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.2 - http://www.mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/)
+ (The Apache Software License, Version 2.0) mybatis-spring-boot-starter (org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2 - http://www.mybatis.org/spring-boot-starter/mybatis-spring-boot-starter/)
+ (The Apache Software License, Version 2.0) snappy-java (org.xerial.snappy:snappy-java:1.1.2.6 - https://github.com/xerial/snappy-java)
+ (The Apache Software License, Version 2.0) snappy-java (org.xerial.snappy:snappy-java:1.1.4 - https://github.com/xerial/snappy-java)
+ (The Apache Software License, Version 2.0) snappy-java (org.xerial.snappy:snappy-java:1.1.7.1 - https://github.com/xerial/snappy-java)
+ (The Apache Software License, Version 2.0) snappy-java (org.xerial.snappy:snappy-java:1.1.7.3 - https://github.com/xerial/snappy-java)
+ (The Apache Software License, Version 2.0) springfox-core (io.springfox:springfox-core:2.6.1 - https://github.com/springfox/springfox)
+ (The Apache Software License, Version 2.0) springfox-schema (io.springfox:springfox-schema:2.6.1 - https://github.com/springfox/springfox)
+ (The Apache Software License, Version 2.0) springfox-spi (io.springfox:springfox-spi:2.6.1 - https://github.com/springfox/springfox)
+ (The Apache Software License, Version 2.0) springfox-spring-web (io.springfox:springfox-spring-web:2.6.1 - https://github.com/springfox/springfox)
+ (The Apache Software License, Version 2.0) springfox-swagger-common (io.springfox:springfox-swagger-common:2.6.1 - https://github.com/springfox/springfox)
+ (The Apache Software License, Version 2.0) springfox-swagger-ui (io.springfox:springfox-swagger-ui:2.6.1 - https://github.com/springfox/springfox)
+ (The Apache Software License, Version 2.0) springfox-swagger2 (io.springfox:springfox-swagger2:2.6.1 - https://github.com/springfox/springfox)
+
+
========================================================================
MIT License
========================================================================
@@ -945,6 +1033,16 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(MIT License) SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.25 - http://www.slf4j.org)
(MIT License) pyrolite (net.razorvine:pyrolite:4.13 - https://github.com/irmen/Pyrolite)
(MIT License) scopt (com.github.scopt:scopt_2.11:3.5.0 - https://github.com/scopt/scopt)
+ (MIT License) JUL to SLF4J bridge (org.slf4j:jul-to-slf4j:1.7.36 - http://www.slf4j.org)
+ (MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.6.4 - http://www.slf4j.org)
+ (MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.7.15 - http://www.slf4j.org)
+ (MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.7.16 - http://www.slf4j.org)
+ (MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.7.21 - http://www.slf4j.org)
+ (MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.7.28 - http://www.slf4j.org)
+ (MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.7.30 - http://www.slf4j.org)
+ (MIT License) SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.10 - http://www.slf4j.org)
+ (MIT License) SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.15 - http://www.slf4j.org)
+ (MIT License) SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.16 - http://www.slf4j.org)
(MIT) Jedis (redis.clients:jedis:3.2.0 - https://github.com/xetorthio/jedis)
(MIT-License) spoiwo (com.norbitltd:spoiwo_2.11:1.8.0 - https://github.com/norbert-radyk/spoiwo/)
(The MIT License (MIT)) influxdb java bindings (org.influxdb:influxdb-java:2.22 - http://www.influxdb.org)
@@ -1014,6 +1112,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(New BSD License) janino (org.codehaus.janino:janino:3.0.8 - http://janino-compiler.github.io/janino/)
(New BSD License) janino (org.codehaus.janino:janino:3.0.9 - http://janino-compiler.github.io/janino/)
(New BSD license) Protocol Buffer Java API (com.google.protobuf:protobuf-java:2.5.0 - http://code.google.com/p/protobuf)
+ (New BSD License) Hamcrest Core (org.hamcrest:hamcrest-core:1.3 - https://github.com/hamcrest/JavaHamcrest/hamcrest-core)
(Revised BSD) JSch (com.jcraft:jsch:0.1.54 - http://www.jcraft.com/jsch/)
(The BSD 3-Clause License) leveldbjni-all (org.fusesource.leveldbjni:leveldbjni-all:1.8 - http://leveldbjni.fusesource.org/leveldbjni-all)
(The BSD License) ANTLR 4 Runtime (org.antlr:antlr4-runtime:4.5.1 - http://www.antlr.org/antlr4-runtime)
@@ -1026,7 +1125,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(The BSD License) xmlenc Library (xmlenc:xmlenc:0.52 - http://xmlenc.sourceforge.net)
(The BSD License) ASM Core (asm:asm:3.1 - http://asm.objectweb.org/asm/)
(The BSD License) ASM Commons (asm:asm-commons:3.1 - http://asm.objectweb.org/asm-commons/)
- (The BSD License) ASM Tree (asm:asm-tree:3.1 - http://asm.objectweb.org/asm-tree/)
+ (The BSD License) ASM Tree (asm:asm-tree:3.1 - http://asm.objectweb.org/asm-tree/)
(New BSD License) Commons Compiler (org.codehaus.janino:commons-compiler:2.7.6 - http://docs.codehaus.org/display/JANINO/Home/commons-compiler)
(New BSD License) Janino (org.codehaus.janino:janino:3.1.6 - http://docs.codehaus.org/display/JANINO/Home/janino)
(BSD licence) ANTLR ST4 4.0.4 (org.antlr:ST4:4.0.4 - http://www.stringtemplate.org)
@@ -1092,6 +1191,80 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0) (GNU General Public Library) Streaming API for XML (javax.xml.stream:stax-api:1.0-2 - no url defined)
+ (CDDL License) Expression Language 3.0 (org.glassfish:javax.el:3.0.0 - http://el-spec.java.net)
+ (CDDL License) Expression Language 3.0 (org.glassfish:javax.el:3.0.1-b12 - http://uel.java.net)
+ (CDDL License) Expression Language 3.0 API (javax.el:javax.el-api:3.0.0 - http://uel-spec.java.net)
+ (CDDL License) HK2 API module (org.glassfish.hk2:hk2-api:2.4.0-b34 - https://hk2.java.net/hk2-api)
+ (CDDL License) HK2 API module (org.glassfish.hk2:hk2-api:2.5.0-b32 - https://hk2.java.net/hk2-api)
+ (CDDL License) HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:2.4.0-b34 - https://hk2.java.net/hk2-utils)
+ (CDDL License) HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:2.5.0-b32 - https://hk2.java.net/hk2-utils)
+ (CDDL License) JSP implementation (org.glassfish.web:javax.servlet.jsp:2.3.2 - http://jsp.java.net)
+ (CDDL License) Java Servlet API (javax.servlet.jsp:jsp-api:2.1 - https://javaee.github.io/javaee-jsp-api)
+ (CDDL License) Java Servlet API (javax.servlet:javax.servlet-api:3.1.0 - http://servlet-spec.java.net)
+ (CDDL License) Java Servlet API (javax.servlet:servlet-api:2.5 - http://servlet-spec.java.net)
+ (CDDL License) Java Transaction API (javax.transaction:jta:1.1 - http://java.sun.com/products/jta)
+ (CDDL License) OSGi resource locator bundle - used by various API providers that rely on META-INF/services mechanism to locate providers. (org.glassfish.hk2:osgi-resource-locator:1.0.1 - http://glassfish.org/osgi-resource-locator/)
+ (CDDL License) ServiceLocator Default Implementation (org.glassfish.hk2:hk2-locator:2.4.0-b34 - https://hk2.java.net/hk2-locator)
+ (CDDL License) ServiceLocator Default Implementation (org.glassfish.hk2:hk2-locator:2.5.0-b32 - https://hk2.java.net/hk2-locator)
+ (CDDL License) aopalliance version 1.0 repackaged as a module (org.glassfish.hk2.external:aopalliance-repackaged:2.4.0-b34 - https://hk2.java.net/external/aopalliance-repackaged)
+ (CDDL License) aopalliance version 1.0 repackaged as a module (org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32 - https://hk2.java.net/external/aopalliance-repackaged)
+ (CDDL License) javax.annotation API (javax.annotation:javax.annotation-api:1.2 - http://jcp.org/en/jsr/detail?id=250)
+ (CDDL License) javax.annotation API (javax.annotation:javax.annotation-api:1.3.2 - http://jcp.org/en/jsr/detail?id=250)
+ (CDDL License) javax.inject:1 as OSGi bundle (org.glassfish.hk2.external:javax.inject:2.4.0-b34 - https://hk2.java.net/external/javax.inject)
+ (CDDL License) javax.inject:1 as OSGi bundle (org.glassfish.hk2.external:javax.inject:2.5.0-b32 - https://hk2.java.net/external/javax.inject)
+ (CDDL License) jersey-container-servlet (org.glassfish.jersey.containers:jersey-container-servlet:2.22.2 - https://jersey.java.net/project/jersey-container-servlet/)
+ (CDDL License) jersey-container-servlet-core (org.glassfish.jersey.containers:jersey-container-servlet-core:2.22.2 - https://jersey.java.net/project/jersey-container-servlet-core/)
+ (CDDL License) jersey-container-servlet-core (org.glassfish.jersey.containers:jersey-container-servlet-core:2.25.1 - https://jersey.java.net/project/jersey-container-servlet-core/)
+ (CDDL License) jersey-core-client (org.glassfish.jersey.core:jersey-client:2.22.2 - https://jersey.java.net/jersey-client/)
+ (CDDL License) jersey-core-client (org.glassfish.jersey.core:jersey-client:2.25.1 - https://jersey.java.net/jersey-client/)
+ (CDDL License) jersey-core-common (org.glassfish.jersey.core:jersey-common:2.22.2 - https://jersey.java.net/jersey-common/)
+ (CDDL License) jersey-core-common (org.glassfish.jersey.core:jersey-common:2.25.1 - https://jersey.java.net/jersey-common/)
+ (CDDL License) jersey-core-server (org.glassfish.jersey.core:jersey-server:2.22.2 - https://jersey.java.net/jersey-server/)
+ (CDDL License) jersey-core-server (org.glassfish.jersey.core:jersey-server:2.25.1 - https://jersey.java.net/jersey-server/)
+ (CDDL License) jersey-media-jaxb (org.glassfish.jersey.media:jersey-media-jaxb:2.22.2 - https://jersey.java.net/project/jersey-media-jaxb/)
+ (CDDL License) jersey-media-jaxb (org.glassfish.jersey.media:jersey-media-jaxb:2.25.1 - https://jersey.java.net/project/jersey-media-jaxb/)
+ (CDDL License) jersey-repackaged-guava (org.glassfish.jersey.bundles.repackaged:jersey-guava:2.22.2 - https://jersey.java.net/project/project/jersey-guava/)
+ (CDDL License) jersey-repackaged-guava (org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1 - https://jersey.java.net/project/project/jersey-guava/)
+ (CDDL License) JavaBeans Activation Framework (com.sun.activation:javax.activation:1.2.0 - http://java.net/all/javax.activation/)
+ (CDDL License) JavaBeans Activation Framework API jar (javax.activation:javax.activation-api:1.2.0 - http://java.net/all/javax.activation-api/)
+ (CDDL License) JavaMail API (com.sun.mail:javax.mail:1.5.6 - http://javamail.java.net/javax.mail)
+ (CDDL+GPL License) jersey-container-servlet (org.glassfish.jersey.containers:jersey-container-servlet:2.22.2 - https://jersey.java.net/project/jersey-container-servlet/)
+ (CDDL+GPL License) jersey-container-servlet-core (org.glassfish.jersey.containers:jersey-container-servlet-core:2.22.2 - https://jersey.java.net/project/jersey-container-servlet-core/)
+ (CDDL+GPL License) jersey-container-servlet-core (org.glassfish.jersey.containers:jersey-container-servlet-core:2.25.1 - https://jersey.java.net/project/jersey-container-servlet-core/)
+ (CDDL+GPL License) jersey-core-client (org.glassfish.jersey.core:jersey-client:2.22.2 - https://jersey.java.net/jersey-client/)
+ (CDDL+GPL License) jersey-core-client (org.glassfish.jersey.core:jersey-client:2.25.1 - https://jersey.java.net/jersey-client/)
+ (CDDL+GPL License) jersey-core-common (org.glassfish.jersey.core:jersey-common:2.22.2 - https://jersey.java.net/jersey-common/)
+ (CDDL+GPL License) jersey-core-common (org.glassfish.jersey.core:jersey-common:2.25.1 - https://jersey.java.net/jersey-common/)
+ (CDDL+GPL License) jersey-core-server (org.glassfish.jersey.core:jersey-server:2.22.2 - https://jersey.java.net/jersey-server/)
+ (CDDL+GPL License) jersey-core-server (org.glassfish.jersey.core:jersey-server:2.25.1 - https://jersey.java.net/jersey-server/)
+ (CDDL+GPL License) jersey-media-jaxb (org.glassfish.jersey.media:jersey-media-jaxb:2.22.2 - https://jersey.java.net/project/jersey-media-jaxb/)
+ (CDDL+GPL License) jersey-media-jaxb (org.glassfish.jersey.media:jersey-media-jaxb:2.25.1 - https://jersey.java.net/project/jersey-media-jaxb/)
+ (CDDL+GPL License) jersey-repackaged-guava (org.glassfish.jersey.bundles.repackaged:jersey-guava:2.22.2 - https://jersey.java.net/project/project/jersey-guava/)
+ (CDDL+GPL License) jersey-repackaged-guava (org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1 - https://jersey.java.net/project/project/jersey-guava/)
+ (CDDL + GPLv2 with classpath exception) Expression Language 3.0 (org.glassfish:javax.el:3.0.0 - http://el-spec.java.net)
+ (CDDL + GPLv2 with classpath exception) Expression Language 3.0 (org.glassfish:javax.el:3.0.1-b12 - http://uel.java.net)
+ (CDDL + GPLv2 with classpath exception) Expression Language 3.0 API (javax.el:javax.el-api:3.0.0 - http://uel-spec.java.net)
+ (CDDL + GPLv2 with classpath exception) HK2 API module (org.glassfish.hk2:hk2-api:2.4.0-b34 - https://hk2.java.net/hk2-api)
+ (CDDL + GPLv2 with classpath exception) HK2 API module (org.glassfish.hk2:hk2-api:2.5.0-b32 - https://hk2.java.net/hk2-api)
+ (CDDL + GPLv2 with classpath exception) HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:2.4.0-b34 - https://hk2.java.net/hk2-utils)
+ (CDDL + GPLv2 with classpath exception) HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:2.5.0-b32 - https://hk2.java.net/hk2-utils)
+ (CDDL + GPLv2 with classpath exception) JSP implementation (org.glassfish.web:javax.servlet.jsp:2.3.2 - http://jsp.java.net)
+ (CDDL + GPLv2 with classpath exception) Java Servlet API (javax.servlet.jsp:jsp-api:2.1 - https://javaee.github.io/javaee-jsp-api)
+ (CDDL + GPLv2 with classpath exception) Java Servlet API (javax.servlet:javax.servlet-api:3.1.0 - http://servlet-spec.java.net)
+ (CDDL + GPLv2 with classpath exception) Java Servlet API (javax.servlet:servlet-api:2.5 - http://servlet-spec.java.net)
+ (CDDL + GPLv2 with classpath exception) Java Transaction API (javax.transaction:jta:1.1 - http://java.sun.com/products/jta)
+ (CDDL + GPLv2 with classpath exception) OSGi resource locator bundle - used by various API providers that rely on META-INF/services mechanism to locate providers. (org.glassfish.hk2:osgi-resource-locator:1.0.1 - http://glassfish.org/osgi-resource-locator/)
+ (CDDL + GPLv2 with classpath exception) ServiceLocator Default Implementation (org.glassfish.hk2:hk2-locator:2.4.0-b34 - https://hk2.java.net/hk2-locator)
+ (CDDL + GPLv2 with classpath exception) ServiceLocator Default Implementation (org.glassfish.hk2:hk2-locator:2.5.0-b32 - https://hk2.java.net/hk2-locator)
+ (CDDL + GPLv2 with classpath exception) aopalliance version 1.0 repackaged as a module (org.glassfish.hk2.external:aopalliance-repackaged:2.4.0-b34 - https://hk2.java.net/external/aopalliance-repackaged)
+ (CDDL + GPLv2 with classpath exception) aopalliance version 1.0 repackaged as a module (org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32 - https://hk2.java.net/external/aopalliance-repackaged)
+ (CDDL + GPLv2 with classpath exception) javax.annotation API (javax.annotation:javax.annotation-api:1.2 - http://jcp.org/en/jsr/detail?id=250)
+ (CDDL + GPLv2 with classpath exception) javax.annotation API (javax.annotation:javax.annotation-api:1.3.2 - http://jcp.org/en/jsr/detail?id=250)
+ (CDDL + GPLv2 with classpath exception) javax.inject:1 as OSGi bundle (org.glassfish.hk2.external:javax.inject:2.4.0-b34 - https://hk2.java.net/external/javax.inject)
+ (CDDL + GPLv2 with classpath exception) javax.inject:1 as OSGi bundle (org.glassfish.hk2.external:javax.inject:2.5.0-b32 - https://hk2.java.net/external/javax.inject)
+ (CDDL/GPLv2+CE) JavaBeans Activation Framework (com.sun.activation:javax.activation:1.2.0 - http://java.net/all/javax.activation/)
+ (CDDL/GPLv2+CE) JavaBeans Activation Framework API jar (javax.activation:javax.activation-api:1.2.0 - http://java.net/all/javax.activation-api/)
+ (CDDL/GPLv2+CE) JavaMail API (com.sun.mail:javax.mail:1.5.6 - http://javamail.java.net/javax.mail)
========================================================================
Eclipse Public License
diff --git a/seatunnel-dist/release-docs/licenses/LICENSE-HikariCP.txt b/seatunnel-dist/release-docs/licenses/LICENSE-HikariCP.txt
new file mode 100644
index 000000000..8405e89a0
--- /dev/null
+++ b/seatunnel-dist/release-docs/licenses/LICENSE-HikariCP.txt
@@ -0,0 +1,191 @@
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright
+owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, "control" means (i) the power, direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
+outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including
+but not limited to software source code, documentation source, and configuration
+files.
+
+"Object" form shall mean any form resulting from mechanical transformation or
+translation of a Source form, including but not limited to compiled object code,
+generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made
+available under the License, as indicated by a copyright notice that is included
+in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+"submitted" means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of discussing and improving the Work, but excluding communication
+that is conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
+of whom a Contribution has been received by Licensor and subsequently
+incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable (except as stated in this section) patent license to make, have
+made, use, offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by combination
+of their Contribution(s) with the Work to which such Contribution(s) was
+submitted. If You institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+Contribution incorporated within the Work constitutes direct or contributory
+patent infringement, then any patent licenses granted to You under this License
+for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof
+in any medium, with or without modifications, and in Source or Object form,
+provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of
+this License; and
+You must cause any modified files to carry prominent notices stating that You
+changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute,
+all copyright, patent, trademark, and attribution notices from the Source form
+of the Work, excluding those notices that do not pertain to any part of the
+Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any
+Derivative Works that You distribute must include a readable copy of the
+attribution notices contained within such NOTICE file, excluding those notices
+that do not pertain to any part of the Derivative Works, in at least one of the
+following places: within a NOTICE text file distributed as part of the
+Derivative Works; within the Source form or documentation, if provided along
+with the Derivative Works; or, within a display generated by the Derivative
+Works, if and wherever such third-party notices normally appear. The contents of
+the NOTICE file are for informational purposes only and do not modify the
+License. You may add Your own attribution notices within Derivative Works that
+You distribute, alongside or as an addendum to the NOTICE text from the Work,
+provided that such additional attribution notices cannot be construed as
+modifying the License.
+You may add Your own copyright statement to Your modifications and may provide
+additional or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as a whole,
+provided Your use, reproduction, and distribution of the Work otherwise complies
+with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted
+for inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the terms of
+any separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the
+Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
+including, without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise of
+permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as deliberate
+and grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License or
+out of the use or inability to use the Work (including but not limited to
+damages for loss of goodwill, work stoppage, computer failure or malfunction, or
+any and all other commercial damages or losses), even if such Contributor has
+been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to
+offer, and charge a fee for, acceptance of support, warranty, indemnity, or
+other liability obligations and/or rights consistent with this License. However,
+in accepting such obligations, You may act only on Your own behalf and on Your
+sole responsibility, not on behalf of any other Contributor, and only if You
+agree to indemnify, defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason of your
+accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work
+
+To apply the Apache License to your work, attach the following boilerplate
+notice, with the fields enclosed by brackets "[]" replaced with your own
+identifying information. (Don't include the brackets!) The text should be
+enclosed in the appropriate comment syntax for the file format. We also
+recommend that a file or class name and description of purpose be included on
+the same "printed page" as the copyright notice for easier identification within
+third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
\ No newline at end of file
diff --git a/seatunnel-dist/release-docs/licenses/LICENSE-mybatis.txt b/seatunnel-dist/release-docs/licenses/LICENSE-mybatis.txt
new file mode 100644
index 000000000..9c311afbf
--- /dev/null
+++ b/seatunnel-dist/release-docs/licenses/LICENSE-mybatis.txt
@@ -0,0 +1,13 @@
+Copyright ${license.git.copyrightYears} the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
diff --git a/seatunnel-dist/release-docs/licenses/LICENSE-spring.txt b/seatunnel-dist/release-docs/licenses/LICENSE-spring.txt
new file mode 100644
index 000000000..512235b40
--- /dev/null
+++ b/seatunnel-dist/release-docs/licenses/LICENSE-spring.txt
@@ -0,0 +1,125 @@
+# Spring RTS game engine
+
+## LICENSE
+
+Spring is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Spring is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+For details about the licenses,
+see [GNU GPL v2 (gpl-2.0.txt)](gpl-2.0.html)
+and [v3 (gpl-3.0.txt)](gpl-3.0.html).
+
+For a list of authors of this software, see [AUTHORS](AUTHORS.html).
+
+## Third Parties
+
+### file SOP.hpp
+Copyright (c) 2012, Daniel Cornel. Published on drivenbynostalgia.com.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the copyright holder nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+### gflags
+Copyright (c) 2006, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+### mingw-std-threads
+Copyright (c) 2016, Mega Limited
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+### moodycamel's ConcurrentQueue
+Copyright (c) 2013-2016, Cameron Desrochers.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice, this list of
+conditions and the following disclaimer in the documentation and/or other materials
+provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/seatunnel-server/pom.xml b/seatunnel-server/pom.xml
new file mode 100644
index 000000000..dc9361510
--- /dev/null
+++ b/seatunnel-server/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>seatunnel</artifactId>
+ <groupId>org.apache.seatunnel</groupId>
+ <version>${revision}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>seatunnel-server</artifactId>
+ <packaging>pom</packaging>
+ <modules>
+ <module>seatunnel-app</module>
+ </modules>
+
+</project>
\ No newline at end of file
diff --git a/seatunnel-server/seatunnel-app/pom.xml b/seatunnel-server/seatunnel-app/pom.xml
new file mode 100644
index 000000000..eeb6b7ced
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/pom.xml
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>seatunnel-server</artifactId>
+ <groupId>org.apache.seatunnel</groupId>
+ <version>${revision}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>seatunnel-app</artifactId>
+
+ <dependencies>
+
+ <!--springboot-->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-tomcat</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>log4j-to-slf4j</artifactId>
+ <groupId>org.apache.logging.log4j</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-jetty</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>javax-websocket-server-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>websocket-server</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mybatis.spring.boot</groupId>
+ <artifactId>mybatis-spring-boot-starter</artifactId>
+ <version>${mybatis-spring-boot-starter.version}</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>spring-beans</artifactId>
+ <groupId>org.springframework</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <groupId>org.springframework.boot</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>spring-core</artifactId>
+ <groupId>org.springframework</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>spring-boot-starter</artifactId>
+ <groupId>org.springframework.boot</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>io.springfox</groupId>
+ <artifactId>springfox-swagger2</artifactId>
+ <version>${springfox-swagger.version}</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>spring-aop</artifactId>
+ <groupId>org.springframework</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>spring-beans</artifactId>
+ <groupId>org.springframework</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>spring-context</artifactId>
+ <groupId>org.springframework</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>io.springfox</groupId>
+ <artifactId>springfox-swagger-ui</artifactId>
+ <version>${springfox-swagger.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>${swagger-annotations.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate.validator</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <exclusions>
+ <exclusion>
+ <artifactId>classmate</artifactId>
+ <groupId>com.fasterxml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-library</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>${spring-boot.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/SeatunnelApplication.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/SeatunnelApplication.java
new file mode 100644
index 000000000..757e863fd
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/SeatunnelApplication.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication
+@EnableTransactionManagement
+@EnableConfigurationProperties
+@EnableScheduling
+@EnableAsync(proxyTargetClass = true)
+@MapperScan({"org.apache.seatunnel.app.dal"})
+public class SeatunnelApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(SeatunnelApplication.class, args);
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/DatasourceStatusEnum.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/DatasourceStatusEnum.java
new file mode 100644
index 000000000..b271a5b04
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/DatasourceStatusEnum.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public enum DatasourceStatusEnum {
+ ONLINE(1, "online"),
+ OFFLINE(2, "offline"),
+ DELETED(3, "deleted"),
+ ;
+
+ private final int code;
+ private final String description;
+
+ DatasourceStatusEnum(int code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/Result.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/Result.java
new file mode 100644
index 000000000..79d7ae12b
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/Result.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public class Result<T> {
+
+ private static final Result<Void> OK = success();
+
+ private int code = 0;
+
+ private String msg;
+
+ private T data;
+
+ private Result() {
+ this.data = null;
+ }
+
+ private Result(SeatunnelErrorEnum errorEnum) {
+ this.code = errorEnum.getCode();
+ this.msg = errorEnum.getMsg();
+ this.data = null;
+ }
+
+ private Result(SeatunnelErrorEnum errorEnum, String... messages) {
+ this.code = errorEnum.getCode();
+ this.msg = String.format(errorEnum.getTemplate(), messages);
+ this.data = null;
+ }
+
+ public static <T> Result<T> success() {
+ return new Result<>();
+ }
+
+ public static <T> Result<T> success(T data) {
+ Result<T> result = success();
+ result.setData(data);
+ return result;
+ }
+
+ public static <T> Result<T> failure(SeatunnelErrorEnum errorEnum) {
+ Result<T> result = new Result<>(errorEnum);
+ return result;
+ }
+
+ public static <T> Result<T> failure(SeatunnelErrorEnum errorEnum, String... messages) {
+ Result<T> result = new Result<>(errorEnum, messages);
+ return result;
+ }
+
+ public boolean isSuccess() {
+ return OK.getCode() == this.code;
+ }
+
+ public boolean isFailed() {
+ return !this.isSuccess();
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ public T getData() {
+ return data;
+ }
+
+ public void setData(T data) {
+ this.data = data;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptParamStatusEnum.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptParamStatusEnum.java
new file mode 100644
index 000000000..56195dd8d
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptParamStatusEnum.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public enum ScriptParamStatusEnum {
+ NORMAL(0, "normal"),
+ DELETED(1, "deleted"),
+ ;
+
+ private final int code;
+ private final String description;
+
+ ScriptParamStatusEnum(int code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptStatusEnum.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptStatusEnum.java
new file mode 100644
index 000000000..17704a217
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptStatusEnum.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public enum ScriptStatusEnum {
+ UNPUBLISHED(0, "unpublished"),
+ PUBLISHED(1, "published"),
+ DELETED(2, "deleted"),
+ ;
+
+ private final int code;
+ private final String description;
+
+ ScriptStatusEnum(int code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptTypeEnum.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptTypeEnum.java
new file mode 100644
index 000000000..89d627c60
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/ScriptTypeEnum.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public enum ScriptTypeEnum {
+ OFFLINE(0, "offline"),
+ REALTIME(1, "realtime"),
+ ;
+
+ private final int code;
+ private final String description;
+
+ ScriptTypeEnum(int code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/SeatunnelErrorEnum.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/SeatunnelErrorEnum.java
new file mode 100644
index 000000000..3f770b725
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/SeatunnelErrorEnum.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public enum SeatunnelErrorEnum {
+
+ SCRIPT_ALREADY_EXIST(10001, "script already exist", "You already have a script with the same name : '%s'"),
+ NO_SUCH_SCRIPT(10002, "no such script", "No such script. Maybe deleted by others."),
+ USER_ALREADY_EXISTS(10003, "user already exist", "The same username [%s] is exist."),
+ NO_SUCH_USER(10002, "no such user", "No such user. Maybe deleted by others."),
+ ILLEGAL_STATE(99998, "illegal state", "%s"),
+ UNKNOWN(99999, "unknown exception", "unknown exception")
+ ;
+
+ private final int code;
+ private final String msg;
+ private final String template;
+
+ SeatunnelErrorEnum(int code, String msg, String template) {
+ this.code = code;
+ this.msg = msg;
+ this.template = template;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public String getTemplate() {
+ return template;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/SeatunnelException.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/SeatunnelException.java
new file mode 100644
index 000000000..e68329631
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/SeatunnelException.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+import java.util.Arrays;
+
+public class SeatunnelException extends RuntimeException{
+ private SeatunnelErrorEnum errorEnum;
+
+ public SeatunnelException(SeatunnelErrorEnum e) {
+ super(e.getMsg());
+ this.errorEnum = e;
+ }
+
+ public SeatunnelException(SeatunnelErrorEnum e, String... msg) {
+ super(e.getMsg().concat(" ").concat(Arrays.toString(msg)));
+ this.errorEnum = e;
+ }
+
+ public static SeatunnelException newInstance(SeatunnelErrorEnum e, String... msg) {
+ return new SeatunnelException(e, msg);
+
+ }
+
+ public static SeatunnelException newInstance(SeatunnelErrorEnum e) {
+ return new SeatunnelException(e);
+
+ }
+
+ public SeatunnelErrorEnum getErrorEnum() {
+ return errorEnum;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/UserStatusEnum.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/UserStatusEnum.java
new file mode 100644
index 000000000..c62b7e1cf
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/UserStatusEnum.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public enum UserStatusEnum {
+ ENABLE(0, "enable"),
+ DISABLE(1, "disable"),
+ ;
+ private final int code;
+ private final String description;
+
+ UserStatusEnum(int code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/UserTypeEnum.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/UserTypeEnum.java
new file mode 100644
index 000000000..1b050c516
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/common/UserTypeEnum.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.common;
+
+public enum UserTypeEnum {
+ NORMAL(0, "normal"),
+ ;
+
+ private final int code;
+ private final String description;
+
+ UserTypeEnum(int code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/config/Swagger2.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/config/Swagger2.java
new file mode 100644
index 000000000..f8a5718da
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/config/Swagger2.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.config;
+
+import com.fasterxml.classmate.TypeResolver;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+@Configuration
+@EnableSwagger2
+@EnableWebMvc
+public class Swagger2 implements WebMvcConfigurer {
+ @Autowired
+ private TypeResolver typeResolver;
+
+ @Bean
+ public Docket createRestApi() {
+
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.apache.seatunnel.app.controller"))
+ .paths(PathSelectors.any())
+ .build();
+
+ }
+
+ @Override
+ public void addViewControllers(ViewControllerRegistry registry) {
+ registry.addRedirectViewController("/api/v2/api-docs", "/v2/api-docs");
+ registry.addRedirectViewController("/api/swagger-resources/configuration/ui", "/swagger-resources/configuration/ui");
+ registry.addRedirectViewController("/api/swagger-resources/configuration/security", "/swagger-resources/configuration/security");
+ registry.addRedirectViewController("/api/swagger-resources", "/swagger-resources");
+
+ registry.addRedirectViewController("/api/null/api-docs",
+ "/api-docs").setKeepQueryParams(true);
+ registry.addRedirectViewController("/api/null/swagger-resources/configuration/ui",
+ "/swagger-resources/configuration/ui");
+ registry.addRedirectViewController("/api/null/swagger-resources/configuration/security",
+ "/swagger-resources/configuration/security");
+ registry.addRedirectViewController("/api/null/swagger-resources", "/swagger-resources");
+ }
+
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry registry) {
+ registry.addResourceHandler("/api/swagger-ui.html**").addResourceLocations("classpath:/META-INF/resources/swagger-ui.html");
+ registry.addResourceHandler("/api/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+ registry.addResourceHandler("/doc.html**").addResourceLocations("classpath:/META-INF/resources/");
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("seatunnel api docs")
+ .version("1.0.0")
+ .description("API description of Seatunnel")
+ .termsOfServiceUrl("https://seatunnel.apache.org/")
+ .build();
+ }
+
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/controller/ScriptController.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/controller/ScriptController.java
new file mode 100644
index 000000000..a17d0fc12
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/controller/ScriptController.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.controller;
+
+import org.apache.seatunnel.app.common.Result;
+import org.apache.seatunnel.app.domain.request.script.AddEmptyScriptReq;
+import org.apache.seatunnel.app.domain.request.script.ScriptListReq;
+import org.apache.seatunnel.app.domain.request.script.UpdateScriptContentReq;
+import org.apache.seatunnel.app.domain.request.script.UpdateScriptParamReq;
+import org.apache.seatunnel.app.domain.response.script.AddEmptyScriptRes;
+import org.apache.seatunnel.app.domain.response.script.ScriptParamRes;
+import org.apache.seatunnel.app.domain.response.script.ScriptSimpleInfoRes;
+import org.apache.seatunnel.app.service.IScriptService;
+
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+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.List;
+
+@RequestMapping("/api/v1/script")
+@RestController
+public class ScriptController {
+ @Resource
+ private IScriptService iScriptService;
+
+ @PostMapping("/script")
+ @ApiOperation(value = "add an empty script", httpMethod = "POST")
+ public Result<AddEmptyScriptRes> addEmptyScript(@RequestBody @NotNull AddEmptyScriptReq addEmptyScriptReq) {
+ return Result.success(iScriptService.addEmptyScript(addEmptyScriptReq));
+ }
+
+ @PutMapping("/scriptContent")
+ @ApiOperation(value = "update script", httpMethod = "PUT")
+ public Result<Void> updateScriptContent(@RequestBody @NotNull UpdateScriptContentReq updateScriptContentReq) {
+ iScriptService.updateScriptContent(updateScriptContentReq);
+ return Result.success();
+ }
+
+ @DeleteMapping("/script")
+ @ApiOperation(value = "delete script", httpMethod = "DELETE")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "script id", dataType = "Integer"),
+ })
+ public Result<Void> delete(@RequestParam @NotNull Integer id) {
+ iScriptService.delete(id);
+ return Result.success();
+ }
+
+ @PostMapping("/list")
+ @ApiOperation(value = "script list", httpMethod = "POST")
+ public Result<List<ScriptSimpleInfoRes>> list(@RequestBody @NotNull ScriptListReq scriptListReq) {
+ return Result.success(iScriptService.list(scriptListReq));
+ }
+
+ @GetMapping("/scriptContent")
+ @ApiOperation(value = "fetch script content", httpMethod = "GET")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "script id", dataType = "Integer"),
+ })
+ public Result<String> fetchScriptContent(@RequestParam @NotNull Integer id) {
+ return Result.success(iScriptService.fetchScriptContent(id));
+ }
+
+ @PutMapping("/scriptParam")
+ @ApiOperation(value = "update script param", httpMethod = "PUT")
+ public Result<Void> updateScriptParam(@RequestBody @NotNull UpdateScriptParamReq updateScriptParamReq) {
+ iScriptService.updateScriptParam(updateScriptParamReq);
+ return Result.success();
+ }
+
+ @GetMapping("/scriptParam")
+ @ApiOperation(value = "fetch script param", httpMethod = "GET")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "script id", dataType = "Integer"),
+ })
+ public Result<List<ScriptParamRes>> fetchScriptParam(@RequestParam @NotNull Integer id) {
+ return Result.success(iScriptService.fetchScriptParam(id));
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/controller/UserController.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/controller/UserController.java
new file mode 100644
index 000000000..ec5c16d71
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/controller/UserController.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.controller;
+
+import org.apache.seatunnel.app.common.Result;
+import org.apache.seatunnel.app.domain.request.user.AddUserReq;
+import org.apache.seatunnel.app.domain.request.user.UpdateUserReq;
+import org.apache.seatunnel.app.domain.request.user.UserListReq;
+import org.apache.seatunnel.app.domain.response.user.AddUserRes;
+import org.apache.seatunnel.app.domain.response.user.UserSimpleInfoRes;
+import org.apache.seatunnel.app.service.IUserService;
+
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+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.List;
+
+@RequestMapping("/api/v1/user")
+@RestController
+public class UserController {
+
+ @Resource
+ private IUserService iUserService;
+
+ @PostMapping("/user")
+ @ApiOperation(value = "add user", httpMethod = "POST")
+ public Result<AddUserRes> add(@RequestBody @NotNull AddUserReq addReq) {
+ return Result.success(iUserService.add(addReq));
+ }
+
+ @PutMapping("/user")
+ @ApiOperation(value = "update user", httpMethod = "PUT")
+ public Result<Void> update(@RequestBody @NotNull UpdateUserReq updateReq) {
+ iUserService.update(updateReq);
+ return Result.success();
+ }
+
+ @DeleteMapping("/user")
+ @ApiOperation(value = "delete user", httpMethod = "DELETE")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "user id", dataType = "Integer"),
+ })
+ public Result<Void> delete(@RequestParam @NotNull Integer id) {
+ iUserService.delete(id);
+ return Result.success();
+ }
+
+ @PostMapping("/list")
+ @ApiOperation(value = "user list", httpMethod = "POST")
+ public Result<List<UserSimpleInfoRes>> list(@RequestBody @NotNull UserListReq userListReq) {
+ return Result.success(iUserService.list(userListReq));
+ }
+
+ @PutMapping("/enable")
+ @ApiOperation(value = "enable a user", httpMethod = "PUT")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "user id", dataType = "Integer"),
+ })
+ public Result<Void> enable(@RequestParam @NotNull Integer id) {
+ iUserService.enable(id);
+ return Result.success();
+ }
+
+ @PutMapping("/disable")
+ @ApiOperation(value = "disable a user", httpMethod = "PUT")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "user id", dataType = "Integer"),
+ })
+ public Result<Void> disable(@RequestParam @NotNull Integer id) {
+ iUserService.disable(id);
+ return Result.success();
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IScriptDao.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IScriptDao.java
new file mode 100644
index 000000000..7da0332ac
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IScriptDao.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.dao;
+
+import org.apache.seatunnel.app.dal.entity.Script;
+import org.apache.seatunnel.app.domain.dto.script.AddEmptyScriptDto;
+import org.apache.seatunnel.app.domain.dto.script.CheckScriptDuplicateDto;
+import org.apache.seatunnel.app.domain.dto.script.ListScriptsDto;
+import org.apache.seatunnel.app.domain.dto.script.UpdateScriptContentDto;
+
+import java.util.List;
+
+public interface IScriptDao {
+ void checkScriptDuplicate(CheckScriptDuplicateDto dto);
+
+ int addEmptyScript(AddEmptyScriptDto dto);
+
+ Script getScript(Integer id);
+
+ void updateScriptContent(UpdateScriptContentDto dto);
+
+ void deleteScript(int id);
+
+ List<Script> list(ListScriptsDto dto, Integer pageNo, Integer pageSize);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IScriptParamDao.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IScriptParamDao.java
new file mode 100644
index 000000000..2e0689597
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IScriptParamDao.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.dao;
+
+import org.apache.seatunnel.app.dal.entity.ScriptParam;
+import org.apache.seatunnel.app.domain.dto.script.UpdateScriptParamDto;
+
+import java.util.List;
+
+public interface IScriptParamDao {
+ List<ScriptParam> getParamsByScriptId(int id);
+
+ void updateStatusByScriptId(int scriptId, int code);
+
+ void batchInsert(UpdateScriptParamDto dto);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IUserDao.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IUserDao.java
new file mode 100644
index 000000000..146771460
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IUserDao.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.dao;
+
+import org.apache.seatunnel.app.dal.entity.User;
+import org.apache.seatunnel.app.domain.dto.user.ListUserDto;
+import org.apache.seatunnel.app.domain.dto.user.UpdateUserDto;
+
+import java.util.List;
+
+public interface IUserDao {
+ int add(UpdateUserDto dto);
+
+ void checkUserExists(String username);
+
+ void update(UpdateUserDto dto);
+
+ void delete(int id);
+
+ void enable(int id);
+
+ void disable(int id);
+
+ List<User> list(ListUserDto dto, int pageNo, int pageSize);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/ScriptDaoImpl.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/ScriptDaoImpl.java
new file mode 100644
index 000000000..1a485bec7
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/ScriptDaoImpl.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.dao.impl;
+
+import static org.apache.seatunnel.app.common.SeatunnelErrorEnum.SCRIPT_ALREADY_EXIST;
+import static com.google.common.base.Preconditions.checkState;
+
+import org.apache.seatunnel.app.common.ScriptStatusEnum;
+import org.apache.seatunnel.app.dal.dao.IScriptDao;
+import org.apache.seatunnel.app.dal.entity.Script;
+import org.apache.seatunnel.app.dal.mapper.ScriptMapper;
+import org.apache.seatunnel.app.domain.dto.script.AddEmptyScriptDto;
+import org.apache.seatunnel.app.domain.dto.script.CheckScriptDuplicateDto;
+import org.apache.seatunnel.app.domain.dto.script.ListScriptsDto;
+import org.apache.seatunnel.app.domain.dto.script.UpdateScriptContentDto;
+
+import org.springframework.stereotype.Repository;
+
+import javax.annotation.Resource;
+
+import java.util.List;
+import java.util.Objects;
+
+@Repository
+public class ScriptDaoImpl implements IScriptDao {
+
+ @Resource
+ private ScriptMapper scriptMapper;
+
+ @Override
+ public void checkScriptDuplicate(CheckScriptDuplicateDto dto) {
+ final Script script = scriptMapper.selectByNameAndCreatorAndStatusNotEq(dto.getName(), dto.getCreatorId(), (byte) ScriptStatusEnum.DELETED.getCode());
+ checkState(Objects.isNull(script), String.format(SCRIPT_ALREADY_EXIST.getTemplate(), dto.getName()));
+ }
+
+ @Override
+ public int addEmptyScript(AddEmptyScriptDto dto) {
+ final Script script = new Script();
+ script.setName(dto.getName());
+ script.setType(dto.getType());
+ script.setStatus(dto.getStatus());
+ script.setCreatorId(dto.getCreatorId());
+ script.setMenderId(dto.getMenderId());
+ scriptMapper.insert(script);
+ return script.getId();
+ }
+
+ @Override
+ public Script getScript(Integer id) {
+ return scriptMapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public void updateScriptContent(UpdateScriptContentDto dto) {
+ scriptMapper.updateContentByPrimaryKey(dto.getId(), dto.getContent(), dto.getContentMd5(), dto.getMenderId());
+ }
+
+ @Override
+ public void deleteScript(int id) {
+ scriptMapper.updateStatus(id, (byte) ScriptStatusEnum.DELETED.getCode());
+ }
+
+ @Override
+ public List<Script> list(ListScriptsDto dto, Integer pageNo, Integer pageSize) {
+ final Script script = new Script();
+ script.setName(dto.getName());
+ script.setStatus(dto.getStatus());
+
+ return scriptMapper.selectBySelectiveAndPage(script, pageNo * pageSize, pageSize);
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/ScriptParamDaoImpl.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/ScriptParamDaoImpl.java
new file mode 100644
index 000000000..fad680cb3
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/ScriptParamDaoImpl.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.dao.impl;
+
+import org.apache.seatunnel.app.common.ScriptParamStatusEnum;
+import org.apache.seatunnel.app.dal.dao.IScriptParamDao;
+import org.apache.seatunnel.app.dal.entity.ScriptParam;
+import org.apache.seatunnel.app.dal.mapper.ScriptParamMapper;
+import org.apache.seatunnel.app.domain.dto.script.UpdateScriptParamDto;
+
+import com.google.common.collect.Lists;
+import org.springframework.stereotype.Repository;
+
+import javax.annotation.Resource;
+
+import java.util.List;
+import java.util.Map;
+
+@Repository
+public class ScriptParamDaoImpl implements IScriptParamDao {
+ @Resource
+ private ScriptParamMapper scriptParamMapper;
+
+ @Override
+ public List<ScriptParam> getParamsByScriptId(int id) {
+ return scriptParamMapper.selectByScriptId(id);
+ }
+
+ @Override
+ public void updateStatusByScriptId(int scriptId, int code) {
+ scriptParamMapper.updateStatusByScriptId(scriptId, (byte) code);
+ }
+
+ @Override
+ public void batchInsert(UpdateScriptParamDto dto) {
+ final Map<String, String> keyAndValue = dto.getParams();
+ final List<ScriptParam> scriptParams = Lists.newArrayListWithCapacity(keyAndValue.size());
+ keyAndValue.forEach((k, v) -> {
+ final ScriptParam scriptParam = new ScriptParam();
+ scriptParam.setStatus((byte) ScriptParamStatusEnum.NORMAL.getCode());
+ scriptParam.setKey(k);
+ scriptParam.setValue(v);
+ scriptParam.setScriptId(dto.getScriptId());
+ scriptParams.add(scriptParam);
+ });
+
+ scriptParamMapper.batchInsert(scriptParams);
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/UserDaoImpl.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/UserDaoImpl.java
new file mode 100644
index 000000000..0affd510f
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/impl/UserDaoImpl.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.dao.impl;
+
+import static org.apache.seatunnel.app.common.SeatunnelErrorEnum.NO_SUCH_USER;
+import static org.apache.seatunnel.app.common.SeatunnelErrorEnum.USER_ALREADY_EXISTS;
+import static com.google.common.base.Preconditions.checkState;
+
+import org.apache.seatunnel.app.common.UserStatusEnum;
+import org.apache.seatunnel.app.dal.dao.IUserDao;
+import org.apache.seatunnel.app.dal.entity.User;
+import org.apache.seatunnel.app.dal.mapper.UserMapper;
+import org.apache.seatunnel.app.domain.dto.user.ListUserDto;
+import org.apache.seatunnel.app.domain.dto.user.UpdateUserDto;
+
+import org.springframework.stereotype.Repository;
+
+import javax.annotation.Resource;
+
+import java.util.List;
+import java.util.Objects;
+
+@Repository
+public class UserDaoImpl implements IUserDao {
+ @Resource
+ private UserMapper userMapper;
+
+ @Override
+ public int add(UpdateUserDto dto) {
+ final User user = new User();
+ user.setUsername(dto.getUsername());
+ user.setPassword(dto.getPassword());
+ user.setType((byte) dto.getType());
+ user.setStatus((byte) dto.getStatus());
+
+ userMapper.insert(user);
+ return user.getId();
+ }
+
+ @Override
+ public void checkUserExists(String username) {
+ User user = userMapper.selectByName(username);
+ checkState(Objects.isNull(user), String.format(USER_ALREADY_EXISTS.getTemplate(), username));
+ }
+
+ @Override
+ public void update(UpdateUserDto dto) {
+ final User user = new User();
+ user.setUsername(dto.getUsername());
+ user.setPassword(dto.getPassword());
+ user.setType((byte) dto.getType());
+ user.setStatus((byte) dto.getStatus());
+ user.setId(dto.getId());
+
+ final int i = userMapper.updateByPrimaryKey(user);
+ checkState(i == 1, NO_SUCH_USER.getTemplate());
+ }
+
+ @Override
+ public void delete(int id) {
+ userMapper.deleteByPrimaryKey(id);
+ }
+
+ @Override
+ public void enable(int id) {
+ userMapper.updateStatus(id, (byte) UserStatusEnum.ENABLE.getCode());
+ }
+
+ @Override
+ public void disable(int id) {
+ userMapper.updateStatus(id, (byte) UserStatusEnum.DISABLE.getCode());
+ }
+
+ @Override
+ public List<User> list(ListUserDto dto, int pageNo, int pageSize) {
+ final User user = new User();
+ user.setUsername(dto.getName());
+ return userMapper.selectBySelectiveAndPage(user, pageNo * pageSize, pageSize);
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/Script.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/Script.java
new file mode 100644
index 000000000..3b1d7db77
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/Script.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.entity;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class Script {
+ private Integer id;
+
+ private String name;
+
+ private Byte type;
+
+ private Byte status;
+
+ private String content;
+
+ private String contentMd5;
+
+ private Integer creatorId;
+
+ private Integer menderId;
+
+ private Date createTime;
+
+ private Date updateTime;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/ScriptParam.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/ScriptParam.java
new file mode 100644
index 000000000..96d9b31b8
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/ScriptParam.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.entity;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class ScriptParam {
+ private Integer id;
+
+ private Integer scriptId;
+
+ private String key;
+
+ private String value;
+
+ private Byte status;
+
+ private Date createTime;
+
+ private Date updateTime;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/User.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/User.java
new file mode 100644
index 000000000..737776534
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/User.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.entity;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class User {
+ private Integer id;
+
+ private String username;
+
+ private String password;
+
+ private Byte status;
+
+ private Byte type;
+
+ private Date createTime;
+
+ private Date updateTime;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/ScriptMapper.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/ScriptMapper.java
new file mode 100644
index 000000000..512c40782
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/ScriptMapper.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.mapper;
+
+import org.apache.seatunnel.app.dal.entity.Script;
+
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ScriptMapper {
+ Script selectByPrimaryKey(Integer id);
+
+ void insert(Script script);
+
+ void updateContentByPrimaryKey(@Param("id") int id, @Param("content") String content, @Param("contentMd5") String contentMd5, @Param("menderId") int menderId);
+
+ void updateStatus(@Param("id") int id, @Param("code") byte code);
+
+ List<Script> selectBySelectiveAndPage(@Param("script") Script script, @Param("start") int start, @Param("offset") int offset);
+
+ Script selectByNameAndCreatorAndStatusNotEq(@Param("name") String name, @Param("creatorId") int creatorId, @Param("status") byte status);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/ScriptParamMapper.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/ScriptParamMapper.java
new file mode 100644
index 000000000..aa473c458
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/ScriptParamMapper.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.mapper;
+
+import org.apache.seatunnel.app.dal.entity.ScriptParam;
+
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ScriptParamMapper {
+ ScriptParam selectByPrimaryKey(Integer id);
+
+ List<ScriptParam> selectByScriptId(@Param("scriptId") int scriptId);
+
+ void updateStatusByScriptId(@Param("scriptId") int scriptId, @Param("code") byte code);
+
+ void batchInsert(@Param("params") List<ScriptParam> params);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/UserMapper.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/UserMapper.java
new file mode 100644
index 000000000..9b8cc58a9
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/UserMapper.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.dal.mapper;
+
+import org.apache.seatunnel.app.dal.entity.User;
+
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface UserMapper {
+ User selectByPrimaryKey(@Param("id") Integer id);
+
+ void insert(User user);
+
+ int updateByPrimaryKey(User user);
+
+ void deleteByPrimaryKey(@Param("id") int id);
+
+ List<User> selectBySelectiveAndPage(@Param("user") User user, @Param("start") int start, @Param("offset") int offset);
+
+ void updateStatus(@Param("id") int id, @Param("status") byte status);
+
+ User selectByName(@Param("username") String username);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/AddEmptyScriptDto.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/AddEmptyScriptDto.java
new file mode 100644
index 000000000..f2245c4a5
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/AddEmptyScriptDto.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.dto.script;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Builder
+@Data
+public class AddEmptyScriptDto {
+ private String name;
+ private byte type;
+ private int creatorId;
+ private int menderId;
+ private byte status;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/CheckScriptDuplicateDto.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/CheckScriptDuplicateDto.java
new file mode 100644
index 000000000..f1c9576b1
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/CheckScriptDuplicateDto.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.dto.script;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Builder
+@Data
+public class CheckScriptDuplicateDto {
+ private String name;
+ private Integer creatorId;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/ListScriptsDto.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/ListScriptsDto.java
new file mode 100644
index 000000000..8d15cccdc
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/ListScriptsDto.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.dto.script;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Builder
+@Data
+public class ListScriptsDto {
+ private String name;
+ private Byte status;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/UpdateScriptContentDto.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/UpdateScriptContentDto.java
new file mode 100644
index 000000000..b0bf1c1a3
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/UpdateScriptContentDto.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.dto.script;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Builder
+@Data
+public class UpdateScriptContentDto {
+ private int id;
+ private String content;
+ private String contentMd5;
+ private int menderId;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/UpdateScriptParamDto.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/UpdateScriptParamDto.java
new file mode 100644
index 000000000..69f7551d3
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/UpdateScriptParamDto.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.dto.script;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.util.Map;
+
+@Builder
+@Data
+public class UpdateScriptParamDto {
+ private int scriptId;
+ private Map<String, String> params;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/user/ListUserDto.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/user/ListUserDto.java
new file mode 100644
index 000000000..5fe208918
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/user/ListUserDto.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.dto.user;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Builder
+@Data
+public class ListUserDto {
+ private String name;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/user/UpdateUserDto.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/user/UpdateUserDto.java
new file mode 100644
index 000000000..d65383ed8
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/user/UpdateUserDto.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.dto.user;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Builder
+@Data
+public class UpdateUserDto {
+ private Integer id;
+ private String username;
+ private String password;
+ private int status;
+ private int type;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/AddEmptyScriptReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/AddEmptyScriptReq.java
new file mode 100644
index 000000000..cae5913d3
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/AddEmptyScriptReq.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.script;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "addEmptyScriptReq", description = "add a new empty script")
+public class AddEmptyScriptReq {
+ @ApiModelProperty(value = "script name", required = true, dataType = "String")
+ private String name;
+ @ApiModelProperty(value = "script type", required = true, dataType = "Byte")
+ @NotNull
+ private Byte type;
+ @ApiModelProperty(value = "script creator id", required = true, dataType = "Integer")
+ @NotNull
+ private Integer creatorId;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/ScriptListReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/ScriptListReq.java
new file mode 100644
index 000000000..5bb301029
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/ScriptListReq.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.script;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel(value = "scriptListReq", description = "script list")
+@Data
+public class ScriptListReq {
+ @ApiModelProperty(value = "script name", required = false, dataType = "String")
+ private String name;
+ @ApiModelProperty(value = "script status", required = false, dataType = "Integer")
+ private Byte status;
+ @ApiModelProperty(value = "page number", required = true, dataType = "Integer")
+ private Integer pageNo;
+ @ApiModelProperty(value = "page size", required = true, dataType = "Integer")
+ private Integer pageSize;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/UpdateScriptContentReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/UpdateScriptContentReq.java
new file mode 100644
index 000000000..7ee1270e2
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/UpdateScriptContentReq.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.script;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "updateScriptContentReq", description = "update an exist script content request")
+public class UpdateScriptContentReq {
+ @ApiModelProperty(value = "script id", required = true, dataType = "Integer")
+ @NotNull
+ private Integer id;
+ @ApiModelProperty(value = "script id", required = true, dataType = "Integer")
+ @NotBlank
+ private String content;
+ @ApiModelProperty(value = "script mender id", required = true, dataType = "Integer")
+ @NotNull
+ private Integer menderId;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/UpdateScriptParamReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/UpdateScriptParamReq.java
new file mode 100644
index 000000000..985637899
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/script/UpdateScriptParamReq.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.script;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+
+import java.util.Map;
+
+@Data
+@ApiModel(value = "update", description = "update script param request")
+public class UpdateScriptParamReq {
+ private Integer scriptId;
+ @NotEmpty
+ private Map<String, String> params;
+
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/AddUserReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/AddUserReq.java
new file mode 100644
index 000000000..fab6512d3
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/AddUserReq.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.user;
+
+import io.swagger.annotations.ApiModel;
+
+@ApiModel(value = "addUserReq", description = "add a new user request")
+public class AddUserReq extends BaseUserReq{
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/BaseUserReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/BaseUserReq.java
new file mode 100644
index 000000000..8ee3b6713
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/BaseUserReq.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.user;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class BaseUserReq {
+ @ApiModelProperty(value = "user name", required = true, dataType = "String")
+ private String username;
+ @ApiModelProperty(value = "user password", required = true, dataType = "String")
+ private String password;
+ @ApiModelProperty(value = "user status", required = true, dataType = "Byte")
+ @NotNull
+ private Byte status;
+ @ApiModelProperty(value = "user type", required = true, dataType = "Byte")
+ @NotNull
+ private Byte type;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/UpdateUserReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/UpdateUserReq.java
new file mode 100644
index 000000000..39f73e441
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/UpdateUserReq.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.user;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@ApiModel(value = "updateUserReq", description = "update an exists user request")
+@Data
+public class UpdateUserReq extends BaseUserReq{
+ @ApiModelProperty(value = "user id", required = true, dataType = "Integer")
+ @NotNull
+ private Integer id;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/UserListReq.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/UserListReq.java
new file mode 100644
index 000000000..186e69f83
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/user/UserListReq.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.request.user;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel(value = "userListReq", description = "user list")
+@Data
+public class UserListReq {
+ @ApiModelProperty(value = "user name", required = false, dataType = "String")
+ private String name;
+ @ApiModelProperty(value = "page number", required = true, dataType = "Integer")
+ private Integer pageNo;
+ @ApiModelProperty(value = "page size", required = true, dataType = "Integer")
+ private Integer pageSize;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/AddEmptyScriptRes.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/AddEmptyScriptRes.java
new file mode 100644
index 000000000..1037f9f8f
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/AddEmptyScriptRes.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.response.script;
+
+import lombok.Data;
+
+@Data
+public class AddEmptyScriptRes {
+ private int id;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/BaseScriptInfoRes.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/BaseScriptInfoRes.java
new file mode 100644
index 000000000..435805820
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/BaseScriptInfoRes.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.response.script;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class BaseScriptInfoRes {
+ @ApiModelProperty(value = "script id", dataType = "int")
+ private int id;
+ @ApiModelProperty(value = "script name", dataType = "String")
+ private String name;
+ @ApiModelProperty(value = "script status", dataType = "type")
+ private byte status;
+ @ApiModelProperty(value = "script type", dataType = "type")
+ private byte type;
+ @ApiModelProperty(value = "script creator id", required = true, dataType = "Integer")
+ private Integer creatorId;
+ @ApiModelProperty(value = "script mender id", required = true, dataType = "Integer")
+ private Integer menderId;
+ @ApiModelProperty(value = "script create time", dataType = "Date")
+ private Date createTime;
+ @ApiModelProperty(value = "script update time", dataType = "Date")
+ private Date updateTime;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/ScriptParamRes.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/ScriptParamRes.java
new file mode 100644
index 000000000..ae9e61618
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/ScriptParamRes.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.response.script;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "scriptParamRes", description = "script param")
+public class ScriptParamRes {
+ @ApiModelProperty(value = "script param id", dataType = "String")
+ private int id;
+ @ApiModelProperty(value = "script param key", dataType = "String")
+ private String key;
+ @ApiModelProperty(value = "script param value", dataType = "String")
+ private String value;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/ScriptSimpleInfoRes.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/ScriptSimpleInfoRes.java
new file mode 100644
index 000000000..82de8886d
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/script/ScriptSimpleInfoRes.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.response.script;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@ApiModel(value = "scriptSimpleInfoRes", description = "script simple information")
+@Data
+public class ScriptSimpleInfoRes extends BaseScriptInfoRes {
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/AddUserRes.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/AddUserRes.java
new file mode 100644
index 000000000..0712dc75a
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/AddUserRes.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.response.user;
+
+import lombok.Data;
+
+@Data
+public class AddUserRes {
+ private int id;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/BaseUserInfoRes.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/BaseUserInfoRes.java
new file mode 100644
index 000000000..a50a2cea9
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/BaseUserInfoRes.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.response.user;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class BaseUserInfoRes {
+ @ApiModelProperty(value = "user id", dataType = "int")
+ private int id;
+ @ApiModelProperty(value = "user name", dataType = "String")
+ private String name;
+ @ApiModelProperty(value = "user status", dataType = "type")
+ private byte status;
+ @ApiModelProperty(value = "user type", dataType = "type")
+ private byte type;
+ @ApiModelProperty(value = "user create time", dataType = "Date")
+ private Date createTime;
+ @ApiModelProperty(value = "user update time", dataType = "Date")
+ private Date updateTime;
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/UserSimpleInfoRes.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/UserSimpleInfoRes.java
new file mode 100644
index 000000000..3c18064ed
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/user/UserSimpleInfoRes.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.domain.response.user;
+
+import io.swagger.annotations.ApiModel;
+
+@ApiModel(value = "userSimpleInfoRes", description = "user simple information")
+public class UserSimpleInfoRes extends BaseUserInfoRes{
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/IScriptService.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/IScriptService.java
new file mode 100644
index 000000000..7aee7de45
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/IScriptService.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.service;
+
+import org.apache.seatunnel.app.domain.request.script.AddEmptyScriptReq;
+import org.apache.seatunnel.app.domain.request.script.ScriptListReq;
+import org.apache.seatunnel.app.domain.request.script.UpdateScriptContentReq;
+import org.apache.seatunnel.app.domain.request.script.UpdateScriptParamReq;
+import org.apache.seatunnel.app.domain.response.script.AddEmptyScriptRes;
+import org.apache.seatunnel.app.domain.response.script.ScriptParamRes;
+import org.apache.seatunnel.app.domain.response.script.ScriptSimpleInfoRes;
+
+import java.util.List;
+
+public interface IScriptService {
+ AddEmptyScriptRes addEmptyScript(AddEmptyScriptReq addEmptyScriptReq);
+
+ void updateScriptContent(UpdateScriptContentReq updateScriptContentReq);
+
+ void delete(Integer id);
+
+ List<ScriptSimpleInfoRes> list(ScriptListReq scriptListReq);
+
+ String fetchScriptContent(Integer id);
+
+ List<ScriptParamRes> fetchScriptParam(Integer id);
+
+ void updateScriptParam(UpdateScriptParamReq updateScriptParamReq);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/IUserService.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/IUserService.java
new file mode 100644
index 000000000..da89f2c76
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/IUserService.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.service;
+
+import org.apache.seatunnel.app.domain.request.user.AddUserReq;
+import org.apache.seatunnel.app.domain.request.user.UpdateUserReq;
+import org.apache.seatunnel.app.domain.request.user.UserListReq;
+import org.apache.seatunnel.app.domain.response.user.AddUserRes;
+import org.apache.seatunnel.app.domain.response.user.UserSimpleInfoRes;
+
+import java.util.List;
+
+public interface IUserService {
+
+ AddUserRes add(AddUserReq addReq);
+
+ void update(UpdateUserReq updateReq);
+
+ void delete(int id);
+
+ List<UserSimpleInfoRes> list(UserListReq userListReq);
+
+ void enable(int id);
+
+ void disable(int id);
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/ScriptServiceImpl.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/ScriptServiceImpl.java
new file mode 100644
index 000000000..13f41af71
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/ScriptServiceImpl.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.service.impl;
+
+import static org.apache.seatunnel.app.common.SeatunnelErrorEnum.NO_SUCH_SCRIPT;
+import static com.google.common.base.Preconditions.checkState;
+
+import org.apache.seatunnel.app.common.ScriptParamStatusEnum;
+import org.apache.seatunnel.app.common.ScriptStatusEnum;
+import org.apache.seatunnel.app.dal.dao.IScriptDao;
+import org.apache.seatunnel.app.dal.dao.IScriptParamDao;
+import org.apache.seatunnel.app.dal.entity.Script;
+import org.apache.seatunnel.app.dal.entity.ScriptParam;
+import org.apache.seatunnel.app.domain.dto.script.AddEmptyScriptDto;
+import org.apache.seatunnel.app.domain.dto.script.CheckScriptDuplicateDto;
+import org.apache.seatunnel.app.domain.dto.script.ListScriptsDto;
+import org.apache.seatunnel.app.domain.dto.script.UpdateScriptContentDto;
+import org.apache.seatunnel.app.domain.dto.script.UpdateScriptParamDto;
+import org.apache.seatunnel.app.domain.request.script.AddEmptyScriptReq;
+import org.apache.seatunnel.app.domain.request.script.ScriptListReq;
+import org.apache.seatunnel.app.domain.request.script.UpdateScriptContentReq;
+import org.apache.seatunnel.app.domain.request.script.UpdateScriptParamReq;
+import org.apache.seatunnel.app.domain.response.script.AddEmptyScriptRes;
+import org.apache.seatunnel.app.domain.response.script.ScriptParamRes;
+import org.apache.seatunnel.app.domain.response.script.ScriptSimpleInfoRes;
+import org.apache.seatunnel.app.service.IScriptService;
+import org.apache.seatunnel.app.util.Md5Utils;
+
+import com.google.common.base.Strings;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+@Component
+public class ScriptServiceImpl implements IScriptService {
+
+ @Resource
+ private IScriptDao scriptDaoImpl;
+
+ @Resource
+ private IScriptParamDao scriptParamDaoImpl;
+
+ @Override
+ public AddEmptyScriptRes addEmptyScript(AddEmptyScriptReq addEmptyScriptReq) {
+ // 1. check script name.
+ checkDuplicate(addEmptyScriptReq.getName(), addEmptyScriptReq.getCreatorId());
+ // 2. create an empty script
+ int scriptId = addEmptyScript(addEmptyScriptReq.getName(), addEmptyScriptReq.getCreatorId(), addEmptyScriptReq.getCreatorId(), addEmptyScriptReq.getType());
+
+ final AddEmptyScriptRes res = new AddEmptyScriptRes();
+ res.setId(scriptId);
+ return res;
+ }
+
+ private int addEmptyScript(String name, Integer creatorId, Integer menderId, Byte type) {
+ final AddEmptyScriptDto dto = AddEmptyScriptDto.builder()
+ .name(name)
+ .menderId(creatorId)
+ .creatorId(menderId)
+ .type(type)
+ .status((byte) ScriptStatusEnum.UNPUBLISHED.getCode())
+ .build();
+ return scriptDaoImpl.addEmptyScript(dto);
+ }
+
+ private void checkDuplicate(String name, Integer creatorId) {
+ final CheckScriptDuplicateDto dto = CheckScriptDuplicateDto.builder()
+ .creatorId(creatorId)
+ .name(name)
+ .build();
+ scriptDaoImpl.checkScriptDuplicate(dto);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void updateScriptContent(UpdateScriptContentReq updateScriptContentReq) {
+ // 1. check content md5 is consistent
+ final String content = updateScriptContentReq.getContent();
+ final String contentMd5 = Strings.isNullOrEmpty(content) ? "" : Md5Utils.toMd5(content);
+
+ final boolean needSave = checkIfNeedSave(updateScriptContentReq.getId(), contentMd5);
+
+ if (needSave){
+ final UpdateScriptContentDto dto = UpdateScriptContentDto.builder()
+ .id(updateScriptContentReq.getId())
+ .content(content)
+ .contentMd5(contentMd5)
+ .menderId(updateScriptContentReq.getMenderId())
+ .build();
+ scriptDaoImpl.updateScriptContent(dto);
+ }
+ }
+
+ private boolean checkIfNeedSave(int id, String newContentMd5) {
+ Script script = scriptDaoImpl.getScript(id);
+ checkState(Objects.nonNull(script) && (int) script.getStatus() != ScriptStatusEnum.DELETED.getCode(), NO_SUCH_SCRIPT.getTemplate());
+
+ final String oldContentMd5 = Strings.isNullOrEmpty(script.getContentMd5()) ? "" : script.getContentMd5();
+ return !newContentMd5.equals(oldContentMd5);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(Integer id) {
+ // no need check script if exist.
+ scriptDaoImpl.deleteScript(id);
+ }
+
+ @Override
+ public List<ScriptSimpleInfoRes> list(ScriptListReq scriptListReq) {
+
+ final ListScriptsDto dto = ListScriptsDto.builder()
+ .name(scriptListReq.getName())
+ .status(scriptListReq.getStatus())
+ .build();
+
+ List<Script> scripts = scriptDaoImpl.list(dto, scriptListReq.getPageNo(), scriptListReq.getPageSize());
+ return scripts.stream().map(this::translate).collect(Collectors.toList());
+ }
+
+ @Override
+ public String fetchScriptContent(Integer id) {
+ Script script = scriptDaoImpl.getScript(id);
+ checkState(Objects.nonNull(script), NO_SUCH_SCRIPT.getTemplate());
+ return script.getContent();
+ }
+
+ @Override
+ public List<ScriptParamRes> fetchScriptParam(Integer id) {
+ List<ScriptParam> scriptParamRes = scriptParamDaoImpl.getParamsByScriptId(id);
+ if (CollectionUtils.isEmpty(scriptParamRes)){
+ return Collections.emptyList();
+ }
+ return scriptParamRes.stream().map(this::translate).collect(Collectors.toList());
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void updateScriptParam(UpdateScriptParamReq updateScriptParamReq) {
+ // 1. delete all old params first.
+ // 2. save new params. (check params correctness)
+ scriptParamDaoImpl.updateStatusByScriptId(updateScriptParamReq.getScriptId(), ScriptParamStatusEnum.DELETED.getCode());
+
+ UpdateScriptParamDto dto = UpdateScriptParamDto.builder()
+ .scriptId(updateScriptParamReq.getScriptId())
+ .params(updateScriptParamReq.getParams())
+ .build();
+
+ scriptParamDaoImpl.batchInsert(dto);
+ }
+
+ private ScriptParamRes translate(ScriptParam scriptParam) {
+ final ScriptParamRes res = new ScriptParamRes();
+ res.setId(scriptParam.getId());
+ res.setKey(scriptParam.getKey());
+ res.setValue(scriptParam.getValue());
+ return res;
+ }
+
+ private ScriptSimpleInfoRes translate(Script script) {
+ final ScriptSimpleInfoRes res = new ScriptSimpleInfoRes();
+ res.setId(script.getId());
+ res.setName(script.getName());
+ res.setStatus(script.getStatus());
+ res.setType(script.getType());
+ res.setCreatorId(script.getCreatorId());
+ res.setMenderId(script.getMenderId());
+ res.setCreateTime(script.getCreateTime());
+ res.setUpdateTime(script.getUpdateTime());
+ return res;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/UserServiceImpl.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/UserServiceImpl.java
new file mode 100644
index 000000000..ce8cb86d4
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/UserServiceImpl.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.service.impl;
+
+import org.apache.seatunnel.app.dal.dao.IUserDao;
+import org.apache.seatunnel.app.dal.entity.User;
+import org.apache.seatunnel.app.domain.dto.user.ListUserDto;
+import org.apache.seatunnel.app.domain.dto.user.UpdateUserDto;
+import org.apache.seatunnel.app.domain.request.user.AddUserReq;
+import org.apache.seatunnel.app.domain.request.user.UpdateUserReq;
+import org.apache.seatunnel.app.domain.request.user.UserListReq;
+import org.apache.seatunnel.app.domain.response.user.AddUserRes;
+import org.apache.seatunnel.app.domain.response.user.UserSimpleInfoRes;
+import org.apache.seatunnel.app.service.IUserService;
+import org.apache.seatunnel.app.util.PasswordUtils;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+public class UserServiceImpl implements IUserService {
+ @Resource
+ private IUserDao userDaoImpl;
+
+ @Value("${user.default.passwordSalt:seatunnel}")
+ private String defaultSalt;
+
+ @Override
+ public AddUserRes add(AddUserReq addReq) {
+ // 1. check duplicate user first
+ userDaoImpl.checkUserExists(addReq.getUsername());
+
+ // 2. add a new user.
+ final UpdateUserDto dto = UpdateUserDto.builder()
+ .id(null)
+ .username(addReq.getUsername())
+ // encryption user's password
+ .password(PasswordUtils.encryptWithSalt(defaultSalt, addReq.getPassword()))
+ .status(addReq.getStatus())
+ .type(addReq.getType())
+ .build();
+
+ final int userId = userDaoImpl.add(dto);
+ final AddUserRes res = new AddUserRes();
+ res.setId(userId);
+ return res;
+ }
+
+ @Override
+ public void update(UpdateUserReq updateReq) {
+ final UpdateUserDto dto = UpdateUserDto.builder()
+ .id(updateReq.getId())
+ .username(updateReq.getUsername())
+ // encryption user's password
+ .password(PasswordUtils.encryptWithSalt(defaultSalt, updateReq.getPassword()))
+ .status(updateReq.getStatus())
+ .type(updateReq.getType())
+ .build();
+
+ userDaoImpl.update(dto);
+ }
+
+ @Override
+ public void delete(int id) {
+ userDaoImpl.delete(id);
+ }
+
+ @Override
+ public List<UserSimpleInfoRes> list(UserListReq userListReq) {
+
+ final ListUserDto dto = ListUserDto.builder()
+ .name(userListReq.getName())
+ .build();
+
+ List<User> userList = userDaoImpl.list(dto, userListReq.getPageNo(), userListReq.getPageSize());
+ return userList.stream().map(this::translate).collect(Collectors.toList());
+ }
+
+ @Override
+ public void enable(int id) {
+ userDaoImpl.enable(id);
+ }
+
+ @Override
+ public void disable(int id) {
+ userDaoImpl.disable(id);
+ }
+
+ private UserSimpleInfoRes translate(User user) {
+ final UserSimpleInfoRes info = new UserSimpleInfoRes();
+ info.setId(user.getId());
+ info.setStatus(user.getStatus());
+ info.setType(user.getType());
+ info.setCreateTime(user.getCreateTime());
+ info.setUpdateTime(user.getUpdateTime());
+ info.setName(user.getUsername());
+ return info;
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/GlobalExceptionHandler.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/GlobalExceptionHandler.java
new file mode 100644
index 000000000..3b3678c30
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/GlobalExceptionHandler.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.util;
+
+import org.apache.seatunnel.app.common.Result;
+import org.apache.seatunnel.app.common.SeatunnelErrorEnum;
+import org.apache.seatunnel.app.common.SeatunnelException;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+import java.util.Optional;
+
+@RestControllerAdvice
+@Slf4j
+public class GlobalExceptionHandler {
+
+ @ExceptionHandler(value = SeatunnelException.class)
+ private Result<String> portalExceptionHandler(SeatunnelException e) {
+ logError(e);
+
+ final SeatunnelException seatunnelException = Optional.ofNullable(e).orElse(SeatunnelException.newInstance(SeatunnelErrorEnum.UNKNOWN));
+
+ final String message = seatunnelException.getMessage();
+ final SeatunnelErrorEnum errorEnum = seatunnelException.getErrorEnum();
+
+ return Result.failure(errorEnum, message);
+ }
+
+ @ExceptionHandler(value = IllegalStateException.class)
+ private Result<String> exceptionHandler(IllegalStateException e) {
+ logError(e);
+ return Result.failure(SeatunnelErrorEnum.ILLEGAL_STATE, e.getMessage());
+ }
+
+ @ExceptionHandler(value = Exception.class)
+ private Result<String> exceptionHandler(Exception e) {
+ logError(e);
+ return Result.failure(SeatunnelErrorEnum.UNKNOWN);
+ }
+
+ private void logError(Throwable throwable) {
+ log.error("", throwable);
+ }
+
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/Md5Utils.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/Md5Utils.java
new file mode 100644
index 000000000..d3a40c27b
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/Md5Utils.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.util;
+
+import org.springframework.util.DigestUtils;
+
+import java.nio.charset.StandardCharsets;
+
+public class Md5Utils {
+ private Md5Utils() {
+ }
+
+ public static String toMd5(String origin) {
+ return DigestUtils.md5DigestAsHex(origin.getBytes(StandardCharsets.UTF_8));
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/PasswordUtils.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/PasswordUtils.java
new file mode 100644
index 000000000..60e082584
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/util/PasswordUtils.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.app.util;
+
+import org.springframework.util.DigestUtils;
+
+import javax.validation.constraints.NotBlank;
+
+import java.nio.charset.StandardCharsets;
+
+public class PasswordUtils {
+ public static String encryptWithSalt(@NotBlank String salt, @NotBlank String password){
+ return DigestUtils.md5DigestAsHex(salt.concat(password).getBytes(StandardCharsets.UTF_8));
+ }
+}
diff --git a/seatunnel-server/seatunnel-app/src/main/resources/application.yml b/seatunnel-server/seatunnel-app/src/main/resources/application.yml
new file mode 100644
index 000000000..0c62be516
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/resources/application.yml
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+spring:
+ application:
+ name: seatunnel
+ datasource:
+ driver-class-name: com.mysql.jdbc.Driver
+ url: jdbc:mysql://127.0.0.1:3306/seatunnel?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
+ username: root
+ password: 123456
\ No newline at end of file
diff --git a/seatunnel-server/seatunnel-app/src/main/resources/logback-spring.xml b/seatunnel-server/seatunnel-app/src/main/resources/logback-spring.xml
new file mode 100644
index 000000000..eb41353f7
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/resources/logback-spring.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration scan="true" scanPeriod="10 seconds">
+ <springProperty scope="context" name="APP_NAME" source="spring.application.name"/>
+ <property name="APP_LOG_PATH" value="./logs" />
+ <property name="HOST_NAME" value="${HOSTNAME:-UNKNOWN}"/>
+ <property name="TRACE" value="[tr:%X{X-B3-TraceId:-},sp:%X{X-B3-SpanId:-}]"/>
+ <include resource="org/springframework/boot/logging/logback/defaults.xml" />
+
+ <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${APP_NAME} ${HOST_NAME} %p ${TRACE} [%thread] [%C{0}.%M\(\):%L] - %m%n</pattern>
+ <charset>UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <appender name="thirdPartyAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${APP_LOG_PATH}/thirdParty.${APP_NAME}.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <FileNamePattern>${APP_LOG_PATH}/thirdParty.${APP_NAME}.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
+ <MaxHistory>30</MaxHistory>
+ <MaxFileSize>100MB</MaxFileSize>
+ </rollingPolicy>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${APP_NAME} ${HOST_NAME} %p [%thread] [%C{0}.%M\(\):%L] - %m%n</pattern>
+ <charset>UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <logger name="org.apache.seatunnel.app.dal.mapper" level="DEBUG" additivity="false">
+ <appender-ref ref="console" />
+ </logger>
+
+ <logger name="org.springframework" level="INFO" additivity="false">
+ <appender-ref ref="thirdPartyAppender" />
+ <appender-ref ref="console" />
+ </logger>
+
+ <root level="INFO">
+ <appender-ref ref="console" />
+ </root>
+</configuration>
diff --git a/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/ScriptMapper.xml b/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/ScriptMapper.xml
new file mode 100644
index 000000000..210b4d769
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/ScriptMapper.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.seatunnel.app.dal.mapper.ScriptMapper">
+ <resultMap id="BaseResultMap" type="org.apache.seatunnel.app.dal.entity.Script">
+ <id column="id" jdbcType="INTEGER" property="id"/>
+ <result column="name" jdbcType="VARCHAR" property="name"/>
+ <result column="type" jdbcType="TINYINT" property="type"/>
+ <result column="status" jdbcType="TINYINT" property="status"/>
+ <result column="content" jdbcType="LONGVARCHAR" property="content"/>
+ <result column="content_md5" jdbcType="VARCHAR" property="contentMd5"/>
+ <result column="creator_id" jdbcType="INTEGER" property="creatorId"/>
+ <result column="mender_id" jdbcType="INTEGER" property="menderId"/>
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+ </resultMap>
+ <sql id="Base_Column_List">
+ id,
+ `name`,
+ `type`,
+ `status`,
+ content,
+ content_md5,
+ creator_id,
+ mender_id,
+ create_time,
+ update_time
+ </sql>
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="org.apache.seatunnel.app.dal.entity.Script"
+ useGeneratedKeys="true">
+ insert into `script` (name, type, status, creator_id, mender_id)
+ VALUES (#{name,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{status,jdbcType=TINYINT},
+ #{creatorId,jdbcType=INTEGER},
+ #{menderId,jdbcType=INTEGER})
+ </insert>
+ <update id="updateContentByPrimaryKey">
+ update `script`
+ set `content` = #{content,jdbcType=VARCHAR},
+ `content_md5` = #{contentMd5,jdbcType=VARCHAR},
+ `mender_id` = #{menderId, jdbcType=INTEGER}
+ where id = #{id,jdbcType=INTEGER}
+ </update>
+ <update id="updateStatus">
+ update `script`
+ set `status` = #{code,jdbcType=TINYINT}
+ where id = #{id,jdbcType=INTEGER}
+ </update>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+ select
+ <include refid="Base_Column_List"/>
+ from script
+ where id = #{id,jdbcType=INTEGER}
+ </select>
+ <select id="selectBySelectiveAndPage" resultMap="BaseResultMap">
+ select
+ *
+ from script
+ <where>
+ <if test="script.name != null and script.name != ''">
+ and `name` = #{script.name,jdbcType=VARCHAR}
+ </if>
+ <if test="script.status != null">
+ and `status` = #{script.status,jdbcType=TINYINT}
+ </if>
+ </where>
+ limit #{start,jdbcType=INTEGER}, #{offset,jdbcType=INTEGER}
+ </select>
+ <select id="selectByNameAndCreatorAndStatusNotEq" resultMap="BaseResultMap">
+ select
+ <include refid="Base_Column_List"/>
+ from script
+ where `name` = #{name,jdbcType=VARCHAR}
+ and `creator_id` = #{creatorId,jdbcType=INTEGER}
+ and `status` != #{status,jdbcType=TINYINT}
+ </select>
+</mapper>
diff --git a/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/ScriptParamMapper.xml b/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/ScriptParamMapper.xml
new file mode 100644
index 000000000..6971fc8cd
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/ScriptParamMapper.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.seatunnel.app.dal.mapper.ScriptParamMapper">
+ <resultMap id="BaseResultMap" type="org.apache.seatunnel.app.dal.entity.ScriptParam">
+ <id column="id" jdbcType="INTEGER" property="id"/>
+ <result column="script_id" jdbcType="INTEGER" property="scriptId"/>
+ <result column="key" jdbcType="VARCHAR" property="key"/>
+ <result column="value" jdbcType="VARCHAR" property="value"/>
+ <result column="status" jdbcType="TINYINT" property="status"/>
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+ </resultMap>
+ <sql id="Base_Column_List">
+ id,
+ script_id,
+ `key`,
+ `value`,
+ `status`,
+ create_time,
+ update_time
+ </sql>
+ <insert id="batchInsert" parameterType="map">
+ insert into `script_param` (`script_id`, `key`, `value`, `status`)
+ values
+ <foreach collection="params" item="item" separator=",">
+ (#{item.scriptId,jdbcType=INTEGER}, #{item.key,jdbcType=VARCHAR}, #{item.value,jdbcType=VARCHAR},
+ #{item.status,jdbcType=TINYINT})
+ </foreach>
+ </insert>
+ <update id="updateStatusByScriptId">
+ update `script_param`
+ set `status` = #{code, jdbcType=TINYINT}
+ where `script_id` = #{scriptId, jdbcType=INTEGER}
+ </update>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+ select
+ <include refid="Base_Column_List"/>
+ from script_param
+ where id = #{id,jdbcType=INTEGER}
+ </select>
+ <select id="selectByScriptId" resultType="org.apache.seatunnel.app.dal.entity.ScriptParam">
+ select
+ <include refid="Base_Column_List"/>
+ from script_param
+ where script_id = #{scriptId,jdbcType=INTEGER}
+ and `status` != 1
+ </select>
+</mapper>
diff --git a/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/UserMapper.xml b/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/UserMapper.xml
new file mode 100644
index 000000000..d68d8828a
--- /dev/null
+++ b/seatunnel-server/seatunnel-app/src/main/resources/org/apache/seatunnel/app/dal/mapper/UserMapper.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.seatunnel.app.dal.mapper.UserMapper">
+ <resultMap id="BaseResultMap" type="org.apache.seatunnel.app.dal.entity.User">
+ <id column="id" jdbcType="INTEGER" property="id"/>
+ <result column="username" jdbcType="VARCHAR" property="username"/>
+ <result column="password" jdbcType="VARCHAR" property="password"/>
+ <result column="status" jdbcType="TINYINT" property="status"/>
+ <result column="type" jdbcType="TINYINT" property="type"/>
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+ </resultMap>
+ <sql id="Base_Column_List">
+ id,
+ username,
+ `password`,
+ `status`,
+ `type`,
+ create_time,
+ update_time
+ </sql>
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="org.apache.seatunnel.app.dal.entity.User"
+ useGeneratedKeys="true">
+ insert into `user` (username, password, status, type)
+ value (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT},
+ #{type,jdbcType=TINYINT})
+ </insert>
+ <update id="updateByPrimaryKey">
+ update `user`
+ set username = #{username,jdbcType=VARCHAR},
+ password = #{password,jdbcType=VARCHAR},
+ status = #{status,jdbcType=TINYINT},
+ type = #{type,jdbcType=TINYINT}
+ where id = #{id,jdbcType=INTEGER}
+ </update>
+ <update id="updateStatus">
+ update `user`
+ set status = #{status,jdbcType=TINYINT}
+ where id = #{id,jdbcType=INTEGER}
+ </update>
+ <delete id="deleteByPrimaryKey">
+ delete
+ from `user`
+ where id = #{id,jdbcType=INTEGER}
+ </delete>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+ select
+ <include refid="Base_Column_List"/>
+ from `user`
+ where id = #{id,jdbcType=INTEGER}
+ </select>
+ <select id="selectBySelectiveAndPage" resultType="org.apache.seatunnel.app.dal.entity.User">
+ select
+ <include refid="Base_Column_List"/>
+ from `user`
+ <where>
+ <if test="user.username != null and user.username != ''">
+ and `username` = #{user.username,jdbcType=VARCHAR}
+ </if>
+ </where>
+ limit #{start,jdbcType=INTEGER}, #{offset,jdbcType=INTEGER}
+ </select>
+ <select id="selectByName" resultType="org.apache.seatunnel.app.dal.entity.User">
+ select
+ <include refid="Base_Column_List"/>
+ from `user`
+ where username = #{username,jdbcType=VARCHAR}
+ </select>
+</mapper>
diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt
index 3573a8292..683e35dd8 100755
--- a/tools/dependencies/known-dependencies.txt
+++ b/tools/dependencies/known-dependencies.txt
@@ -71,6 +71,7 @@ checker-qual-3.4.0.jar
chill-java-0.9.3.jar
chill_2.11-0.9.3.jar
classmate-1.1.0.jar
+classmate-1.3.1.jar
clickhouse-client-0.3.2-patch9.jar
clickhouse-grpc-client-0.3.2-patch9-netty.jar
clickhouse-http-client-0.3.2-patch9-shaded.jar
@@ -272,6 +273,8 @@ hbase-spark-1.0.0.jar
hbase-zookeeper-2.0.0.jar
hbase-zookeeper-2.1.0.jar
hibernate-validator-5.2.5.Final.jar
+hibernate-validator-6.2.2.Final.jar
+HikariCP-4.0.3.jar
hive-beeline-1.2.1.spark2.jar
hive-cli-1.2.1.spark2.jar
hive-common-2.3.9.jar
@@ -335,6 +338,8 @@ jackson-dataformat-yaml-2.10.0.jar
jackson-dataformat-yaml-2.8.10.jar
jackson-dataformat-yaml-2.8.11.jar
jackson-datatype-guava-2.10.5.jar
+jackson-datatype-jdk8-2.13.3.jar
+jackson-datatype-jsr310-2.13.3.jar
jackson-datatype-joda-2.10.5.jar
jackson-jaxrs-1.9.13.jar
jackson-jaxrs-base-2.10.5.jar
@@ -348,11 +353,16 @@ jackson-mapper-asl-1.9.2.jar
jackson-module-guice-2.10.5.jar
jackson-module-jaxb-annotations-2.10.5.jar
jackson-module-jaxb-annotations-2.7.8.jar
+jackson-module-parameter-names-2.13.3.jar
jackson-xc-1.9.13.jar
jakarta.activation-api-1.2.1.jar
+jakarta.annotation-api-1.3.5.jar
+jakarta.servlet-api-4.0.4.jar
jakarta.activation-api-1.2.2.jar
jakarta.ws.rs-api-2.1.6.jar
jakarta.xml.bind-api-2.3.2.jar
+jakarta.validation-api-2.0.2.jar
+jakarta.websocket-api-1.1.2.jar
jakarta.xml.bind-api-2.3.3.jar
jamon-runtime-2.4.1.jar
janino-3.1.6.jar
@@ -381,8 +391,10 @@ jaxb-api-2.3.0.jar
jaxb-api-2.3.1.jar
jaxb-impl-2.2.3-1.jar
jboss-logging-3.2.1.Final.jar
+jboss-logging-3.4.1.Final.jar
jcip-annotations-1.0-1.jar
jcip-annotations-1.0.jar
+jul-to-slf4j-1.7.36.jar
jcl-over-slf4j-1.7.12.jar
jcl-over-slf4j-1.7.16.jar
jcl-over-slf4j-1.7.30.jar
@@ -415,28 +427,39 @@ jettison-1.3.8.jar
jetty-all-7.6.0.v20120127.jar
jetty-client-9.4.40.v20210413.jar
jetty-continuation-9.4.40.v20210413.jar
+jetty-continuation-9.4.46.v20220331.jar
jetty-http-9.3.19.v20170502.jar
jetty-http-9.4.40.v20210413.jar
+jetty-http-9.4.46.v20220331.jar
jetty-io-9.3.19.v20170502.jar
jetty-io-9.4.40.v20210413.jar
+jetty-io-9.4.46.v20220331.jar
jetty-proxy-9.4.40.v20210413.jar
jetty-security-9.3.19.v20170502.jar
jetty-security-9.4.40.v20210413.jar
+jetty-security-9.4.46.v20220331.jar
jetty-server-9.3.19.v20170502.jar
jetty-server-9.4.40.v20210413.jar
+jetty-server-9.4.46.v20220331.jar
jetty-servlet-9.3.19.v20170502.jar
jetty-servlet-9.4.40.v20210413.jar
+jetty-servlet-9.4.46.v20220331.jar
jetty-servlets-9.4.40.v20210413.jar
+jetty-servlets-9.4.46.v20220331.jar
jetty-sslengine-6.1.26.jar
jetty-6.1.26.jar
jets3t-0.9.0.jar
jetty-util-6.1.26.jar
jetty-util-9.3.19.v20170502.jar
jetty-util-9.4.40.v20210413.jar
+jetty-util-9.4.46.v20220331.jar
jetty-util-ajax-9.3.19.v20170502.jar
jetty-util-ajax-9.4.40.v20210413.jar
+jetty-util-ajax-9.4.46.v20220331.jar
jetty-webapp-9.3.19.v20170502.jar
+jetty-webapp-9.4.46.v20220331.jar
jetty-xml-9.3.19.v20170502.jar
+jetty-xml-9.4.46.v20220331.jar
jline-0.9.94.jar
jline-2.11.jar
jline-2.12.jar
@@ -504,6 +527,8 @@ log4j-api-2.9.1.jar
log4j-core-2.17.1.jar
log4j-jul-2.15.0.jar
log4j-slf4j-impl-2.15.0.jar
+logback-classic-1.2.11.jar
+logback-core-1.2.11.jar
logging-interceptor-4.9.1.jar
lucene-analyzers-common-7.3.1.jar
lucene-analyzers-common-8.3.0.jar
@@ -543,6 +568,7 @@ lz4-java-1.7.1.jar
lz4-java-1.8.0.jar
mail-1.4.1.jar
mapper-extras-client-7.5.1.jar
+mapstruct-1.0.0.Final.jar
maven-aether-provider-3.1.1.jar
maven-artifact-3.6.0.jar
maven-model-3.1.1.jar
@@ -562,6 +588,10 @@ mongo-java-driver-3.4.2.jar
mongo-spark-connector_2.11-2.2.0.jar
moshi-1.8.0.jar
msgpack-core-0.9.0.jar
+mybatis-3.5.9.jar
+mybatis-spring-2.0.7.jar
+mybatis-spring-boot-autoconfigure-2.2.2.jar
+mybatis-spring-boot-starter-2.2.2.jar
neo4j-connector-apache-spark_2.11-4.1.0_for_spark_2.4.jar
neo4j-connector-apache-spark_2.12_common-4.1.0.jar
neo4j-cypher-dsl-2020.1.4.jar
@@ -677,6 +707,7 @@ slf4j-api-1.7.25.jar
slf4j-log4j12-1.7.25.jar
snakeyaml-1.17.jar
snakeyaml-1.24.jar
+snakeyaml-1.29.jar
snappy-0.3.jar
snappy-java-1.1.8.3.jar
spark-catalyst_2.11-2.4.0.jar
@@ -693,6 +724,35 @@ sshd-common-2.7.0.jar
sshd-core-2.7.0.jar
sshd-scp-2.7.0.jar
stax-api-1.0.1.jar
+spring-aop-5.3.20.jar
+spring-beans-5.3.20.jar
+spring-boot-2.6.8.jar
+spring-boot-autoconfigure-2.6.8.jar
+spring-boot-starter-2.6.8.jar
+spring-boot-starter-jdbc-2.6.3.jar
+spring-boot-starter-jetty-2.6.8.jar
+spring-boot-starter-json-2.6.8.jar
+spring-boot-starter-logging-2.6.8.jar
+spring-boot-starter-web-2.6.8.jar
+spring-context-5.3.20.jar
+spring-core-5.3.20.jar
+spring-expression-5.3.20.jar
+spring-jcl-5.3.20.jar
+spring-jdbc-5.3.15.jar
+spring-plugin-core-1.2.0.RELEASE.jar
+spring-plugin-metadata-1.2.0.RELEASE.jar
+spring-tx-5.3.15.jar
+spring-web-5.3.20.jar
+spring-webmvc-5.3.20.jar
+springfox-core-2.6.1.jar
+springfox-schema-2.6.1.jar
+springfox-spi-2.6.1.jar
+springfox-spring-web-2.6.1.jar
+springfox-swagger-common-2.6.1.jar
+springfox-swagger-ui-2.6.1.jar
+springfox-swagger2-2.6.1.jar
+swagger-annotations-1.5.10.jar
+swagger-models-1.5.10.jar
stax-api-1.0-2.jar
stax2-api-3.1.4.jar
stream-2.7.0.jar
@@ -703,6 +763,7 @@ tephra-api-0.14.0-incubating.jar
tephra-core-0.14.0-incubating.jar
tephra-hbase-compat-2.0-0.14.0-incubating.jar
tesla-aether-0.0.5.jar
+tomcat-embed-el-9.0.63.jar
tikv-client-2.4.1.jar
tispark-assembly-2.4.1.jar
tispark-core-internal-2.4.1.jar