lianshufeng 1 anno fa
parent
commit
f9d24de3b0
24 ha cambiato i file con 27 aggiunte e 797 eliminazioni
  1. 14 14
      demo/data/mysql/src/main/java/com/example/mongo/core/controller/UserController.java
  2. 0 149
      demo/experiment/ExperimentService1/pom.xml
  3. 0 36
      demo/experiment/ExperimentService1/src/main/java/com/github/microservice/demo/experiment/service1/boot/ExperimentService1Application.java
  4. 0 11
      demo/experiment/ExperimentService1/src/main/java/com/github/microservice/demo/experiment/service1/core/config/MVCConfig.java
  5. 0 18
      demo/experiment/ExperimentService1/src/main/java/com/github/microservice/demo/experiment/service1/core/controller/IndexController.java
  6. 0 30
      demo/experiment/ExperimentService1/src/main/resources/application.yml
  7. 0 23
      demo/experiment/ExperimentService1/src/main/resources/bootstrap.yml
  8. 0 148
      demo/experiment/ExperimentService2/pom.xml
  9. 0 36
      demo/experiment/ExperimentService2/src/main/java/com/github/microservice/demo/experiment/service2/boot/ExperimentService2Application.java
  10. 0 11
      demo/experiment/ExperimentService2/src/main/java/com/github/microservice/demo/experiment/service2/core/config/MVCConfig.java
  11. 0 17
      demo/experiment/ExperimentService2/src/main/java/com/github/microservice/demo/experiment/service2/core/controller/IndexController.java
  12. 0 30
      demo/experiment/ExperimentService2/src/main/resources/application.yml
  13. 0 23
      demo/experiment/ExperimentService2/src/main/resources/bootstrap.yml
  14. 0 34
      demo/experiment/pom.xml
  15. 2 31
      demo/feign/feigncall/pom.xml
  16. 2 2
      demo/feign/feignclient/pom.xml
  17. 5 34
      demo/feign/feignserver/pom.xml
  18. 0 10
      demo/feign/feignserver/src/main/java/com/example/mongo/core/config/EncryptionDataClientConfig.java
  19. 0 54
      demo/feign/feignserver/src/main/java/com/example/mongo/core/controller/DataController.java
  20. 0 16
      demo/feign/feignserver/src/main/java/com/example/mongo/core/controller/UserController.groovy
  21. 0 1
      demo/pom.xml
  22. 2 32
      demo/promise/pom.xml
  23. 2 32
      demo/stream/pom.xml
  24. 0 5
      super/pom.xml

+ 14 - 14
demo/data/mysql/src/main/java/com/example/mongo/core/controller/UserController.java

@@ -13,20 +13,20 @@ import org.springframework.web.bind.annotation.RestController;
 @DelegateMapping(types = UserService.class)
 public class UserController {
 
-    @Autowired
-    @Delegate
-    private UserServiceImpl userService;
-
-    @RequestMapping(value = "find", method = RequestMethod.GET)
-    public Object find(@RequestParam(value = "name") String name) {
-        return this.userService.find(name);
-    }
-
-    @RequestMapping(value = "findByName", method = RequestMethod.GET)
-    public Object findByName(@RequestParam(value = "name") String name) {
-        return this.userService.findByName(name);
-    }
-
+//    @Autowired
+//    @Delegate
+//    private UserServiceImpl userService;
+//
+//    @RequestMapping(value = "find", method = RequestMethod.GET)
+//    public Object find(@RequestParam(value = "name") String name) {
+//        return this.userService.find(name);
+//    }
+//
+//    @RequestMapping(value = "findByName", method = RequestMethod.GET)
+//    public Object findByName(@RequestParam(value = "name") String name) {
+//        return this.userService.findByName(name);
+//    }
+//
 
 }
 

+ 0 - 149
demo/experiment/ExperimentService1/pom.xml

@@ -1,149 +0,0 @@
-<?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>
-    <parent>
-        <groupId>com.github.microservice</groupId>
-        <artifactId>PParent</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../../../super/PParent/pom.xml</relativePath>
-    </parent>
-
-    <groupId>com.github.microservice.demo</groupId>
-    <artifactId>ExperimentService1</artifactId>
-    <name>ExperimentService1</name>
-    <properties>
-        <!-- 项目编码 -->
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-
-        <!--JDK版本-->
-        <java.version>11</java.version>
-    </properties>
-    <dependencies>
-
-
-        <!-- load bootstrap.yml-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-            <version>${spring-cloud.version}</version>
-        </dependency>
-
-        <!-- 健康检查 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-            <version>${spring-boot.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-logging</artifactId>
-            <version>${spring-boot.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-configuration-processor</artifactId>
-            <version>${spring-boot.version}</version>
-            <optional>true</optional>
-        </dependency>
-
-
-        <!--核心库-->
-        <dependency>
-            <groupId>com.github.microservice</groupId>
-            <artifactId>PCore</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-
-
-        <!-- Get Set 需要IDE 安装 lombok plugin -->
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <version>${lombok.version}</version>
-        </dependency>
-
-
-        <!-- 基础模块 -->
-        <dependency>
-            <groupId>com.github.microservice</groupId>
-            <artifactId>PCore</artifactId>
-            <version>${Project.version}</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-
-        <!--应用中心客户端-->
-        <dependency>
-            <groupId>com.github.microservice.components</groupId>
-            <artifactId>ApplicationClient</artifactId>
-            <version>${Project.version}</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <!--  discovery -->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-consul-discovery</artifactId>
-            <version>${spring-cloud-starter-consul-discovery.version}</version>
-        </dependency>
-        <!-- openfeign-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-openfeign</artifactId>
-            <version>${spring-cloud.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>spring-boot-autoconfigure</artifactId>
-                    <groupId>org.springframework.boot</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-    </dependencies>
-
-    <!--构建-->
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <fork>true</fork>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <!-- properties 取 pom 配置 -->
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-
-    </build>
-
-</project>

+ 0 - 36
demo/experiment/ExperimentService1/src/main/java/com/github/microservice/demo/experiment/service1/boot/ExperimentService1Application.java

@@ -1,36 +0,0 @@
-package com.github.microservice.demo.experiment.service1.boot;
-
-import com.github.microservice.app.core.config.ConsulRegisterConfig;
-import com.github.microservice.core.runner.BannerApplicationRunner;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Import;
-
-
-@EnableDiscoveryClient
-@ComponentScan("com.github.microservice.demo.experiment.service1.core")
-@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
-@Import({ConsulRegisterConfig.class})
-public class ExperimentService1Application {
-
-    public static void main(String[] args) {
-        SpringApplication.run(ExperimentService1Application.class, args);
-    }
-
-
-    /**
-     * 启动成功后打印 Banner
-     *
-     * @return
-     */
-    @Bean
-    public ApplicationRunner BannerApplicationRunner() {
-        return new BannerApplicationRunner();
-    }
-
-}

+ 0 - 11
demo/experiment/ExperimentService1/src/main/java/com/github/microservice/demo/experiment/service1/core/config/MVCConfig.java

@@ -1,11 +0,0 @@
-package com.github.microservice.demo.experiment.service1.core.config;
-
-import com.github.microservice.core.mvc.MVCConfiguration;
-import com.github.microservice.core.mvc.MVCResponseConfiguration;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-@Import({MVCConfiguration.class, MVCResponseConfiguration.class})
-@Configuration
-public class MVCConfig {
-}

+ 0 - 18
demo/experiment/ExperimentService1/src/main/java/com/github/microservice/demo/experiment/service1/core/controller/IndexController.java

@@ -1,18 +0,0 @@
-package com.github.microservice.demo.experiment.service1.core.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.Map;
-
-@RestController
-public class IndexController {
-
-    @RequestMapping("call")
-    public Object call() {
-        return Map.of("time", System.currentTimeMillis(),
-                "me", "service1"
-        );
-    }
-
-}

+ 0 - 30
demo/experiment/ExperimentService1/src/main/resources/application.yml

@@ -1,30 +0,0 @@
-#Web服务器端口
-server:
-  port: 8061
-
-#允许消息总线
-spring:
-  application:
-    name: ${project.artifactId}
-  cloud:
-    consul:
-      discovery:
-        prefer-ip-address: true # ip自动注册
-        hostname: localhost    # 配置实例地址
-        port: ${server.port}
-        health-check-path: /actuator/health  # 检测实例健康
-        health-check-interval: 10s   # 每隔10s检查
-        register: true  # 自动注册
-        service-name: ${spring.application.name} # 实例名称
-        instance-id: ${spring.application.name}:${server.port}
-      host: ${ApplicationCenter.url}
-      port: ${ApplicationCenter.port}
-
-
-
-
-#调试或者输出日志
-logging:
-  file:
-    name: logs/${project.artifactId}.log
-#debug: true

+ 0 - 23
demo/experiment/ExperimentService1/src/main/resources/bootstrap.yml

@@ -1,23 +0,0 @@
-###需拷贝到每一个模块下
-
-spring:
-  mvc:
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  main: #允许循环引用
-    allow-circular-references: true
-  # 应用名
-  application:
-    name: ${project.artifactId}
-  # 当前读取配置文件的类型
-  profiles:
-    active: ${spring.profiles.active}
-  #配置中心
-  cloud:
-    config:
-      uri: ${ConfigCenter.url}
-      name: ${project.artifactId},ConfigCenter
-  autoconfigure:
-    exclude:
-      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
-      - org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration

+ 0 - 148
demo/experiment/ExperimentService2/pom.xml

@@ -1,148 +0,0 @@
-<?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>
-    <parent>
-        <groupId>com.github.microservice</groupId>
-        <artifactId>PParent</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../../../super/PParent/pom.xml</relativePath>
-    </parent>
-
-    <groupId>com.github.microservice.demo</groupId>
-    <artifactId>ExperimentService2</artifactId>
-    <name>ExperimentService2</name>
-    <properties>
-        <!-- 项目编码 -->
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-
-        <!--JDK版本-->
-        <java.version>11</java.version>
-    </properties>
-    <dependencies>
-
-
-        <!-- load bootstrap.yml-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-            <version>${spring-cloud.version}</version>
-        </dependency>
-
-        <!-- 健康检查 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-            <version>${spring-boot.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-logging</artifactId>
-            <version>${spring-boot.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-configuration-processor</artifactId>
-            <version>${spring-boot.version}</version>
-            <optional>true</optional>
-        </dependency>
-
-
-        <!--核心库-->
-        <dependency>
-            <groupId>com.github.microservice</groupId>
-            <artifactId>PCore</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-
-        <!-- Get Set 需要IDE 安装 lombok plugin -->
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <version>${lombok.version}</version>
-        </dependency>
-
-
-        <!-- 基础模块 -->
-        <dependency>
-            <groupId>com.github.microservice</groupId>
-            <artifactId>PCore</artifactId>
-            <version>${Project.version}</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-
-        <!--应用中心客户端-->
-        <dependency>
-            <groupId>com.github.microservice.components</groupId>
-            <artifactId>ApplicationClient</artifactId>
-            <version>${Project.version}</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <!--  discovery -->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-consul-discovery</artifactId>
-            <version>${spring-cloud-starter-consul-discovery.version}</version>
-        </dependency>
-        <!-- openfeign-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-openfeign</artifactId>
-            <version>${spring-cloud.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>spring-boot-autoconfigure</artifactId>
-                    <groupId>org.springframework.boot</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-    </dependencies>
-
-    <!--构建-->
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <fork>true</fork>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <!-- properties 取 pom 配置 -->
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-
-    </build>
-
-</project>

+ 0 - 36
demo/experiment/ExperimentService2/src/main/java/com/github/microservice/demo/experiment/service2/boot/ExperimentService2Application.java

@@ -1,36 +0,0 @@
-package com.github.microservice.demo.experiment.service2.boot;
-
-import com.github.microservice.app.core.config.ConsulRegisterConfig;
-import com.github.microservice.core.runner.BannerApplicationRunner;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Import;
-
-
-@EnableDiscoveryClient
-@ComponentScan("com.github.microservice.demo.experiment.service2.core")
-@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
-@Import({ConsulRegisterConfig.class})
-public class ExperimentService2Application {
-
-    public static void main(String[] args) {
-        SpringApplication.run(ExperimentService2Application.class, args);
-    }
-
-
-    /**
-     * 启动成功后打印 Banner
-     *
-     * @return
-     */
-    @Bean
-    public ApplicationRunner BannerApplicationRunner() {
-        return new BannerApplicationRunner();
-    }
-
-}

+ 0 - 11
demo/experiment/ExperimentService2/src/main/java/com/github/microservice/demo/experiment/service2/core/config/MVCConfig.java

@@ -1,11 +0,0 @@
-package com.github.microservice.demo.experiment.service2.core.config;
-
-import com.github.microservice.core.mvc.MVCConfiguration;
-import com.github.microservice.core.mvc.MVCResponseConfiguration;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-@Import({MVCConfiguration.class, MVCResponseConfiguration.class})
-@Configuration
-public class MVCConfig {
-}

+ 0 - 17
demo/experiment/ExperimentService2/src/main/java/com/github/microservice/demo/experiment/service2/core/controller/IndexController.java

@@ -1,17 +0,0 @@
-package com.github.microservice.demo.experiment.service2.core.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.Map;
-
-@RestController
-public class IndexController {
-
-    @RequestMapping("call")
-    public Object call() {
-        return Map.of("time", System.currentTimeMillis(),
-                "me", "service2"
-        );
-    }
-}

+ 0 - 30
demo/experiment/ExperimentService2/src/main/resources/application.yml

@@ -1,30 +0,0 @@
-#Web服务器端口
-server:
-  port: 8062
-
-#允许消息总线
-spring:
-  application:
-    name: ${project.artifactId}
-  cloud:
-    consul:
-      discovery:
-        prefer-ip-address: true # ip自动注册
-        hostname: localhost    # 配置实例地址
-        port: ${server.port}
-        health-check-path: /actuator/health  # 检测实例健康
-        health-check-interval: 10s   # 每隔10s检查
-        register: true  # 自动注册
-        service-name: ${spring.application.name} # 实例名称
-        instance-id: ${spring.application.name}:${server.port}
-      host: ${ApplicationCenter.url}
-      port: ${ApplicationCenter.port}
-
-
-
-
-#调试或者输出日志
-logging:
-  file:
-    name: logs/${project.artifactId}.log
-#debug: true

+ 0 - 23
demo/experiment/ExperimentService2/src/main/resources/bootstrap.yml

@@ -1,23 +0,0 @@
-###需拷贝到每一个模块下
-
-spring:
-  mvc:
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  main: #允许循环引用
-    allow-circular-references: true
-  # 应用名
-  application:
-    name: ${project.artifactId}
-  # 当前读取配置文件的类型
-  profiles:
-    active: ${spring.profiles.active}
-  #配置中心
-  cloud:
-    config:
-      uri: ${ConfigCenter.url}
-      name: ${project.artifactId},ConfigCenter
-  autoconfigure:
-    exclude:
-      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
-      - org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration

+ 0 - 34
demo/experiment/pom.xml

@@ -1,34 +0,0 @@
-<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>com.github.microservice.demo</groupId>
-    <artifactId>experiment</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-
-    <packaging>pom</packaging>
-    <name>${project.artifactId}</name>
-    <description>项目配置</description>
-
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <java.version>1.8</java.version>
-    </properties>
-
-
-    <modules>
-
-        <module>ExperimentService1</module>
-        <module>ExperimentService2</module>
-
-
-    </modules>
-
-
-</project>

+ 2 - 31
demo/feign/feigncall/pom.xml

@@ -4,9 +4,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>com.github.microservice</groupId>
-        <artifactId>PParent</artifactId>
+        <artifactId>MSModule</artifactId>
         <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../../../super/PParent</relativePath>
+        <relativePath>../../../super/MSModule</relativePath>
     </parent>
 
     <groupId>com.example</groupId>
@@ -42,35 +42,6 @@
     </dependencies>
 
 
-    <!--构建-->
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <fork>true</fork>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <!-- properties 取 pom 配置 -->
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-
-    </build>
 
 
 </project>

+ 2 - 2
demo/feign/feignclient/pom.xml

@@ -5,9 +5,9 @@
 
     <parent>
         <groupId>com.github.microservice</groupId>
-        <artifactId>PParent</artifactId>
+        <artifactId>MSModule</artifactId>
         <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../../../super/PParent</relativePath>
+        <relativePath>../../../super/MSModule</relativePath>
     </parent>
 
     <groupId>com.example</groupId>

+ 5 - 34
demo/feign/feignserver/pom.xml

@@ -4,9 +4,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>com.github.microservice</groupId>
-        <artifactId>PParent</artifactId>
+        <artifactId>MSRunnable</artifactId>
         <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../../../super/PParent</relativePath>
+        <relativePath>../../../super/MSRunnable</relativePath>
     </parent>
 
     <groupId>com.example</groupId>
@@ -38,41 +38,12 @@
         </dependency>
 
         <dependency>
-            <groupId>com.github.microservice.encryption</groupId>
-            <artifactId>EncryptionDataClient</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <groupId>com.github.microservice.components</groupId>
+            <artifactId>Swagger2</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
     </dependencies>
 
-    <!--构建-->
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <fork>true</fork>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <!-- properties 取 pom 配置 -->
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-
-    </build>
 
 </project>

+ 0 - 10
demo/feign/feignserver/src/main/java/com/example/mongo/core/config/EncryptionDataClientConfig.java

@@ -1,10 +0,0 @@
-package com.example.mongo.core.config;
-
-import com.github.microservice.encryption.config.EncryptionClientConfiguration;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-@Configuration
-@Import(EncryptionClientConfiguration.class)
-public class EncryptionDataClientConfig {
-}

+ 0 - 54
demo/feign/feignserver/src/main/java/com/example/mongo/core/controller/DataController.java

@@ -1,54 +0,0 @@
-package com.example.mongo.core.controller;
-
-import com.github.microservice.encryption.client.model.data.RecordModel;
-import com.github.microservice.encryption.client.model.table.CollectionModel;
-import com.github.microservice.encryption.client.model.table.FieldsModel;
-import com.github.microservice.encryption.client.ret.content.ResultContent;
-import com.github.microservice.encryption.client.service.EncryptionDataRecordService;
-import com.github.microservice.encryption.client.service.EncryptionDataTableService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Pageable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.Map;
-import java.util.UUID;
-
-@RestController
-@RequestMapping("data")
-public class DataController {
-
-    @Autowired
-    private EncryptionDataRecordService encryptionDataRecordService;
-
-    @Autowired
-    private EncryptionDataTableService encryptionDataTableService;
-
-
-    @RequestMapping("create")
-    public Object create() {
-        CollectionModel collectionModel =   CollectionModel.builder().collectionName("test_1").build();
-        collectionModel.setFields(new FieldsModel[]{
-                FieldsModel.builder().path("test").bsonType("string").queries(Map.of("queryType","equality")).build()
-        });
-        Object ret = encryptionDataTableService.createCollection(collectionModel);
-        return ret;
-    }
-
-    @RequestMapping("save")
-    public ResultContent<Page<Map<String, Object>>> save() {
-        RecordModel recordModel = new RecordModel();
-        recordModel.setCollectionName("tb_user");
-        recordModel.setData(Map.of("uid", UUID.randomUUID().toString(), "name", "xiaofeng"));
-        return ResultContent.buildContent(encryptionDataRecordService.insertOne(recordModel));
-    }
-
-    @RequestMapping("list")
-    public ResultContent<Page<Map<String, Object>>> list() {
-        ResultContent<Page<Map<String, Object>>> ret = encryptionDataRecordService.list("tb_user", "{'name':'ao'}", null, PageRequest.of(0,20));
-        return ResultContent.buildContent(ret);
-    }
-
-}

+ 0 - 16
demo/feign/feignserver/src/main/java/com/example/mongo/core/controller/UserController.groovy

@@ -1,16 +0,0 @@
-package com.example.mongo.core.controller
-
-import com.example.feignclient.service.UserService
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.web.bind.annotation.RequestMapping
-import org.springframework.web.bind.annotation.RestController
-
-@RestController
-@RequestMapping("user")
-class UserController {
-
-    @Autowired
-    @Delegate(methodAnnotations = true, parameterAnnotations = true, includeTypes = UserService.class, interfaces = false)
-    private UserService userService;
-
-}

+ 0 - 1
demo/pom.xml

@@ -35,7 +35,6 @@
 
         <module>promise</module>
 
-        <module>experiment</module>
 
     </modules>
 

+ 2 - 32
demo/promise/pom.xml

@@ -4,9 +4,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>com.github.microservice</groupId>
-        <artifactId>PParent</artifactId>
+        <artifactId>MSRunnable</artifactId>
         <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../../super/PParent</relativePath>
+        <relativePath>../../super/MSRunnable</relativePath>
     </parent>
 
     <groupId>com.example</groupId>
@@ -38,35 +38,5 @@
     </dependencies>
 
 
-    <!--构建-->
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <fork>true</fork>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <!-- properties 取 pom 配置 -->
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-
-    </build>
-
 
 </project>

+ 2 - 32
demo/stream/pom.xml

@@ -4,9 +4,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>com.github.microservice</groupId>
-        <artifactId>PParent</artifactId>
+        <artifactId>MSRunnable</artifactId>
         <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../../super/PParent</relativePath>
+        <relativePath>../../super/MSRunnable</relativePath>
     </parent>
 
     <groupId>com.example</groupId>
@@ -38,35 +38,5 @@
     </dependencies>
 
 
-    <!--构建-->
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <fork>true</fork>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <!-- properties 取 pom 配置 -->
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-
-    </build>
-
 
 </project>

+ 0 - 5
super/pom.xml

@@ -23,12 +23,7 @@
 
 
     <modules>
-<!--        <module>PConfigure</module>-->
-<!--        <module>PParent</module>-->
-
         <module>PCore</module>
-
-
         <module>MSConfigure</module>
         <module>MSModule</module>
         <module>MSRunnable</module>