xieshengjie 3 lat temu
rodzic
commit
b6af0de9c3
31 zmienionych plików z 630 dodań i 206 usunięć
  1. 5 8
      .idea/compiler.xml
  2. 16 16
      pom.xml
  3. 9 0
      web/consumer/pom.xml
  4. 5 0
      web/consumer/src/main/java/com/gyee/consumer/ConsumerMain.java
  5. 61 0
      web/consumer/src/main/java/com/gyee/consumer/api/DatacenterApi.java
  6. 74 0
      web/consumer/src/main/java/com/gyee/consumer/controller/datacenter/DatacenterController.java
  7. 100 0
      web/consumer/src/main/resources/application-dev.yml
  8. 100 0
      web/consumer/src/main/resources/application-test.yml
  9. 3 87
      web/consumer/src/main/resources/application.yml
  10. 100 0
      web/consumer/target/classes/application-dev.yml
  11. 100 0
      web/consumer/target/classes/application-test.yml
  12. 3 87
      web/consumer/target/classes/application.yml
  13. BIN
      web/consumer/target/classes/com/gyee/consumer/ConsumerMain.class
  14. BIN
      web/consumer/target/classes/com/gyee/consumer/api/DatacenterApi.class
  15. BIN
      web/consumer/target/classes/com/gyee/consumer/controller/datacenter/DatacenterController.class
  16. BIN
      web/consumer/target/consumer-1.0-SNAPSHOT.jar
  17. BIN
      web/consumer/target/consumer-1.0-SNAPSHOT.jar.original
  18. 4 0
      web/datacenter-hb/pom.xml
  19. 2 0
      web/datacenter-hb/src/main/java/com/gyee/datacenter/DatacenterMain.java
  20. 11 0
      web/datacenter-hb/src/main/resources/application-dev.yml
  21. 11 2
      web/datacenter-hb/src/main/resources/application-test.yml
  22. 2 2
      web/datacenter-hb/src/main/resources/application.yml
  23. 11 0
      web/datacenter-hb/target/classes/application-dev.yml
  24. 11 2
      web/datacenter-hb/target/classes/application-test.yml
  25. 2 2
      web/datacenter-hb/target/classes/application.yml
  26. BIN
      web/datacenter-hb/target/classes/com/gyee/datacenter/DatacenterMain.class
  27. BIN
      web/datacenter-hb/target/classes/com/gyee/datacenter/controller/ParameterComparisonController.class
  28. BIN
      web/datacenter-hb/target/classes/com/gyee/datacenter/init/CacheContext.class
  29. BIN
      web/datacenter-hb/target/classes/com/gyee/datacenter/service/ParameterComparisonService.class
  30. BIN
      web/datacenter-hb/target/datacenter-hb-1.0-SNAPSHOT.jar
  31. BIN
      web/datacenter-hb/target/datacenter-hb-1.0-SNAPSHOT.jar.original

+ 5 - 8
.idea/compiler.xml

@@ -8,19 +8,19 @@
         <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
         <outputRelativeToContentRoot value="true" />
         <module name="datatraining-server" />
-        <module name="consumer-hb" />
-        <module name="benchmarking-web-hb" />
+        <module name="adapter-td-hb" />
         <module name="meteorologicalcollection" />
-        <module name="customization-hb" />
         <module name="datacenter-hb" />
         <module name="failurestatistics-server" />
         <module name="analysis-histroy-hb" />
+        <module name="consumer-hb" />
         <module name="cache" />
-        <module name="adapter-td-hb" />
         <module name="healthmodel-server" />
         <module name="meteorologicalcollection-web" />
-        <module name="knowledge-hb" />
         <module name="monitor-web" />
+        <module name="knowledge-hb" />
+        <module name="benchmarking-web-hb" />
+        <module name="customization-hb" />
         <module name="benchmarking-web" />
         <module name="healthmanagement-histroy" />
         <module name="benchmarking-histroy-hb" />
@@ -32,8 +32,5 @@
         <module name="common" />
       </profile>
     </annotationProcessing>
-    <bytecodeTargetLevel>
-      <module name="monitor-web-hb" target="1.8" />
-    </bytecodeTargetLevel>
   </component>
 </project>

+ 16 - 16
pom.xml

@@ -42,22 +42,22 @@
         <type>pom</type>
         <scope>import</scope>
       </dependency>
-<!--      &lt;!&ndash;spring cloud Hoxton.SR1&ndash;&gt;-->
-<!--      <dependency>-->
-<!--        <groupId>org.springframework.cloud</groupId>-->
-<!--        <artifactId>spring-cloud-dependencies</artifactId>-->
-<!--        <version>Hoxton.SR1</version>-->
-<!--        <type>pom</type>-->
-<!--        <scope>import</scope>-->
-<!--      </dependency>-->
-<!--      &lt;!&ndash;spring cloud alibaba 2.1.0.RELEASE&ndash;&gt;-->
-<!--      <dependency>-->
-<!--        <groupId>com.alibaba.cloud</groupId>-->
-<!--        <artifactId>spring-cloud-alibaba-dependencies</artifactId>-->
-<!--        <version>2.1.0.RELEASE</version>-->
-<!--        <type>pom</type>-->
-<!--        <scope>import</scope>-->
-<!--      </dependency>-->
+      <!--spring cloud Hoxton.SR1-->
+      <dependency>
+        <groupId>org.springframework.cloud</groupId>
+        <artifactId>spring-cloud-dependencies</artifactId>
+        <version>Hoxton.SR1</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <!--spring cloud alibaba 2.1.0.RELEASE-->
+      <dependency>
+        <groupId>com.alibaba.cloud</groupId>
+        <artifactId>spring-cloud-alibaba-dependencies</artifactId>
+        <version>2.1.0.RELEASE</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
       <dependency>
         <groupId>mysql</groupId>
         <artifactId>mysql-connector-java</artifactId>

+ 9 - 0
web/consumer/pom.xml

@@ -19,6 +19,15 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
+        <!--feign 依赖-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.gyee</groupId>
             <artifactId>common</artifactId>

+ 5 - 0
web/consumer/src/main/java/com/gyee/consumer/ConsumerMain.java

@@ -2,6 +2,8 @@ package com.gyee.consumer;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @ClassName : ConsumerMain
@@ -9,7 +11,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
  * @Date: 2021/11/15 18:09
  * @Description :  消费者主启动类
  */
+
 @SpringBootApplication
+@EnableDiscoveryClient
+@EnableFeignClients
 public class ConsumerMain {
     public static void main(String[] args) {
         SpringApplication.run(ConsumerMain.class,args);

+ 61 - 0
web/consumer/src/main/java/com/gyee/consumer/api/DatacenterApi.java

@@ -0,0 +1,61 @@
+package com.gyee.consumer.api;
+
+import com.gyee.common.config.R;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @ClassName : DatacenterApi
+ * @Author : xieshengjie
+ * @Date: 2022/2/22 11:05
+ * @Description :
+ */
+@FeignClient("datacenter-provider")
+@RequestMapping("//dataquery")
+public interface DatacenterApi {
+    /**
+     * 获取所有表名
+     * @return
+     */
+    @GetMapping("/tables")
+    R getTables();
+
+    /**
+     * 根据表名点名查询数据
+     * @param tableid
+     * @param pointId
+     * @return
+     */
+    @GetMapping("/realtimeData")
+    R getRealtimedata(@RequestParam(value = "tableid",required = true)String tableid,
+                      @RequestParam(value = "pointId",required = false)String pointId,
+                      @RequestParam(value = "pointName",required = false)String pointName,
+                      @RequestParam(value = "pageNum",required = true)String pageNum,
+                      @RequestParam(value = "pageSize",required = true)String pageSize);
+
+    /**
+     * 根据点名查询历史数据
+     * @param pointId
+     * @param begin
+     * @param end
+     * @param interval
+     * @return
+     */
+    @GetMapping("/historyData")
+    public R gethistoryData(@RequestParam(value = "pointId",required = true)String pointId,
+                            @RequestParam(value = "begin",required = true)String begin,
+                            @RequestParam(value = "end",required = true)String end,
+                            @RequestParam(value = "interval",required = false)String interval,
+                            @RequestParam(value = "type",required = false)String type);
+
+    @GetMapping("/realtimeExport")
+    public R realtimeExport(@RequestParam(value = "tableid",required = true)String tableid,
+                            @RequestParam(value = "pointId",required = false)String pointId,
+                            @RequestParam(value = "pointName",required = false)String pointName, HttpServletResponse response) throws IOException;
+
+}

+ 74 - 0
web/consumer/src/main/java/com/gyee/consumer/controller/datacenter/DatacenterController.java

@@ -0,0 +1,74 @@
+package com.gyee.consumer.controller.datacenter;
+
+import com.gyee.common.config.R;
+import com.gyee.consumer.api.DatacenterApi;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @ClassName : DatacenterController
+ * @Author : xieshengjie
+ * @Date: 2022/2/22 10:45
+ * @Description :
+ */
+@RestController
+public class DatacenterController {
+
+    @Resource
+    private DatacenterApi datacenterApi;
+    /**
+     * 获取所有表名
+     * @return
+     */
+    @GetMapping("/consumer/dataquery/tables")
+    R getTables(){
+        return datacenterApi.getTables();
+    }
+
+    /**
+     * 根据表名点名查询数据
+     * @param tableid
+     * @param pointId
+     * @return
+     */
+    @GetMapping("/consumer/dataquery//realtimeData")
+    R getRealtimedata(@RequestParam(value = "tableid",required = true)String tableid,
+                             @RequestParam(value = "pointId",required = false)String pointId,
+                             @RequestParam(value = "pointName",required = false)String pointName,
+                             @RequestParam(value = "pageNum",required = true)String pageNum,
+                             @RequestParam(value = "pageSize",required = true)String pageSize){
+        return datacenterApi.getRealtimedata(tableid,pointId,pointName,pageNum,pageSize);
+    }
+
+    /**
+     * 根据点名查询历史数据
+     * @param pointId
+     * @param begin
+     * @param end
+     * @param interval
+     * @return
+     */
+    @GetMapping("/consumer/dataquery//historyData")
+    public R gethistoryData(@RequestParam(value = "pointId",required = true)String pointId,
+                            @RequestParam(value = "begin",required = true)String begin,
+                            @RequestParam(value = "end",required = true)String end,
+                            @RequestParam(value = "interval",required = false)String interval,
+                            @RequestParam(value = "type",required = false)String type){
+        return datacenterApi.gethistoryData(pointId,begin,end,interval,type);
+    }
+
+    @GetMapping("/consumer/dataquery//realtimeExport")
+    public R realtimeExport(@RequestParam(value = "tableid",required = true)String tableid,
+                            @RequestParam(value = "pointId",required = false)String pointId,
+                            @RequestParam(value = "pointName",required = false)String pointName, HttpServletResponse response) throws IOException{
+        return datacenterApi.realtimeExport(tableid,pointId,pointName,response);
+    }
+
+}

+ 100 - 0
web/consumer/src/main/resources/application-dev.yml

@@ -0,0 +1,100 @@
+server:
+  port: 8020
+  servlet:
+    context-path: /
+
+
+spring:
+  application:
+    name: consumer
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.83.68.97:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
+  #redis集群
+  redis:
+#    host: 10.83.68.94
+    host: 192.168.2.202
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 1
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+#    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+url:
+  benchmaring: http://192.168.2.216:8081
+  analysis: http://192.168.2.216:8082
+  knowleage: http://192.168.2.216:8086
+
+

+ 100 - 0
web/consumer/src/main/resources/application-test.yml

@@ -0,0 +1,100 @@
+server:
+  port: 8020
+  servlet:
+    context-path: /
+
+
+spring:
+  application:
+    name: consumer
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.83.68.97:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
+  #redis集群
+  redis:
+    host: 10.83.68.94
+#    host: 192.168.2.202
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 1
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+#    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+url:
+  benchmaring: http://192.168.2.216:8081
+  analysis: http://192.168.2.216:8082
+  knowleage: http://192.168.2.216:8086
+
+

+ 3 - 87
web/consumer/src/main/resources/application.yml

@@ -1,88 +1,4 @@
-server:
-  port: 8020
-  servlet:
-    context-path: /
-
-
 spring:
-  main:
-    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
-  #redis集群
-  redis:
-#    host: 10.83.68.94
-    host: 192.168.2.202
-    port: 6379
-    timeout: 100000
-    #    集群环境打开下面注释,单机不需要打开
-    #    cluster:
-    #      集群信息
-    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
-    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
-    #      maxRedirects: 3
-    password:
-    application:
-      name: test
-    jedis:
-      pool:
-        max-active: 8
-        min-idle: 0
-        max-idle: 8
-        max-wait: -1
-    database: 1
-  autoconfigure:
-    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    #外网
-    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
-#    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
-    username: gdprod
-    password: gd123
-    oracle-schema=:
-    druid:
-      max-active: 20
-      initial-size: 1
-      min-idle: 3
-      max-wait: 60000
-      time-between-eviction-runs-millis: 60000
-      min-evictable-idle-time-millis: 300000
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-  servlet:
-    multipart:
-      # 开启 multipart 上传功能
-      enabled: true
-      # 文件写入磁盘的阈值
-      file-size-threshold: 2KB
-      # 最大文件大小
-      max-file-size: 200MB
-      # 最大请求大小
-      max-request-size: 215MB
-
-mybatis-plus:
-  configuration:
-    map-underscore-to-camel-case: true
-    auto-mapping-behavior: full
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  mapper-locations: classpath*:mapper/**/*Mapper.xml
-  global-config:
-    # 逻辑删除配置
-    db-config:
-      id-type: auto
-      # 删除前
-      logic-not-delete-value: 1
-      # 删除后
-      logic-delete-value: 0
-logging:
-  level:
-    root: info
-    com.example: debug
-
-url:
-  benchmaring: http://192.168.2.216:8081
-  analysis: http://192.168.2.216:8082
-  knowleage: http://192.168.2.216:8086
-
-
+  profiles:
+    active: dev
+#    active: test

+ 100 - 0
web/consumer/target/classes/application-dev.yml

@@ -0,0 +1,100 @@
+server:
+  port: 8020
+  servlet:
+    context-path: /
+
+
+spring:
+  application:
+    name: consumer
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.83.68.97:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
+  #redis集群
+  redis:
+#    host: 10.83.68.94
+    host: 192.168.2.202
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 1
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+#    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+url:
+  benchmaring: http://192.168.2.216:8081
+  analysis: http://192.168.2.216:8082
+  knowleage: http://192.168.2.216:8086
+
+

+ 100 - 0
web/consumer/target/classes/application-test.yml

@@ -0,0 +1,100 @@
+server:
+  port: 8020
+  servlet:
+    context-path: /
+
+
+spring:
+  application:
+    name: consumer
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.83.68.97:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
+  #redis集群
+  redis:
+    host: 10.83.68.94
+#    host: 192.168.2.202
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 1
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+#    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+url:
+  benchmaring: http://192.168.2.216:8081
+  analysis: http://192.168.2.216:8082
+  knowleage: http://192.168.2.216:8086
+
+

+ 3 - 87
web/consumer/target/classes/application.yml

@@ -1,88 +1,4 @@
-server:
-  port: 8020
-  servlet:
-    context-path: /
-
-
 spring:
-  main:
-    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
-  #redis集群
-  redis:
-#    host: 10.83.68.94
-    host: 192.168.2.202
-    port: 6379
-    timeout: 100000
-    #    集群环境打开下面注释,单机不需要打开
-    #    cluster:
-    #      集群信息
-    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
-    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
-    #      maxRedirects: 3
-    password:
-    application:
-      name: test
-    jedis:
-      pool:
-        max-active: 8
-        min-idle: 0
-        max-idle: 8
-        max-wait: -1
-    database: 1
-  autoconfigure:
-    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    #外网
-    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
-#    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
-    username: gdprod
-    password: gd123
-    oracle-schema=:
-    druid:
-      max-active: 20
-      initial-size: 1
-      min-idle: 3
-      max-wait: 60000
-      time-between-eviction-runs-millis: 60000
-      min-evictable-idle-time-millis: 300000
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-  servlet:
-    multipart:
-      # 开启 multipart 上传功能
-      enabled: true
-      # 文件写入磁盘的阈值
-      file-size-threshold: 2KB
-      # 最大文件大小
-      max-file-size: 200MB
-      # 最大请求大小
-      max-request-size: 215MB
-
-mybatis-plus:
-  configuration:
-    map-underscore-to-camel-case: true
-    auto-mapping-behavior: full
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  mapper-locations: classpath*:mapper/**/*Mapper.xml
-  global-config:
-    # 逻辑删除配置
-    db-config:
-      id-type: auto
-      # 删除前
-      logic-not-delete-value: 1
-      # 删除后
-      logic-delete-value: 0
-logging:
-  level:
-    root: info
-    com.example: debug
-
-url:
-  benchmaring: http://192.168.2.216:8081
-  analysis: http://192.168.2.216:8082
-  knowleage: http://192.168.2.216:8086
-
-
+  profiles:
+    active: dev
+#    active: test

BIN
web/consumer/target/classes/com/gyee/consumer/ConsumerMain.class


BIN
web/consumer/target/classes/com/gyee/consumer/api/DatacenterApi.class


BIN
web/consumer/target/classes/com/gyee/consumer/controller/datacenter/DatacenterController.class


BIN
web/consumer/target/consumer-1.0-SNAPSHOT.jar


BIN
web/consumer/target/consumer-1.0-SNAPSHOT.jar.original


+ 4 - 0
web/datacenter-hb/pom.xml

@@ -73,6 +73,10 @@
             <version>3.1</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
 
 
     </dependencies>

+ 2 - 0
web/datacenter-hb/src/main/java/com/gyee/datacenter/DatacenterMain.java

@@ -3,6 +3,7 @@ package com.gyee.datacenter;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 
 /**
  * @ClassName : DatacenterMain
@@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
  * @Description :
  */
 @SpringBootApplication
+@EnableDiscoveryClient
 @MapperScan("com.gyee.datacenter.mapper")
 public class DatacenterMain {
     public static void main(String[] args) {

+ 11 - 0
web/datacenter-hb/src/main/resources/application-dev.yml

@@ -5,8 +5,19 @@ server:
 
 
 spring:
+  application:
+    name: datacenter-provider
   main:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 192.168.2.216:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
   #redis集群
   redis:
     host: 192.168.2.202

+ 11 - 2
web/datacenter-hb/src/main/resources/application-test.yml

@@ -5,8 +5,19 @@ server:
 
 
 spring:
+  application:
+    name: datacenter-provider
   main:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.83.68.97:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
   #redis集群
   redis:
 #    host: 192.168.2.202
@@ -86,6 +97,4 @@ logging:
     com.example: debug
 
 
-golden:
-  baseURL: http://10.155.32.4:8011/ts
 

+ 2 - 2
web/datacenter-hb/src/main/resources/application.yml

@@ -1,4 +1,4 @@
 spring:
   profiles:
-#    active: dev
-    active: test
+    active: dev
+#    active: test

+ 11 - 0
web/datacenter-hb/target/classes/application-dev.yml

@@ -5,8 +5,19 @@ server:
 
 
 spring:
+  application:
+    name: datacenter-provider
   main:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 192.168.2.216:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
   #redis集群
   redis:
     host: 192.168.2.202

+ 11 - 2
web/datacenter-hb/target/classes/application-test.yml

@@ -5,8 +5,19 @@ server:
 
 
 spring:
+  application:
+    name: datacenter-provider
   main:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.83.68.97:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
   #redis集群
   redis:
 #    host: 192.168.2.202
@@ -86,6 +97,4 @@ logging:
     com.example: debug
 
 
-golden:
-  baseURL: http://10.155.32.4:8011/ts
 

+ 2 - 2
web/datacenter-hb/target/classes/application.yml

@@ -1,4 +1,4 @@
 spring:
   profiles:
-#    active: dev
-    active: test
+    active: dev
+#    active: test

BIN
web/datacenter-hb/target/classes/com/gyee/datacenter/DatacenterMain.class


BIN
web/datacenter-hb/target/classes/com/gyee/datacenter/controller/ParameterComparisonController.class


BIN
web/datacenter-hb/target/classes/com/gyee/datacenter/init/CacheContext.class


BIN
web/datacenter-hb/target/classes/com/gyee/datacenter/service/ParameterComparisonService.class


BIN
web/datacenter-hb/target/datacenter-hb-1.0-SNAPSHOT.jar


BIN
web/datacenter-hb/target/datacenter-hb-1.0-SNAPSHOT.jar.original