Browse Source

加入数据对接模块

wangliang 2 weeks ago
parent
commit
729d7bc8f3

+ 2 - 2
cas/pom.xml

@@ -4,13 +4,13 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.qmth.cas.exchange</groupId>
     <artifactId>cas-exchange</artifactId>
-    <version>2.0.1</version>
+    <version>2.0.2</version>
     <packaging>jar</packaging>
 
     <parent>
         <groupId>com.qmth.teachcloud.exchange.service</groupId>
         <artifactId>teachcloud-exchange-service</artifactId>
-        <version>2.0.1</version>
+        <version>2.0.2</version>
     </parent>
 
     <dependencies>

+ 33 - 0
data-docking/.gitignore

@@ -0,0 +1,33 @@
+HELP.md
+target/
+.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

+ 69 - 0
data-docking/pom.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>com.qmth.data.docking</groupId>
+    <artifactId>data-docking</artifactId>
+    <version>2.0.2</version>
+    <packaging>jar</packaging>
+
+    <parent>
+        <groupId>com.qmth.teachcloud.exchange.service</groupId>
+        <artifactId>teachcloud-exchange-service</artifactId>
+        <version>2.0.2</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.qmth.teachcloud.exchange.common</groupId>
+            <artifactId>teachcloud-exchange-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <version>${spring-boot.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>9.0.64</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.6.2</version>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <version>1.4.12</version>
+                <configuration>
+                    <repository>registry.cn-shenzhen.aliyuncs.com/data-docking</repository>
+                    <tag>${project.version}</tag>
+                    <contextDirectory>${project.baseDir}</contextDirectory>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <pullNewerImage>true</pullNewerImage>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 26 - 0
data-docking/src/main/java/com/qmth/data/docking/DataDockingApplication.java

@@ -0,0 +1,26 @@
+package com.qmth.data.docking;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication(scanBasePackages = "com.qmth.*", exclude = {SecurityAutoConfiguration.class})
+@MapperScan({"com.qmth.teachcloud.exchange.common.mapper"})
+//主要就是定义扫描的路径从中找出标识了需要装配的类自动装配到spring的bean容器中,做过web开发的同学一定都有用过@Controller,@Service,@Repository注解,查看其源码你会发现,他们中有一个共同的注解@Component,没错@ComponentScan注解默认就会装配标识了@Controller,@Service,@Repository,@Component注解的类到spring容器中
+@EntityScan(basePackages = {"com.qmth.teachcloud.exchange.common.entity"})
+//用来扫描和发现指定包及其子包中的Entity定义
+@EnableTransactionManagement // spring开启事务支持
+@EnableAsync // 开启异步任务
+@EnableCaching // 开启缓存注解
+public class DataDockingApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(DataDockingApplication.class, args);
+    }
+
+}

+ 1 - 0
data-docking/src/main/resources/application.properties

@@ -0,0 +1 @@
+spring.application.name=data.docking

+ 13 - 0
data-docking/src/test/java/com/qmth/data/docking/ApplicationTests.java

@@ -0,0 +1,13 @@
+package com.qmth.data.docking;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class ApplicationTests {
+
+    @Test
+    void contextLoads() {
+    }
+
+}

+ 2 - 2
eds/pom.xml

@@ -4,13 +4,13 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.qmth.eds.exchange</groupId>
     <artifactId>eds-exchange</artifactId>
-    <version>2.0.1</version>
+    <version>2.0.2</version>
     <packaging>jar</packaging>
 
     <parent>
         <groupId>com.qmth.teachcloud.exchange.service</groupId>
         <artifactId>teachcloud-exchange-service</artifactId>
-        <version>2.0.1</version>
+        <version>2.0.2</version>
     </parent>
 
     <dependencies>

+ 7 - 1
pom.xml

@@ -4,13 +4,14 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.qmth.teachcloud.exchange.service</groupId>
     <artifactId>teachcloud-exchange-service</artifactId>
-    <version>2.0.1</version>
+    <version>2.0.2</version>
     <packaging>pom</packaging>
 
     <modules>
         <module>teachcloud-exchange-common</module>
         <module>cas</module>
         <module>eds</module>
+        <module>data-docking</module>
     </modules>
 
     <properties>
@@ -62,6 +63,11 @@
                 <artifactId>eds-exchange</artifactId>
                 <version>${project.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.qmth.data.docking</groupId>
+                <artifactId>data-docking</artifactId>
+                <version>${project.version}</version>
+            </dependency>
             <dependency>
                 <groupId>com.qmth.boot</groupId>
                 <artifactId>starter-api</artifactId>

+ 2 - 2
teachcloud-exchange-common/pom.xml

@@ -4,13 +4,13 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.qmth.teachcloud.exchange.common</groupId>
     <artifactId>teachcloud-exchange-common</artifactId>
-    <version>2.0.1</version>
+    <version>2.0.2</version>
     <packaging>jar</packaging>
 
     <parent>
         <groupId>com.qmth.teachcloud.exchange.service</groupId>
         <artifactId>teachcloud-exchange-service</artifactId>
-        <version>2.0.1</version>
+        <version>2.0.2</version>
     </parent>
 
     <dependencies>