yuansh před 7 měsíci
rodič
revize
53f266fe3c
100 změnil soubory, kde provedl 0 přidání a 10187 odebrání
  1. 0 122
      jeecg-server-cloud/docker-compose.yml
  2. 0 15
      jeecg-server-cloud/jeecg-cloud-gateway/Dockerfile
  3. 0 3
      jeecg-server-cloud/jeecg-cloud-gateway/README.md
  4. 0 99
      jeecg-server-cloud/jeecg-cloud-gateway/pom.xml
  5. 0 57
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/JeecgGatewayApplication.java
  6. 0 89
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/config/GatewayRoutersConfig.java
  7. 0 43
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/config/RateLimiterConfiguration.java
  8. 0 21
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/config/RouterDataType.java
  9. 0 32
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/FallbackController.java
  10. 0 33
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/HystrixFallbackHandler.java
  11. 0 45
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/sentinel/GatewaySentinelExceptionConfig.java
  12. 0 39
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/sentinel/SentinelBlockRequestHandler.java
  13. 0 60
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/filter/GlobalAccessTokenFilter.java
  14. 0 25
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/filter/SentinelFilterContextConfig.java
  15. 0 30
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/handler/LoderRouderHandler.java
  16. 0 160
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/handler/swagger/MySwaggerResourceProvider.java
  17. 0 52
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/handler/swagger/SwaggerResourceController.java
  18. 0 383
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/DynamicRouteLoader.java
  19. 0 89
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/repository/DynamicRouteService.java
  20. 0 68
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/repository/MyInMemoryRouteDefinitionRepository.java
  21. 0 21
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/vo/GatewayRouteVo.java
  22. 0 22
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/vo/MyRouteDefinition.java
  23. 0 20
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/vo/PredicatesVo.java
  24. 0 109
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/resources/application.yml
  25. 0 44
      jeecg-server-cloud/jeecg-cloud-gateway/src/main/resources/logback-spring.xml
  26. 0 37
      jeecg-server-cloud/jeecg-cloud-gateway/src/test/java/TestRoutes.java
  27. 0 15
      jeecg-server-cloud/jeecg-cloud-nacos/Dockerfile
  28. 0 16
      jeecg-server-cloud/jeecg-cloud-nacos/README.md
  29. 0 146
      jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg-dev.yaml
  30. 0 13
      jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg-gateway-dev.yaml
  31. 0 52
      jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg-gateway-router.json
  32. 0 100
      jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg.yaml
  33. 0 59
      jeecg-server-cloud/jeecg-cloud-nacos/docs/config/分库分表/jeecg-sharding-multi.yaml
  34. 0 33
      jeecg-server-cloud/jeecg-cloud-nacos/docs/config/分库分表/jeecg-sharding.yaml
  35. 0 3275
      jeecg-server-cloud/jeecg-cloud-nacos/docs/db/nacos_dm.sql
  36. 0 94
      jeecg-server-cloud/jeecg-cloud-nacos/pom.xml
  37. 0 50
      jeecg-server-cloud/jeecg-cloud-nacos/src/main/java/com/alibaba/nacos/JeecgNacosApplication.java
  38. 0 63
      jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application-dm.yml
  39. 0 60
      jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application-mysql.yml
  40. 0 3
      jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application.yml
  41. 0 15
      jeecg-server-cloud/jeecg-demo-cloud-start/Dockerfile
  42. 0 3
      jeecg-server-cloud/jeecg-demo-cloud-start/README.md
  43. 0 48
      jeecg-server-cloud/jeecg-demo-cloud-start/pom.xml
  44. 0 35
      jeecg-server-cloud/jeecg-demo-cloud-start/src/main/java/org/jeecg/JeecgDemoCloudApplication.java
  45. 0 24
      jeecg-server-cloud/jeecg-demo-cloud-start/src/main/resources/application.yml
  46. 0 77
      jeecg-server-cloud/jeecg-demo-cloud-start/src/main/resources/logback-spring.xml
  47. 0 15
      jeecg-server-cloud/jeecg-system-cloud-start/Dockerfile
  48. 0 3
      jeecg-server-cloud/jeecg-system-cloud-start/README.md
  49. 0 81
      jeecg-server-cloud/jeecg-system-cloud-start/pom.xml
  50. 0 69
      jeecg-server-cloud/jeecg-system-cloud-start/src/main/java/org/jeecg/JeecgSystemCloudApplication.java
  51. 0 24
      jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/application.yml
  52. 0 29
      jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/jeecg/jeecg_config.properties
  53. 0 27
      jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/jeecg/jeecg_database.properties
  54. 0 77
      jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/logback-spring.xml
  55. 0 2
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/README.md
  56. 0 65
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/pom.xml
  57. 0 18
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/src/main/java/org/jeecg/monitor/JeecgMonitorApplication.java
  58. 0 52
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/src/main/java/org/jeecg/monitor/config/SecuritySecureConfig.java
  59. 0 37
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/src/main/resources/application.yml
  60. 0 15
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/Dockerfile
  61. 0 9
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/README.md
  62. 0 147
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/pom.xml
  63. 0 52
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/JeecgSentinelApplication.java
  64. 0 39
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/constants/SentinelConStants.java
  65. 0 181
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/AuthorityRuleController.java
  66. 0 209
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/DegradeController.java
  67. 0 253
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/ParamFlowRuleController.java
  68. 0 242
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/SystemController.java
  69. 0 26
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/base/BaseRuleController.java
  70. 0 260
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/gateway/GatewayApiController.java
  71. 0 431
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/gateway/GatewayFlowRuleController.java
  72. 0 230
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/v2/FlowControllerV2.java
  73. 0 32
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/NacosConfigProperties.java
  74. 0 165
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/SentinelConfig.java
  75. 0 50
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/authority/AuthorityRuleNacosProvider.java
  76. 0 47
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/authority/AuthorityRuleNacosPublisher.java
  77. 0 39
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/degrade/DegradeRuleNacosProvider.java
  78. 0 38
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/degrade/DegradeRuleNacosPublisher.java
  79. 0 110
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/entity/AuthorityRuleCorrectEntity.java
  80. 0 194
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/entity/ParamFlowRuleCorrectEntity.java
  81. 0 55
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/flow/FlowRuleNacosProvider.java
  82. 0 54
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/flow/FlowRuleNacosPublisher.java
  83. 0 35
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayApiNacosProvider.java
  84. 0 35
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayApiNacosPublisher.java
  85. 0 40
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayFlowRulesNacosProvider.java
  86. 0 41
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayFlowRulesNacosPublisher.java
  87. 0 52
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/paramflow/ParamFlowRuleNacosProvider.java
  88. 0 51
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/paramflow/ParamFlowRuleNacosPublisher.java
  89. 0 37
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/system/SystemRuleNacosProvider.java
  90. 0 37
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/system/SystemRuleNacosPublisher.java
  91. 0 38
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/resources/application.yml
  92. 0 44
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/pom.xml
  93. 0 26
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/constant/CloudConstant.java
  94. 0 30
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/client/JeecgTestClient.java
  95. 0 15
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/client/JeecgTestClientDyn.java
  96. 0 78
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/controller/JeecgTestFeignController.java
  97. 0 23
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/factory/JeecgTestClientFactory.java
  98. 0 25
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/fallback/JeecgTestFallback.java
  99. 0 69
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/lock/DemoLockTest.java
  100. 0 235
      jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/xxljob/DemoJobHandler.java

+ 0 - 122
jeecg-server-cloud/docker-compose.yml

@@ -1,122 +0,0 @@
-version: '2'
-services:
-  jeecg-boot-mysql:
-    build:
-      context: ../db
-    environment:
-      MYSQL_ROOT_PASSWORD: root
-      MYSQL_ROOT_HOST: '%'
-      TZ: Asia/Shanghai
-    restart: always
-    container_name: jeecg-boot-mysql
-    command:
-      --character-set-server=utf8mb4
-      --collation-server=utf8mb4_general_ci
-      --explicit_defaults_for_timestamp=true
-      --lower_case_table_names=1
-      --max_allowed_packet=128M
-      --default-authentication-plugin=caching_sha2_password
-    ports:
-      - 3306:3306
-    networks:
-      - jeecg-boot
-
-  jeecg-boot-redis:
-    image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
-    ports:
-      - 6379:6379
-    restart: always
-    container_name: jeecg-boot-redis
-    hostname: jeecg-boot-redis
-    networks:
-      - jeecg-boot
-
-#  jeecg-boot-rabbitmq:
-#    image: rabbitmq:3.7.7-management
-#    ports:
-#      - 5672:5672
-#      - 15672:15672
-#    restart: always
-#    container_name: jeecg-boot-rabbitmq
-#    hostname: jeecg-boot-rabbitmq
-#    environment:
-#      RABBITMQ_DEFAULT_USER: guest
-#      RABBITMQ_DEFAULT_PASS: guest
-
-
-  jeecg-boot-nacos:
-    restart: always
-    build:
-      context: ./jeecg-cloud-nacos
-    ports:
-      - 8848:8848
-    container_name: jeecg-boot-nacos
-    hostname: jeecg-boot-nacos
-    networks:
-      - jeecg-boot
-
-  jeecg-boot-system:
-    depends_on:
-      - jeecg-boot-nacos
-    build:
-      context: ./jeecg-system-cloud-start
-    container_name: jeecg-system-start
-    hostname: jeecg-boot-system
-    restart: on-failure
-    environment:
-      - TZ=Asia/Shanghai
-    networks:
-      - jeecg-boot
-
-  jeecg-boot-demo:
-    depends_on:
-      - jeecg-boot-nacos
-    build:
-      context: ./jeecg-demo-cloud-start
-    container_name: jeecg-demo-start
-    hostname: jeecg-boot-demo
-    restart: on-failure
-    environment:
-      - TZ=Asia/Shanghai
-    networks:
-      - jeecg-boot
-
-  jeecg-boot-gateway:
-    restart: on-failure
-    build:
-      context: ./jeecg-cloud-gateway
-    ports:
-      - 9999:9999
-    depends_on:
-      - jeecg-boot-nacos
-      - jeecg-boot-system
-    container_name: jeecg-boot-gateway
-    hostname: jeecg-boot-gateway
-    networks:
-      - jeecg-boot
-
-networks:
-  jeecg-boot:
-    name: jeecg_boot
-
-#  jeecg-boot-sentinel:
-#    restart: on-failure
-#    build:
-#      context: ./jeecg-visual/jeecg-cloud-sentinel
-#    ports:
-#      - 9000:9000
-#    depends_on:
-#      - jeecg-boot-nacos
-#      - jeecg-boot-demo
-#      - jeecg-boot-system
-#      - jeecg-boot-gateway
-#    container_name: jeecg-boot-sentinel
-#    hostname: jeecg-boot-sentinel
-#
-#  jeecg-boot-xxljob:
-#    build:
-#      context: ./jeecg-visual/jeecg-cloud-xxljob
-#    ports:
-#      - 9080:9080
-#    container_name: jeecg-boot-xxljob
-#    hostname: jeecg-boot-xxljob

+ 0 - 15
jeecg-server-cloud/jeecg-cloud-gateway/Dockerfile

@@ -1,15 +0,0 @@
-FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
-
-MAINTAINER jeecgos@163.com
-
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-
-RUN mkdir -p /jeecg-cloud-gateway
-
-WORKDIR /jeecg-cloud-gateway
-
-EXPOSE 9999
-
-ADD ./target/jeecg-cloud-gateway-3.7.1.jar ./
-
-CMD sleep 100;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-gateway-3.7.1.jar

+ 0 - 3
jeecg-server-cloud/jeecg-cloud-gateway/README.md

@@ -1,3 +0,0 @@
-http://localhost:9999
-
-提示:在未启动服务实例情况下,看的接口文档为空

+ 0 - 99
jeecg-server-cloud/jeecg-cloud-gateway/pom.xml

@@ -1,99 +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">
-    <parent>
-        <artifactId>jeecg-server-cloud</artifactId>
-        <groupId>org.jeecgframework.boot</groupId>
-        <version>3.7.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>jeecg-cloud-gateway</artifactId>
-
-    <dependencies>
-        <!-- jeecg 微服务基础依赖-->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-cloud</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.jeecgframework.boot</groupId>
-                    <artifactId>jeecg-system-cloud-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <!-- Gateway网关依赖,内置webflux-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-gateway</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-        </dependency>
-        <!-- redis方式限流 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-redis-reactive</artifactId>
-        </dependency>
-
-        <!--sentinel 限流熔点降级-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>fastjson</artifactId>
-                    <groupId>com.alibaba</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <!-- sentinel集成nacos作为数据源 -->
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-datasource-nacos</artifactId>
-        </dependency>
-        <!--- sentinel流控链路不生效 -->
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-web-servlet</artifactId>
-        </dependency>
-
-
-        <!--健康监控-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-        </dependency>
-
-        <!-- Swagger API文档 -->
-        <dependency>
-            <groupId>com.github.xiaoymin</groupId>
-            <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
-            <version>${knife4j-spring-boot-starter.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-            <version>3.14.0</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-    </build>
-</project>

+ 0 - 57
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/JeecgGatewayApplication.java

@@ -1,57 +0,0 @@
-package org.jeecg;
-
-import org.jeecg.loader.DynamicRouteLoader;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.http.MediaType;
-import org.springframework.web.reactive.function.server.RouterFunction;
-import org.springframework.web.reactive.function.server.ServerResponse;
-
-import javax.annotation.Resource;
-
-import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
-import static org.springframework.web.reactive.function.server.RouterFunctions.route;
-import static org.springframework.web.reactive.function.server.ServerResponse.ok;
-
-/**
- * @author jeecg
- */
-@EnableFeignClients
-@EnableDiscoveryClient
-@SpringBootApplication
-public class JeecgGatewayApplication  implements CommandLineRunner {
-    @Resource
-    private DynamicRouteLoader dynamicRouteLoader;
-
-    public static void main(String[] args) {
-        ConfigurableApplicationContext applicationContext = SpringApplication.run(JeecgGatewayApplication.class, args);
-        //String userName = applicationContext.getEnvironment().getProperty("jeecg.test");
-        //System.err.println("user name :" +userName);
-    }
-
-    /**
-     * 容器初始化后加载路由
-     * @param strings
-     */
-    @Override
-    public void run(String... strings) {
-        dynamicRouteLoader.refresh(null);
-    }
-
-    /**
-     * 接口地址(通过9999端口直接访问)
-     *
-     * @param indexHtml
-     * @return
-     */
-    @Bean
-    public RouterFunction<ServerResponse> indexRouter(@Value("classpath:/META-INF/resources/doc.html") final org.springframework.core.io.Resource indexHtml) {
-        return route(GET("/"), request -> ok().contentType(MediaType.TEXT_HTML).syncBody(indexHtml));
-    }
-}

+ 0 - 89
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/config/GatewayRoutersConfig.java

@@ -1,89 +0,0 @@
-package org.jeecg.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author scott
- * @date 2020/05/26
- * 路由配置信息
- */
-@Configuration
-@RefreshScope
-public class GatewayRoutersConfig {
-    /**
-     * 路由配置方式:database,yml,nacos
-     */
-    public String dataType;
-    public String serverAddr;
-    public String namespace;
-    public String dataId;
-    public String routeGroup;
-    public String username;
-    public String password;
-
-    @Value("${jeecg.route.config.data-type:#{null}}")
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-    
-    @Value("${jeecg.route.config.data-id:#{null}}")
-    public void setRouteDataId(String dataId) {
-        this.dataId = dataId + ".json";
-    }
-
-    @Value("${spring.cloud.nacos.config.group:DEFAULT_GROUP:#{null}}")
-    public void setRouteGroup(String routeGroup) {
-        this.routeGroup = routeGroup;
-    }
-
-    @Value("${spring.cloud.nacos.discovery.server-addr}")
-    public void setServerAddr(String serverAddr) {
-        this.serverAddr = serverAddr;
-    }
-
-    @Value("${spring.cloud.nacos.config.namespace:#{null}}")
-    public void setNamespace(String namespace) {
-        this.namespace = namespace;
-    }
-
-    @Value("${spring.cloud.nacos.config.username:#{null}}")
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Value("${spring.cloud.nacos.config.password:#{null}}")
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public String getServerAddr() {
-        return serverAddr;
-    }
-
-    public String getNamespace() {
-        return namespace;
-    }
-
-    public String getDataId() {
-        return dataId;
-    }
-
-    public String getRouteGroup() {
-        return routeGroup;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-}

+ 0 - 43
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/config/RateLimiterConfiguration.java

@@ -1,43 +0,0 @@
-package org.jeecg.config;
-
-import org.jeecg.filter.GlobalAccessTokenFilter;
-import org.springframework.cloud.gateway.filter.ratelimit.KeyResolver;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import reactor.core.publisher.Mono;
-
-/**
- * @author scott
- * @date 2020/5/26
- * 路由限流配置
- */
-@Configuration
-public class RateLimiterConfiguration {
-    /**
-     * IP限流 (通过exchange对象可以获取到请求信息,这边用了HostName)
-     */
-    @Bean
-    @Primary
-    public KeyResolver ipKeyResolver() {
-        return exchange -> Mono.just(exchange.getRequest().getRemoteAddress().getAddress().getHostAddress());
-    }
-
-    /**
-     * 用户限流 (通过exchange对象可以获取到请求信息,获取当前请求的用户 TOKEN)
-     */
-    @Bean
-    public KeyResolver userKeyResolver() {
-        //使用这种方式限流,请求Header中必须携带X-Access-Token参数
-        return exchange -> Mono.just(exchange.getRequest().getHeaders().getFirst(GlobalAccessTokenFilter.X_ACCESS_TOKEN));
-    }
-
-    /**
-     * 接口限流 (获取请求地址的uri作为限流key)
-     */
-    @Bean
-    public KeyResolver apiKeyResolver() {
-        return exchange -> Mono.just(exchange.getRequest().getPath().value());
-    }
-
-}

+ 0 - 21
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/config/RouterDataType.java

@@ -1,21 +0,0 @@
-package org.jeecg.config;
-
-/**
- * nocos配置方式枚举
- * @author zyf
- * @date: 2022/4/21 10:55
- */
-public enum RouterDataType {
-    /**
-     * 数据库加载路由配置
-     */
-    database,
-    /**
-     * 本地yml加载路由配置
-     */
-    yml,
-    /**
-     * nacos加载路由配置
-     */
-    nacos
-}

+ 0 - 32
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/FallbackController.java

@@ -1,32 +0,0 @@
-//package org.jeecg.fallback;
-//
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.bind.annotation.RestController;
-//import reactor.core.publisher.Mono;
-//
-///**
-// * 响应超时熔断处理器【升级springboot2.6.6后,此类作废】
-// *
-// * @author zyf
-// */
-//@RestController
-//public class FallbackController {
-//
-//    /**
-//     * 全局熔断处理
-//     * @return
-//     */
-//    @RequestMapping("/fallback")
-//    public Mono<String> fallback() {
-//        return Mono.just("访问超时,请稍后再试!");
-//    }
-//
-//    /**
-//     * demo熔断处理
-//     * @return
-//     */
-//    @RequestMapping("/demo/fallback")
-//    public Mono<String> fallback2() {
-//        return Mono.just("访问超时,请稍后再试!");
-//    }
-//}

+ 0 - 33
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/HystrixFallbackHandler.java

@@ -1,33 +0,0 @@
-//package org.jeecg.fallback;
-//
-//import lombok.extern.slf4j.Slf4j;
-//import org.springframework.http.HttpStatus;
-//import org.springframework.stereotype.Component;
-//import org.springframework.web.reactive.function.BodyInserters;
-//import org.springframework.web.reactive.function.server.HandlerFunction;
-//import org.springframework.web.reactive.function.server.ServerRequest;
-//import org.springframework.web.reactive.function.server.ServerResponse;
-//import reactor.core.publisher.Mono;
-//
-//import java.util.Optional;
-//
-//import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.GATEWAY_ORIGINAL_REQUEST_URL_ATTR;
-//
-///**
-// * @author scott
-// * @date 2020/05/26
-// * Hystrix 降级处理
-// */
-//@Slf4j
-//@Component
-//public class HystrixFallbackHandler implements HandlerFunction<ServerResponse> {
-//    @Override
-//    public Mono<ServerResponse> handle(ServerRequest serverRequest) {
-//        Optional<Object> originalUris = serverRequest.attribute(GATEWAY_ORIGINAL_REQUEST_URL_ATTR);
-//
-//        originalUris.ifPresent(originalUri -> log.error("网关执行请求:{}失败,hystrix服务降级处理", originalUri));
-//
-//        return ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR.value())
-//                .header("Content-Type","text/plain; charset=utf-8").body(BodyInserters.fromObject("访问超时,请稍后再试"));
-//    }
-//}

+ 0 - 45
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/sentinel/GatewaySentinelExceptionConfig.java

@@ -1,45 +0,0 @@
-package org.jeecg.fallback.sentinel;
-
-import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.BlockRequestHandler;
-import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.GatewayCallbackManager;
-import org.jeecg.common.enums.SentinelErrorInfoEnum;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.web.reactive.function.BodyInserters;
-import org.springframework.web.reactive.function.server.ServerResponse;
-
-import javax.annotation.PostConstruct;
-import java.util.HashMap;
-
-/**
- * @Description: 自定义Sentinel全局异常(需要启动Sentinel客户端)
- * @author: zyf
- * @date: 2022/02/18
- * @version: V1.0
- */
-@Configuration
-public class GatewaySentinelExceptionConfig {
-
-    @PostConstruct
-    public void init() {
-
-        BlockRequestHandler blockRequestHandler = (serverWebExchange, ex) -> {
-            String msg;
-            SentinelErrorInfoEnum errorInfoEnum = SentinelErrorInfoEnum.getErrorByException(ex);
-            if (ObjectUtil.isNotEmpty(errorInfoEnum)) {
-                msg = errorInfoEnum.getError();
-            } else {
-                msg = "未知限流降级";
-            }
-            HashMap<String, String> map = new HashMap(5);
-            map.put("code", HttpStatus.TOO_MANY_REQUESTS.toString());
-            map.put("message", msg);
-            //自定义异常处理
-            return ServerResponse.status(HttpStatus.OK).contentType(MediaType.APPLICATION_JSON).body(BodyInserters.fromValue(map));
-        };
-
-        GatewayCallbackManager.setBlockHandler(blockRequestHandler);
-    }
-}

+ 0 - 39
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/fallback/sentinel/SentinelBlockRequestHandler.java

@@ -1,39 +0,0 @@
-//package org.jeecg.fallback.sentinel;
-//import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.BlockRequestHandler;
-//import com.alibaba.csp.sentinel.transport.config.TransportConfig;
-//import lombok.extern.slf4j.Slf4j;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.cloud.commons.util.InetUtils;
-//import org.springframework.http.HttpStatus;
-//import org.springframework.http.MediaType;
-//import org.springframework.stereotype.Component;
-//import org.springframework.web.reactive.function.BodyInserters;
-//import org.springframework.web.reactive.function.server.ServerResponse;
-//import org.springframework.web.server.ServerWebExchange;
-//import reactor.core.publisher.Mono;
-//
-//import javax.annotation.PostConstruct;
-//
-///**
-// * 自定义限流返回信息
-// * @author scott
-// */
-//@Slf4j
-//@Component
-//public class SentinelBlockRequestHandler implements BlockRequestHandler {
-//    @Autowired
-//    private InetUtils inetUtils;
-//
-//    @PostConstruct
-//    public void doInit() {
-//        System.setProperty(TransportConfig.HEARTBEAT_CLIENT_IP, inetUtils.findFirstNonLoopbackAddress().getHostAddress());
-//    }
-//
-//    @Override
-//    public Mono<ServerResponse> handleRequest(ServerWebExchange exchange, Throwable ex) {
-//        String resultString = "{\"code\":403,\"message\":\"服务开启限流保护,请稍后再试!\"}";
-//        return ServerResponse.status(HttpStatus.TOO_MANY_REQUESTS).contentType(MediaType.APPLICATION_JSON_UTF8).body(BodyInserters.fromObject(resultString));
-//    }
-//
-//
-//}

+ 0 - 60
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/filter/GlobalAccessTokenFilter.java

@@ -1,60 +0,0 @@
-package org.jeecg.filter;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.cloud.gateway.filter.GatewayFilterChain;
-import org.springframework.cloud.gateway.filter.GlobalFilter;
-import org.springframework.core.Ordered;
-import org.springframework.http.server.reactive.ServerHttpRequest;
-import org.springframework.stereotype.Component;
-import org.springframework.util.StringUtils;
-import org.springframework.web.server.ServerWebExchange;
-import reactor.core.publisher.Mono;
-import java.util.Arrays;
-import java.util.stream.Collectors;
-import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR;
-import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.addOriginalRequestUrl;
-
-/**
-* 全局拦截器,作用所有的微服务
-*
-* 1.重写StripPrefix(获取真实的URL)
-* 2.将现在的request,添加当前身份
-* @author: scott
-* @date: 2022/4/8 10:55
-*/
-@Slf4j
-@Component
-public class GlobalAccessTokenFilter implements GlobalFilter, Ordered {
-    public final static String X_ACCESS_TOKEN = "X-Access-Token";
-    public final static String X_GATEWAY_BASE_PATH = "X_GATEWAY_BASE_PATH";
-
-    @Override
-    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
-
-        String scheme = exchange.getRequest().getURI().getScheme();
-        String host = exchange.getRequest().getURI().getHost();
-        int port = exchange.getRequest().getURI().getPort();
-        //update-begin---author:chenrui ---date:20240603  for:地址中没有带端口(http/https默认)时port是-1------------
-        String basePath = scheme + "://" + host;
-        if (port != -1) {
-            basePath += ":" + port;
-        }
-        //update-end---author:chenrui ---date:20240603  for:地址中没有带端口(http/https默认)时port是-1------------
-        // 1. 重写StripPrefix(获取真实的URL)
-        addOriginalRequestUrl(exchange, exchange.getRequest().getURI());
-        String rawPath = exchange.getRequest().getURI().getRawPath();
-        String newPath = "/" + Arrays.stream(StringUtils.tokenizeToStringArray(rawPath, "/")).skip(1L).collect(Collectors.joining("/"));
-        ServerHttpRequest newRequest = exchange.getRequest().mutate().path(newPath).build();
-        exchange.getAttributes().put(GATEWAY_REQUEST_URL_ATTR, newRequest.getURI());
-        //2.将现在的request,添加当前身份
-        ServerHttpRequest mutableReq = exchange.getRequest().mutate().header("Authorization-UserName", "").header(X_GATEWAY_BASE_PATH,basePath).build();
-        ServerWebExchange mutableExchange = exchange.mutate().request(mutableReq).build();
-        return chain.filter(mutableExchange);
-    }
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-}

+ 0 - 25
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/filter/SentinelFilterContextConfig.java

@@ -1,25 +0,0 @@
-package org.jeecg.filter;
-
-import com.alibaba.csp.sentinel.adapter.servlet.CommonFilter;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author: zyf
- * @date: 20210715
- */
-@Configuration
-public class SentinelFilterContextConfig {
-    @Bean
-    public FilterRegistrationBean sentinelFilterRegistration() {
-        FilterRegistrationBean registration = new FilterRegistrationBean();
-        registration.setFilter(new CommonFilter());
-        registration.addUrlPatterns("/*");
-        // 入口资源关闭聚合
-        registration.addInitParameter(CommonFilter.WEB_CONTEXT_UNIFY, "false");
-        registration.setName("sentinelFilter");
-        registration.setOrder(1);
-        return registration;
-    }
-}

+ 0 - 30
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/handler/LoderRouderHandler.java

@@ -1,30 +0,0 @@
-package org.jeecg.handler;
-
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.base.BaseMap;
-import org.jeecg.common.constant.GlobalConstants;
-import org.jeecg.common.modules.redis.listener.JeecgRedisListener;
-import org.jeecg.loader.DynamicRouteLoader;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-
-/**
- * 路由刷新监听(实现方式:redis监听handler)
- * @author zyf
- * @date: 2022/4/21 10:55
- */
-@Slf4j
-@Component(GlobalConstants.LODER_ROUDER_HANDLER)
-public class LoderRouderHandler implements JeecgRedisListener {
-
-    @Resource
-    private DynamicRouteLoader dynamicRouteLoader;
-
-
-    @Override
-    public void onMessage(BaseMap message) {
-        dynamicRouteLoader.refresh(message);
-    }
-
-}

+ 0 - 160
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/handler/swagger/MySwaggerResourceProvider.java

@@ -1,160 +0,0 @@
-package org.jeecg.handler.swagger;
-
-import cn.hutool.core.util.ArrayUtil;
-import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.nacos.api.naming.NamingFactory;
-import com.alibaba.nacos.api.naming.NamingService;
-import com.alibaba.nacos.api.naming.pojo.Instance;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.gateway.route.RouteLocator;
-import org.springframework.context.annotation.Primary;
-import org.springframework.stereotype.Component;
-
-import springfox.documentation.swagger.web.SwaggerResource;
-import springfox.documentation.swagger.web.SwaggerResourcesProvider;
-
-import java.util.*;
-
-/**
- * 聚合各个服务的swagger接口
- * @author zyf
- * @date: 2022/4/21 10:55
- */
-@Component
-@Slf4j
-@Primary
-public class MySwaggerResourceProvider implements SwaggerResourcesProvider {
-    /**
-     * swagger2默认的url后缀
-     */
-    private static final String SWAGGER2URL = "/v2/api-docs";
-
-    /**
-     * 网关路由
-     */
-    private final RouteLocator routeLocator;
-    /**
-     * Nacos名字服务
-     */
-    private NamingService naming;
-
-    /**
-     * nacos服务地址
-     */
-    @Value("${spring.cloud.nacos.discovery.server-addr}")
-    private String serverAddr;
-    /**
-     * nacos namespace
-     */
-    @Value("${spring.cloud.nacos.discovery.namespace:#{null}}")
-    private String namespace;
-    
-    /**
-     * nacos groupName
-     */
-    @Value("${spring.cloud.nacos.config.group:DEFAULT_GROUP:#{null}}")
-    private String group;
-    
-    /**
-     * nacos username
-     */
-    @Value("${spring.cloud.nacos.discovery.username:#{null}}")
-    private String username;
-    /**
-     * nacos password
-     */
-    @Value("${spring.cloud.nacos.discovery.password:#{null}}")
-    private String password;
-    
-    /**
-     * Swagger中需要排除的服务
-     */
-    private String[] excludeServiceIds=new String[]{"jeecg-cloud-monitor"};
-
-
-    /**
-     * 网关应用名称
-     */
-    @Value("${spring.application.name}")
-    private String self;
-
-    @Autowired
-    public MySwaggerResourceProvider(RouteLocator routeLocator) {
-        this.routeLocator = routeLocator;
-    }
-
-    @Override
-    public List<SwaggerResource> get() {
-        List<SwaggerResource> resources = new ArrayList<>();
-        List<String> routeHosts = new ArrayList<>();
-        // 获取所有可用的host:serviceId
-        routeLocator.getRoutes().filter(route -> route.getUri().getHost() != null)
-                .filter(route -> !self.equals(route.getUri().getHost()))
-                .subscribe(route ->{
-                    //update-begin---author:zyf ---date:20220413 for:过滤掉无效路由,避免接口文档报错无法打开
-                    boolean hasRoute=checkRoute(route.getId());
-                    if(hasRoute){
-                        routeHosts.add(route.getUri().getHost());
-                    }
-                    //update-end---author:zyf ---date:20220413 for:过滤掉无效路由,避免接口文档报错无法打开
-                });
-
-        // 记录已经添加过的server,存在同一个应用注册了多个服务在nacos上
-        Set<String> dealed = new HashSet<>();
-        routeHosts.forEach(instance -> {
-            // 拼接url
-            String url = "/" + instance.toLowerCase() + SWAGGER2URL;
-            if (!dealed.contains(url)) {
-                dealed.add(url);
-                log.info(" Gateway add SwaggerResource: {}",url);
-                SwaggerResource swaggerResource = new SwaggerResource();
-                swaggerResource.setUrl(url);
-                swaggerResource.setSwaggerVersion("2.0");
-                swaggerResource.setName(instance);
-                //Swagger排除不展示的服务
-                if(!ArrayUtil.contains(excludeServiceIds,instance)){
-                    resources.add(swaggerResource);
-                }
-            }
-        });
-        return resources;
-    }
-
-    /**
-     * 检测nacos中是否有健康实例
-     * @param routeId
-     * @return
-     */
-    private Boolean checkRoute(String routeId) {
-        Boolean hasRoute = false;
-        try {
-            //修复使用带命名空间启动网关swagger看不到接口文档的问题
-            Properties properties=new Properties();
-            properties.setProperty("serverAddr",serverAddr);
-            if(namespace!=null && !"".equals(namespace)){
-                log.info("nacos.discovery.namespace = {}", namespace);
-                properties.setProperty("namespace",namespace);
-            }
-            if(username!=null && !"".equals(username)){
-                properties.setProperty("username",username);
-            }
-            if(password!=null && !"".equals(password)){
-                properties.setProperty("password",password);
-            }
-            //【issues/5115】因swagger文档导致gateway内存溢出
-            if (this.naming == null) {
-                this.naming = NamingFactory.createNamingService(properties);
-            }
-            log.info(" config.group : {}", group);
-            List<Instance> list = this.naming.selectInstances(routeId, group , true);
-            if (ObjectUtil.isNotEmpty(list)) {
-                hasRoute = true;
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return hasRoute;
-    }
-}

+ 0 - 52
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/handler/swagger/SwaggerResourceController.java

@@ -1,52 +0,0 @@
-package org.jeecg.handler.swagger;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.swagger.web.*;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * swagger聚合接口,三个接口都是 doc.html需要访问的接口
- * @author zyf
- * @date: 2022/4/21 10:55
- */
-@RestController
-@RequestMapping("/swagger-resources")
-public class SwaggerResourceController {
-    private MySwaggerResourceProvider swaggerResourceProvider;
-    /**
-     * 生产环境,关闭swagger文档
-     */
-    @Value("${knife4j.production:#{null}}")
-    private Boolean production;
-    
-    @Autowired
-    public SwaggerResourceController(MySwaggerResourceProvider swaggerResourceProvider) {
-        this.swaggerResourceProvider = swaggerResourceProvider;
-    }
-
-    @RequestMapping(value = "/configuration/security")
-    public ResponseEntity<SecurityConfiguration> securityConfiguration() {
-        return new ResponseEntity<>(SecurityConfigurationBuilder.builder().build(), HttpStatus.OK);
-    }
-
-    @RequestMapping(value = "/configuration/ui")
-    public ResponseEntity<UiConfiguration> uiConfiguration() {
-        return new ResponseEntity<>(UiConfigurationBuilder.builder().build(), HttpStatus.OK);
-    }
-
-    @RequestMapping
-    public ResponseEntity<List<SwaggerResource>> swaggerResources() {
-        // 是否开启生产环境屏蔽swagger
-        if (production != null && production) {
-            return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
-        }
-        return new ResponseEntity<>(swaggerResourceProvider.get(), HttpStatus.OK);
-    }
-}

+ 0 - 383
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/DynamicRouteLoader.java

@@ -1,383 +0,0 @@
-package org.jeecg.loader;
-
-import cn.hutool.core.util.ArrayUtil;
-import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.nacos.api.NacosFactory;
-import com.alibaba.nacos.api.config.ConfigService;
-import com.alibaba.nacos.api.config.listener.Listener;
-import com.alibaba.nacos.api.exception.NacosException;
-import com.google.common.collect.Lists;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.ObjectUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.jeecg.common.base.BaseMap;
-import org.jeecg.common.constant.CacheConstant;
-import org.jeecg.common.util.RedisUtil;
-import org.jeecg.config.GatewayRoutersConfig;
-import org.jeecg.config.RouterDataType;
-import org.jeecg.loader.repository.DynamicRouteService;
-import org.jeecg.loader.repository.MyInMemoryRouteDefinitionRepository;
-import org.jeecg.loader.vo.MyRouteDefinition;
-import org.jeecg.loader.vo.PredicatesVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.cloud.gateway.event.RefreshRoutesEvent;
-import org.springframework.cloud.gateway.filter.FilterDefinition;
-import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition;
-import org.springframework.cloud.gateway.route.RouteDefinition;
-import org.springframework.context.ApplicationEventPublisher;
-import org.springframework.context.ApplicationEventPublisherAware;
-import org.springframework.context.annotation.DependsOn;
-import org.springframework.stereotype.Component;
-import reactor.core.publisher.Mono;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.concurrent.Executor;
-
-/**
- * 动态路由加载器
- *
- * @author : zyf
- * @date :2020-11-10
- */
-@Slf4j
-@Component
-@RefreshScope
-@DependsOn({"gatewayRoutersConfig"})
-public class DynamicRouteLoader implements ApplicationEventPublisherAware {
-
-    public static final long DEFAULT_TIMEOUT = 30000;
-    @Autowired
-    private GatewayRoutersConfig gatewayRoutersConfig;
-    private MyInMemoryRouteDefinitionRepository repository;
-    private ApplicationEventPublisher publisher;
-    private DynamicRouteService dynamicRouteService;
-    private ConfigService configService;
-    private RedisUtil redisUtil;
-
-
-    /**
-     * 需要拼接key的路由条件
-     */
-    private static String[] GEN_KEY_ROUTERS = new String[]{"Path", "Host", "Method", "After", "Before", "Between", "RemoteAddr"};
-
-    public DynamicRouteLoader(MyInMemoryRouteDefinitionRepository repository, DynamicRouteService dynamicRouteService, RedisUtil redisUtil) {
-
-        this.repository = repository;
-        this.dynamicRouteService = dynamicRouteService;
-        this.redisUtil = redisUtil;
-    }
-
-//    @PostConstruct
-//    public void init() {
-//       init(null);
-//    }
-
-
-    public void init(BaseMap baseMap) {
-        log.info("初始化路由模式,dataType:"+ gatewayRoutersConfig.getDataType());
-        if (RouterDataType.nacos.toString().endsWith(gatewayRoutersConfig.getDataType())) {
-            loadRoutesByNacos();
-        }
-        //从数据库加载路由
-        if (RouterDataType.database.toString().endsWith(gatewayRoutersConfig.getDataType())) {
-            loadRoutesByRedis(baseMap);
-        }
-    }
-    /**
-     * 刷新路由
-     *
-     * @return
-     */
-    public Mono<Void> refresh(BaseMap baseMap) {
-        log.info("初始化路由模式,dataType:"+ gatewayRoutersConfig.getDataType());
-        if (!RouterDataType.yml.toString().endsWith(gatewayRoutersConfig.getDataType())) {
-            this.init(baseMap);
-        }
-        return Mono.empty();
-    }
-
-
-    /**
-     * 从nacos中读取路由配置
-     *
-     * @return
-     */
-    private void loadRoutesByNacos() {
-        List<RouteDefinition> routes = Lists.newArrayList();
-        configService = createConfigService();
-        if (configService == null) {
-            log.warn("initConfigService fail");
-        }
-        try {
-            log.info("jeecg.route.config.data-id = {}", gatewayRoutersConfig.getDataId());
-            log.info("nacos.config.group = {}", gatewayRoutersConfig.getRouteGroup());
-            String configInfo = configService.getConfig(gatewayRoutersConfig.getDataId(), gatewayRoutersConfig.getRouteGroup(), DEFAULT_TIMEOUT);
-            if (StringUtils.isNotBlank(configInfo)) {
-                log.info("获取网关当前配置:\r\n{}", configInfo);
-                routes = JSON.parseArray(configInfo, RouteDefinition.class);
-            }else{
-                log.warn("ERROR: 从Nacos获取网关配置为空,请确认Nacos配置是否正确!");
-            }
-        } catch (NacosException e) {
-            log.error("初始化网关路由时发生错误", e);
-            e.printStackTrace();
-        }
-        for (RouteDefinition definition : routes) {
-            log.info("update route : {}", definition.toString());
-            dynamicRouteService.add(definition);
-        }
-        this.publisher.publishEvent(new RefreshRoutesEvent(this));
-        dynamicRouteByNacosListener(gatewayRoutersConfig.getDataId(), gatewayRoutersConfig.getRouteGroup());
-    }
-
-
-    /**
-     * 从redis中读取路由配置
-     *
-     * @return
-     */
-    private void loadRoutesByRedis(BaseMap baseMap) {
-        List<MyRouteDefinition> routes = Lists.newArrayList();
-        configService = createConfigService();
-        if (configService == null) {
-            log.warn("initConfigService fail");
-        }
-        Object configInfo = redisUtil.get(CacheConstant.GATEWAY_ROUTES);
-        if (ObjectUtil.isNotEmpty(configInfo)) {
-            log.info("获取网关当前配置:\r\n{}", configInfo);
-            JSONArray array = JSON.parseArray(configInfo.toString());
-            try {
-                routes = getRoutesByJson(array);
-            } catch (URISyntaxException e) {
-                e.printStackTrace();
-            }
-        }else{
-            log.warn("ERROR: 从Redis获取网关配置为空,请确认system服务是否启动成功!");
-        }
-        
-        for (MyRouteDefinition definition : routes) {
-            log.info("update route : {}", definition.toString());
-            Integer status=definition.getStatus();
-            if(status.equals(0)){
-                dynamicRouteService.delete(definition.getId());
-            }else{
-                dynamicRouteService.add(definition);
-            }
-        }
-        if(ObjectUtils.isNotEmpty(baseMap)){
-            String delRouterId = baseMap.get("delRouterId");
-            if (ObjectUtils.isNotEmpty(delRouterId)) {
-                dynamicRouteService.delete(delRouterId);
-            }
-        }
-        this.publisher.publishEvent(new RefreshRoutesEvent(this));
-    }
-
-    /**
-     * redis中的信息需要处理下 转成RouteDefinition对象
-     * - id: login
-     * uri: lb://cloud-jeecg-system
-     * predicates:
-     * - Path=/jeecg-boot/sys/**,
-     *
-     * @param array
-     * @return
-     */
-
-    public static List<MyRouteDefinition> getRoutesByJson(JSONArray array) throws URISyntaxException {
-        List<MyRouteDefinition> ls = new ArrayList<>();
-        for (int i = 0; i < array.size(); i++) {
-            JSONObject obj = array.getJSONObject(i);
-            MyRouteDefinition route = new MyRouteDefinition();
-            route.setId(obj.getString("routerId"));
-            route.setStatus(obj.getInteger("status"));
-            Object uri = obj.get("uri");
-            if (uri == null) {
-                route.setUri(new URI("lb://" + obj.getString("name")));
-            } else {
-                route.setUri(new URI(obj.getString("uri")));
-            }
-            Object predicates = obj.get("predicates");
-            if (predicates != null) {
-                //update-begin-author:liusq---date:2023-10-15--for: [issues/5331]网关路由配置问题
-                List<PredicatesVo> list = JSON.parseArray(predicates.toString(), PredicatesVo.class);
-                //获取合并后的Predicates,防止配置多个path导致路径失效的问题
-                Map<String, List<String>> groupedPredicates = new HashMap<>();
-                for (PredicatesVo predicatesVo : list) {
-                    String name = predicatesVo.getName();
-                    List<String> args = predicatesVo.getArgs();
-                    groupedPredicates.computeIfAbsent(name, k -> new ArrayList<>()).addAll(args);
-                }
-                //合并后的list
-                list = new ArrayList<>();
-                for (Map.Entry<String, List<String>> entry : groupedPredicates.entrySet()) {
-                    String name = entry.getKey();
-                    List<String> args = entry.getValue();
-                    list.add(new PredicatesVo(name, args));
-                }
-                //update-end-author:liusq---date:2023-10-15--for:[issues/5331]网关路由配置问题
-                List<PredicateDefinition> predicateDefinitionList = new ArrayList<>();
-                for (Object map : list) {
-                    JSONObject json = JSON.parseObject(JSON.toJSONString(map));
-                    PredicateDefinition predicateDefinition = new PredicateDefinition();
-                    //update-begin-author:zyf date:20220419 for:【VUEN-762】路由条件添加异常问题,原因是部分路由条件参数需要设置固定key
-                    String name=json.getString("name");
-                    predicateDefinition.setName(name);
-                    //路由条件是否拼接Key
-                    if(ArrayUtil.contains(GEN_KEY_ROUTERS,name)) {
-                        JSONArray jsonArray = json.getJSONArray("args");
-                        for (int j = 0; j < jsonArray.size(); j++) {
-                            predicateDefinition.addArg("_genkey" + j, jsonArray.get(j).toString());
-                        }
-                    }else{
-                        JSONObject jsonObject = json.getJSONObject("args");
-                        if(ObjectUtil.isNotEmpty(jsonObject)){
-                            for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
-                                Object valueObj=entry.getValue();
-                                if(ObjectUtil.isNotEmpty(valueObj)) {
-                                    predicateDefinition.addArg(entry.getKey(), valueObj.toString());
-                                }
-                            }
-                        }
-                    }
-                    //update-end-author:zyf date:20220419 for:【VUEN-762】路由条件添加异常问题,原因是部分路由条件参数需要设置固定key
-                    predicateDefinitionList.add(predicateDefinition);
-                }
-                route.setPredicates(predicateDefinitionList);
-            }
-
-            Object filters = obj.get("filters");
-            if (filters != null) {
-                JSONArray list = JSON.parseArray(filters.toString());
-                List<FilterDefinition> filterDefinitionList = new ArrayList<>();
-                if (ObjectUtil.isNotEmpty(list)) {
-                    for (Object map : list) {
-                        JSONObject json = (JSONObject) map;
-                        JSONArray jsonArray = json.getJSONArray("args");
-                        String name = json.getString("name");
-                        FilterDefinition filterDefinition = new FilterDefinition();
-                        for (Object o : jsonArray) {
-                            JSONObject params = (JSONObject) o;
-                            filterDefinition.addArg(params.getString("key"), params.get("value").toString());
-                        }
-                        filterDefinition.setName(name);
-                        filterDefinitionList.add(filterDefinition);
-                    }
-                    route.setFilters(filterDefinitionList);
-                }
-            }
-            ls.add(route);
-        }
-        return ls;
-    }
-
-
-//    private void loadRoutesByDataBase() {
-//        List<GatewayRouteVo> routeList = jdbcTemplate.query(SELECT_ROUTES, new RowMapper<GatewayRouteVo>() {
-//            @Override
-//            public GatewayRouteVo mapRow(ResultSet rs, int i) throws SQLException {
-//                GatewayRouteVo result = new GatewayRouteVo();
-//                result.setId(rs.getString("id"));
-//                result.setName(rs.getString("name"));
-//                result.setUri(rs.getString("uri"));
-//                result.setStatus(rs.getInt("status"));
-//                result.setRetryable(rs.getInt("retryable"));
-//                result.setPredicates(rs.getString("predicates"));
-//                result.setStripPrefix(rs.getInt("strip_prefix"));
-//                result.setPersist(rs.getInt("persist"));
-//                return result;
-//            }
-//        });
-//        if (ObjectUtil.isNotEmpty(routeList)) {
-//            // 加载路由
-//            routeList.forEach(route -> {
-//                RouteDefinition definition = new RouteDefinition();
-//                List<PredicateDefinition> predicatesList = Lists.newArrayList();
-//                List<FilterDefinition> filtersList = Lists.newArrayList();
-//                definition.setId(route.getId());
-//                String predicates = route.getPredicates();
-//                String filters = route.getFilters();
-//                if (StringUtils.isNotEmpty(predicates)) {
-//                    predicatesList = JSON.parseArray(predicates, PredicateDefinition.class);
-//                    definition.setPredicates(predicatesList);
-//                }
-//                if (StringUtils.isNotEmpty(filters)) {
-//                    filtersList = JSON.parseArray(filters, FilterDefinition.class);
-//                    definition.setFilters(filtersList);
-//                }
-//                URI uri = UriComponentsBuilder.fromUriString(route.getUri()).build().toUri();
-//                definition.setUri(uri);
-//                this.repository.save(Mono.just(definition)).subscribe();
-//            });
-//            log.info("加载路由:{}==============", routeList.size());
-//            Mono.empty();
-//        }
-//    }
-
-
-    /**
-     * 监听Nacos下发的动态路由配置
-     *
-     * @param dataId
-     * @param group
-     */
-    public void dynamicRouteByNacosListener(String dataId, String group) {
-        try {
-            configService.addListener(dataId, group, new Listener() {
-                @Override
-                public void receiveConfigInfo(String configInfo) {
-                    log.info("进行网关更新:\n\r{}", configInfo);
-                    List<MyRouteDefinition> definitionList = JSON.parseArray(configInfo, MyRouteDefinition.class);
-                    for (MyRouteDefinition definition : definitionList) {
-                        log.info("update route : {}", definition.toString());
-                        dynamicRouteService.update(definition);
-                    }
-                }
-
-                @Override
-                public Executor getExecutor() {
-                    log.info("getExecutor\n\r");
-                    return null;
-                }
-            });
-        } catch (Exception e) {
-            log.error("从nacos接收动态路由配置出错!!!", e);
-        }
-    }
-
-    /**
-     * 创建ConfigService
-     *
-     * @return
-     */
-    private ConfigService createConfigService() {
-        try {
-            Properties properties = new Properties();
-            properties.setProperty("serverAddr", gatewayRoutersConfig.getServerAddr());
-            if(StringUtils.isNotBlank(gatewayRoutersConfig.getNamespace())){
-                properties.setProperty("namespace", gatewayRoutersConfig.getNamespace());
-            }
-            if(StringUtils.isNotBlank( gatewayRoutersConfig.getUsername())){
-                properties.setProperty("username", gatewayRoutersConfig.getUsername());
-            }
-            if(StringUtils.isNotBlank(gatewayRoutersConfig.getPassword())){
-                properties.setProperty("password", gatewayRoutersConfig.getPassword());
-            }
-            return configService = NacosFactory.createConfigService(properties);
-        } catch (Exception e) {
-            log.error("创建ConfigService异常", e);
-            return null;
-        }
-    }
-
-    @Override
-    public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
-        this.publisher = applicationEventPublisher;
-    }
-}

+ 0 - 89
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/repository/DynamicRouteService.java

@@ -1,89 +0,0 @@
-package org.jeecg.loader.repository;
-
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.loader.repository.MyInMemoryRouteDefinitionRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cloud.gateway.event.RefreshRoutesEvent;
-import org.springframework.cloud.gateway.route.RouteDefinition;
-import org.springframework.context.ApplicationEventPublisher;
-import org.springframework.context.ApplicationEventPublisherAware;
-import org.springframework.stereotype.Service;
-import reactor.core.publisher.Mono;
-
-/**
- * 动态更新路由网关service
- * 1)实现一个Spring提供的事件推送接口ApplicationEventPublisherAware
- * 2)提供动态路由的基础方法,可通过获取bean操作该类的方法。该类提供新增路由、更新路由、删除路由,然后实现发布的功能。
- *
- * @author zyf
- */
-@Slf4j
-@Service
-public class DynamicRouteService implements ApplicationEventPublisherAware {
-
-    @Autowired
-    private MyInMemoryRouteDefinitionRepository repository;
-
-    /**
-     * 发布事件
-     */
-
-    private ApplicationEventPublisher publisher;
-
-    @Override
-    public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
-        this.publisher = applicationEventPublisher;
-    }
-
-    /**
-     * 删除路由
-     *
-     * @param id
-     * @return
-     */
-    public synchronized void delete(String id) {
-        try {
-            repository.delete(Mono.just(id)).subscribe();
-            this.publisher.publishEvent(new RefreshRoutesEvent(this));
-        }catch (Exception e){
-            log.warn(e.getMessage(),e);
-        }
-    }
-
-    /**
-     * 更新路由
-     *
-     * @param definition
-     * @return
-     */
-    public synchronized String update(RouteDefinition definition) {
-        try {
-            log.info("gateway update route {}", definition);
-        } catch (Exception e) {
-            return "update fail,not find route  routeId: " + definition.getId();
-        }
-        try {
-            repository.save(Mono.just(definition)).subscribe();
-            this.publisher.publishEvent(new RefreshRoutesEvent(this));
-            return "success";
-        } catch (Exception e) {
-            return "update route fail";
-        }
-    }
-
-    /**
-     * 增加路由
-     *
-     * @param definition
-     * @return
-     */
-    public synchronized String add(RouteDefinition definition) {
-        log.info("gateway add route {}", definition);
-        try {
-            repository.save(Mono.just(definition)).subscribe();
-        } catch (Exception e) {
-            log.warn(e.getMessage(),e);
-        }
-        return "success";
-    }
-}

+ 0 - 68
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/repository/MyInMemoryRouteDefinitionRepository.java

@@ -1,68 +0,0 @@
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by Fernflower decompiler)
-//
-
-package org.jeecg.loader.repository;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-import ch.qos.logback.classic.Logger;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.cloud.gateway.route.RouteDefinition;
-import org.springframework.cloud.gateway.route.RouteDefinitionRepository;
-import org.springframework.cloud.gateway.support.NotFoundException;
-import org.springframework.stereotype.Component;
-import org.springframework.util.ObjectUtils;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-/**
- * @author qinfeng
- */
-@Slf4j
-@Component
-public class MyInMemoryRouteDefinitionRepository implements RouteDefinitionRepository {
-    private final Map<String, RouteDefinition> routes = Collections.synchronizedMap(new LinkedHashMap());
-
-    public MyInMemoryRouteDefinitionRepository() {
-    }
-
-    @Override
-    public Mono<Void> save(Mono<RouteDefinition> route) {
-        return route.flatMap((r) -> {
-            if (ObjectUtils.isEmpty(r.getId())) {
-                return Mono.error(new IllegalArgumentException("id may not be empty"));
-            } else {
-                this.routes.put(r.getId(), r);
-                return Mono.empty();
-            }
-        });
-    }
-
-    @Override
-    public Mono<Void> delete(Mono<String> routeId) {
-        return routeId.flatMap((id) -> {
-            if (this.routes.containsKey(id)) {
-                this.routes.remove(id);
-                return Mono.empty();
-            } else {
-                log.warn("RouteDefinition not found: " + routeId);
-                return Mono.empty();
-//                return Mono.defer(() -> {
-//                    return Mono.error(new NotFoundException("RouteDefinition not found: " + routeId));
-//                });
-            }
-        });
-    }
-
-    @Override
-    public Flux<RouteDefinition> getRouteDefinitions() {
-        Map<String, RouteDefinition> routesSafeCopy = new LinkedHashMap(this.routes);
-        return Flux.fromIterable(routesSafeCopy.values());
-    }
-}

+ 0 - 21
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/vo/GatewayRouteVo.java

@@ -1,21 +0,0 @@
-package org.jeecg.loader.vo;
-
-import lombok.Data;
-
-/**
- * 路由参数模型
- * @author zyf
- * @date: 2022/4/21 10:55
- */
-@Data
-public class GatewayRouteVo {
-    private String id;
-    private String name;
-    private String uri;
-    private String predicates;
-    private String filters;
-    private Integer stripPrefix;
-    private Integer retryable;
-    private Integer persist;
-    private Integer status;
-}

+ 0 - 22
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/vo/MyRouteDefinition.java

@@ -1,22 +0,0 @@
-package org.jeecg.loader.vo;
-
-import org.springframework.cloud.gateway.route.RouteDefinition;
-
-/**
- * 自定义RouteDefinition
- * @author zyf
- */
-public class MyRouteDefinition extends RouteDefinition {
-    /**
-     * 路由状态
-     */
-    private Integer status;
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-}

+ 0 - 20
jeecg-server-cloud/jeecg-cloud-gateway/src/main/java/org/jeecg/loader/vo/PredicatesVo.java

@@ -1,20 +0,0 @@
-package org.jeecg.loader.vo;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.util.List;
-
-/**
- * 路由配置VO
- * @author lsq
- * @Date 2023/10/15
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-public class PredicatesVo {
-    private String  name;
-    private List<String> args;
-}

+ 0 - 109
jeecg-server-cloud/jeecg-cloud-gateway/src/main/resources/application.yml

@@ -1,109 +0,0 @@
-server:
-  port: 9999
-
-spring:
-  application:
-    name: jeecg-gateway
-  main:
-    allow-circular-references: true
-  config:
-    import:
-      - optional:nacos:${spring.application.name}-@profile.name@.yaml
-  cloud:
-    nacos:
-      config:
-        server-addr: @config.server-addr@
-        group: @config.group@
-        namespace: @config.namespace@
-        username: @config.username@
-        password: @config.password@
-      discovery:
-        server-addr: ${spring.cloud.nacos.config.server-addr}
-        group: @config.group@
-        namespace: @config.namespace@
-        username: @config.username@
-        password: @config.password@
-    gateway:
-      discovery:
-        locator:
-          enabled: true
-      globalcors:
-        cors-configurations:
-          '[/**]':
-            allowCredentials: true
-            #springboot2.4后需用allowedOriginPatterns
-            allowedOriginPatterns: "*"
-            allowedMethods: "*"
-            allowedHeaders: "*"
-    #Sentinel配置
-    sentinel:
-      transport:
-        dashboard: jeecg-boot-sentinel:9000
-      # 支持链路限流
-      web-context-unify: false
-      filter:
-        enabled: false
-      # 取消Sentinel控制台懒加载
-      eager: false
-      datasource:
-        #流控规则
-        flow:  # 指定数据源名称
-          # 指定nacos数据源
-          nacos:
-            server-addr: @config.server-addr@
-            # 指定配置文件
-            dataId: ${spring.application.name}-flow-rules
-            # 指定分组
-            groupId: SENTINEL_GROUP
-            # 指定配置文件规则类型
-            rule-type: flow
-            # 指定配置文件数据格式
-            data-type: json
-        #降级规则
-        degrade:
-          nacos:
-            server-addr: @config.server-addr@
-            dataId: ${spring.application.name}-degrade-rules
-            groupId: SENTINEL_GROUP
-            rule-type: degrade
-            data-type: json
-        #系统规则
-        system:
-          nacos:
-            server-addr: @config.server-addr@
-            dataId: ${spring.application.name}-system-rules
-            groupId: SENTINEL_GROUP
-            rule-type: system
-            data-type: json
-        #授权规则
-        authority:
-          nacos:
-            server-addr: @config.server-addr@
-            dataId: ${spring.application.name}-authority-rules
-            groupId: SENTINEL_GROUP
-            rule-type: authority
-            data-type: json
-        #热点参数
-        param-flow:
-          nacos:
-            server-addr: @config.server-addr@
-            dataId: ${spring.application.name}-param-rules
-            groupId: SENTINEL_GROUP
-            rule-type: param-flow
-            data-type: json
-        #网关流控规则
-        gw-flow:
-          nacos:
-            server-addr: @config.server-addr@
-            dataId: ${spring.application.name}-flow-rules
-            groupId: SENTINEL_GROUP
-            rule-type: gw-flow
-            data-type: json
-        #API流控规则
-        gw-api-group:
-          nacos:
-            server-addr: @config.server-addr@
-            dataId: ${spring.application.name}-api-rules
-            groupId: SENTINEL_GROUP
-            rule-type: gw-api-group
-            data-type: json

+ 0 - 44
jeecg-server-cloud/jeecg-cloud-gateway/src/main/resources/logback-spring.xml

@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration debug="false">
-	<!--定义日志文件的存储地址 -->
-	<property name="LOG_HOME" value="../logs" />
-
-	<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
-	<!-- 控制台输出 -->
-	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>-->
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{50}:%L) - %msg%n</pattern>
-		</encoder>
-	</appender>
-
-	<!-- 按照每天生成日志文件 -->
-	<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<!--日志文件输出的文件名 -->
-			<FileNamePattern>${LOG_HOME}/jeecg-gateway-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
-			<!--日志文件保留天数 -->
-			<MaxHistory>30</MaxHistory>
-			<maxFileSize>10MB</maxFileSize>
-		</rollingPolicy>
-		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
-		</encoder>
-	</appender>
-
-
-	<!--myibatis log configure -->
-	<logger name="com.apache.ibatis" level="TRACE" />
-	<logger name="java.sql.Connection" level="DEBUG" />
-	<logger name="java.sql.Statement" level="DEBUG" />
-	<logger name="java.sql.PreparedStatement" level="DEBUG" />
-
-	<!-- 日志输出级别 -->
-	<root level="INFO">
-		<appender-ref ref="STDOUT" />
-		<appender-ref ref="FILE" />
-	</root>
-
-</configuration>

+ 0 - 37
jeecg-server-cloud/jeecg-cloud-gateway/src/test/java/TestRoutes.java

@@ -1,37 +0,0 @@
-import org.jeecg.loader.vo.PredicatesVo;
-import org.junit.Test;
-
-import java.util.*;
-
-/**
- * @Description: 测试
- * @author: lsq
- * @date: 2023101311:32
- */
-public class TestRoutes {
-
-    @Test
-    public void TestRoutes() {
-        List<PredicatesVo> list = new ArrayList<>();
-        PredicatesVo a = new PredicatesVo();
-        a.setName("path");
-        String[] aArr={"/sys/**","/eoa/**"};
-        a.setArgs(Arrays.asList(aArr));
-        list.add(a);
-
-        PredicatesVo b = new PredicatesVo();
-        b.setName("path");
-        String[] bArr={"/sys/**","/demo/**"};
-        b.setArgs(Arrays.asList(bArr));
-        list.add(b);
-
-        Map<String, List<String>> groupedPredicates = new HashMap<>();
-        for (PredicatesVo predicatesVo : list) {
-            String name = predicatesVo.getName();
-            List<String> args1 = predicatesVo.getArgs();
-            groupedPredicates.computeIfAbsent(name, k -> new ArrayList<>()).addAll(args1);
-        }
-        System.out.println(groupedPredicates);
-    }
-
-}

+ 0 - 15
jeecg-server-cloud/jeecg-cloud-nacos/Dockerfile

@@ -1,15 +0,0 @@
-FROM registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis
-
-MAINTAINER jeecgos@163.com
-
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-
-RUN mkdir -p /jeecg-cloud-nacos
-
-WORKDIR /jeecg-cloud-nacos
-
-EXPOSE 8848
-
-ADD ./target/jeecg-cloud-nacos-3.7.1.jar ./
-
-CMD sleep 30;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-nacos-3.7.1.jar

+ 0 - 16
jeecg-server-cloud/jeecg-cloud-nacos/README.md

@@ -1,16 +0,0 @@
-访问地址: http://localhost:8848/nacos
-账号密码:nacos/nacos
-
-
-# 使用方法
-
-- 1、目前只做了关闭鉴权模式
-- 2、此项目与官方同步,只是为了简化微服务部署
-- 3、如何不用此模块,使用自己的naocs,请创建下面目录中的配置文件
-     目录:jeecg-cloud-nacos/docs/config
-     配置文件: YAML
-
-
-# 常见问题
-- UnsupportedOperationException: Cannot determine JNI library name for ARCH='x86' OS='windows 10'
-  解决方案:http://t.zoukankan.com/mindzone-p-15808190.html

+ 0 - 146
jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg-dev.yaml

@@ -1,146 +0,0 @@
-spring:
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-        allow:
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid:
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        maxWait: 60000
-        timeBetweenEvictionRunsMillis: 60000
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        filters: stat,wall,slf4j
-        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
-      datasource:
-        master:
-          url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    password:
-    port: 6379
-  rabbitmq:
-    host: jeecg-boot-rabbitmq
-    username: guest
-    password: guest
-    port: 5672
-    publisher-confirms: true
-    publisher-returns: true
-    virtual-host: /
-    listener:
-      simple:
-        acknowledge-mode: manual
-        concurrency: 1
-        max-concurrency: 1
-        retry:
-          enabled: true
-minidao:
-  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
-jeecg:
-  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
-  signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
-  uploadType: local
-  domainUrl:
-    pc: http://localhost:3100
-    app: http://localhost:8051
-  path:
-    upload: /opt/upFiles
-    webapp: /opt/webapp
-  shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
-  oss:
-    endpoint: oss-cn-beijing.aliyuncs.com
-    accessKey: ??
-    secretKey: ??
-    bucketName: jeecgdev
-    staticDomain: ??
-  elasticsearch:
-    cluster-name: jeecg-ES
-    cluster-nodes: jeecg-boot-es:9200
-    check-enabled: false
-  file-view-domain: 127.0.0.1:8012
-  minio:
-    minio_url: http://minio.jeecg.com
-    minio_name: ??
-    minio_pass: ??
-    bucketName: otatest
-  jmreport:
-    mode: dev
-    is_verify_token: false
-    verify_methods: remove,delete,save,add,update
-  wps:
-    domain: https://wwo.wps.cn/office/
-    appid: ??
-    appsecret: ??
-  xxljob:
-    enabled: false
-    adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
-    appname: ${spring.application.name}
-    accessToken: ''
-    logPath: logs/jeecg/job/jobhandler/
-    logRetentionDays: 30
-  redisson:
-    address: jeecg-boot-redis:6379
-    password:
-    type: STANDALONE
-    enabled: true
-logging:
-  level:
-    org.jeecg.modules.system.mapper : info
-cas:
-  prefixUrl: http://localhost:8888/cas
-knife4j:
-  production: false
-  basic:
-    enable: false
-    username: jeecg
-    password: jeecg1314
-justauth:
-  enabled: true
-  type:
-    GITHUB:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
-    WECHAT_ENTERPRISE:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
-      agent-id: ??
-    DINGTALK:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
-  cache:
-    type: default
-    prefix: 'demo::'
-    timeout: 1h
-third-app:
-  enabled: false
-  type:
-    WECHAT_ENTERPRISE:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??
-    DINGTALK:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??

+ 0 - 13
jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg-gateway-dev.yaml

@@ -1,13 +0,0 @@
-jeecg:
-  route:
-    config:
-      #type:database nacos yml
-      data-type: database
-      group: DEFAULT_GROUP
-      data-id: jeecg-gateway-router
-spring:
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    port: 6379
-    password:

+ 0 - 52
jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg-gateway-router.json

@@ -1,52 +0,0 @@
-[{
-  "id": "jeecg-system",
-  "order": 0,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/sys/**",
-      "_genkey_1": "/jmreport/**",
-      "_genkey_3": "/online/**",
-      "_genkey_4": "/generic/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-system"
-}, {
-  "id": "jeecg-demo",
-  "order": 1,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/mock/**",
-      "_genkey_1": "/test/**",
-      "_genkey_2": "/bigscreen/template1/**",
-      "_genkey_3": "/bigscreen/template2/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-demo"
-}, {
-  "id": "jeecg-system-websocket",
-  "order": 2,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/websocket/**",
-      "_genkey_1": "/newsWebsocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-system"
-}, {
-  "id": "jeecg-demo-websocket",
-  "order": 3,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/vxeSocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-demo"
-}]

+ 0 - 100
jeecg-server-cloud/jeecg-cloud-nacos/docs/config/jeecg.yaml

@@ -1,100 +0,0 @@
-server:
-  tomcat:
-    max-swallow-size: -1
-  error:
-    include-exception: true
-    include-stacktrace: ALWAYS
-    include-message: ALWAYS
-  compression:
-    enabled: true
-    min-response-size: 1024
-    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-management:
-  health:
-    mail:
-      enabled: false
-  endpoints:
-    web:
-      exposure:
-        include: "*"
-    health:
-      sensitive: true
-  endpoint:
-    health:
-      show-details: ALWAYS
-spring:
-  servlet:
-    multipart:
-      max-file-size: 10MB
-      max-request-size: 10MB
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  quartz:
-    job-store-type: jdbc
-    initialize-schema: embedded
-    auto-startup: false
-    startup-delay: 1s
-    overwrite-existing-jobs: true
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: MyScheduler
-            instanceId: AUTO
-          jobStore:
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: true
-            misfireThreshold: 12000
-            clusterCheckinInterval: 15000
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-  jackson:
-    date-format:   yyyy-MM-dd HH:mm:ss
-    time-zone:   GMT+8
-  aop:
-    proxy-target-class: true
-  activiti:
-    check-process-definitions: false
-    async-executor-activate: false
-    job-executor-activate: false
-  jpa:
-    open-in-view: false
-  freemarker:
-    suffix: .ftl
-    content-type: text/html
-    charset: UTF-8
-    cache: false
-    prefer-file-system-access: false
-    template-loader-path:
-      - classpath:/templates
-  mvc:
-    static-path-pattern: /**
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
-  global-config:
-    banner: false
-    db-config:
-      id-type: ASSIGN_ID
-      table-underline: true
-  configuration:
-    call-setters-on-nulls: true

+ 0 - 59
jeecg-server-cloud/jeecg-cloud-nacos/docs/config/分库分表/jeecg-sharding-multi.yaml

@@ -1,59 +0,0 @@
-spring:
-  shardingsphere:
-    datasource:
-      names: ds0,ds1
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-      ds1:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-    props:
-      sql-show: true
-    rules:
-      replica-query:
-        load-balancers:
-          round-robin:
-            type: ROUND_ROBIN
-            props:
-              default: 0
-        data-sources:
-          prds:
-            primary-data-source-name: ds0
-            replica-data-source-names: ds1
-            load-balancer-name: round_robin
-      sharding:
-        binding-tables:
-          - sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-          database-inline:
-            type: INLINE
-            props:
-              algorithm-expression: ds$->{operate_type % 2}
-        tables:
-          sys_log:
-            actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}
-            database-strategy:
-              standard:
-                sharding-column: operate_type
-                sharding-algorithm-name: database-inline
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type

+ 0 - 33
jeecg-server-cloud/jeecg-cloud-nacos/docs/config/分库分表/jeecg-sharding.yaml

@@ -1,33 +0,0 @@
-spring:
-  shardingsphere:
-    datasource:
-      names: ds0
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        username: root
-        password: root
-        type: com.alibaba.druid.pool.DruidDataSource
-    props:
-      sql-show: true
-    rules:
-      sharding:
-        binding-tables: sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-        tables:
-          sys_log:
-            actual-data-nodes: ds0.sys_log$->{0..1}
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type

+ 0 - 3275
jeecg-server-cloud/jeecg-cloud-nacos/docs/db/nacos_dm.sql

@@ -1,3275 +0,0 @@
-CREATE TABLE "NACOS"."CONFIG_INFO"
-(
- "ID" BIGINT IDENTITY(1,1) NOT NULL,
- "DATA_ID" VARCHAR(255) NOT NULL,
- "GROUP_ID" VARCHAR(128) NULL,
- "CONTENT" CLOB NOT NULL,
- "MD5" VARCHAR(32) NULL,
- "GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "SRC_USER" TEXT NULL,
- "SRC_IP" VARCHAR(50) NULL,
- "APP_NAME" VARCHAR(128) NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NULL,
- "C_DESC" VARCHAR(256) NULL,
- "C_USE" VARCHAR(64) NULL,
- "EFFECT" VARCHAR(64) NULL,
- "TYPE" VARCHAR(64) NULL,
- "C_SCHEMA" TEXT NULL,
- "ENCRYPTED_DATA_KEY" TEXT NOT NULL
-);
-CREATE TABLE "NACOS"."CONFIG_INFO_AGGR"
-(
- "ID" BIGINT IDENTITY(1,1) NOT NULL,
- "DATA_ID" VARCHAR(255) NOT NULL,
- "GROUP_ID" VARCHAR(128) NOT NULL,
- "DATUM_ID" VARCHAR(255) NOT NULL,
- "CONTENT" CLOB NOT NULL,
- "GMT_MODIFIED" TIMESTAMP(0) NOT NULL,
- "APP_NAME" VARCHAR(128) NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NULL
-);
-CREATE TABLE "NACOS"."CONFIG_INFO_BETA"
-(
- "ID" BIGINT IDENTITY(1,1) NOT NULL,
- "DATA_ID" VARCHAR(255) NOT NULL,
- "GROUP_ID" VARCHAR(128) NOT NULL,
- "APP_NAME" VARCHAR(128) NULL,
- "CONTENT" CLOB NOT NULL,
- "BETA_IPS" VARCHAR(1024) NULL,
- "MD5" VARCHAR(32) NULL,
- "GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "SRC_USER" TEXT NULL,
- "SRC_IP" VARCHAR(50) NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NULL,
- "ENCRYPTED_DATA_KEY" TEXT NOT NULL
-);
-CREATE TABLE "NACOS"."CONFIG_INFO_TAG"
-(
- "ID" BIGINT IDENTITY(1,1) NOT NULL,
- "DATA_ID" VARCHAR(255) NOT NULL,
- "GROUP_ID" VARCHAR(128) NOT NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NULL,
- "TAG_ID" VARCHAR(128) NOT NULL,
- "APP_NAME" VARCHAR(128) NULL,
- "CONTENT" CLOB NOT NULL,
- "MD5" VARCHAR(32) NULL,
- "GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "SRC_USER" TEXT NULL,
- "SRC_IP" VARCHAR(50) NULL
-);
-CREATE TABLE "NACOS"."CONFIG_TAGS_RELATION"
-(
- "ID" BIGINT NOT NULL,
- "TAG_NAME" VARCHAR(128) NOT NULL,
- "TAG_TYPE" VARCHAR(64) NULL,
- "DATA_ID" VARCHAR(255) NOT NULL,
- "GROUP_ID" VARCHAR(128) NOT NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NULL,
- "NID" BIGINT IDENTITY(1,1) NOT NULL
-);
-CREATE TABLE "NACOS"."GROUP_CAPACITY"
-(
- "ID" BIGINT IDENTITY(1,1) NOT NULL,
- "GROUP_ID" VARCHAR(128) DEFAULT ''
- NOT NULL,
- "QUOTA" BIGINT DEFAULT 0
- NOT NULL,
- "USAGE" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_SIZE" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_AGGR_COUNT" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_AGGR_SIZE" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_HISTORY_COUNT" BIGINT DEFAULT 0
- NOT NULL,
- "GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL
-);
-CREATE TABLE "NACOS"."HIS_CONFIG_INFO"
-(
- "ID" DECIMAL(20,0) NOT NULL,
- "NID" BIGINT IDENTITY(1,1) NOT NULL,
- "DATA_ID" VARCHAR(255) NOT NULL,
- "GROUP_ID" VARCHAR(128) NOT NULL,
- "APP_NAME" VARCHAR(128) NULL,
- "CONTENT" CLOB NOT NULL,
- "MD5" VARCHAR(32) NULL,
- "GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "SRC_USER" TEXT NULL,
- "SRC_IP" VARCHAR(50) NULL,
- "OP_TYPE" CHAR(10) NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NULL,
- "ENCRYPTED_DATA_KEY" TEXT NOT NULL
-);
-CREATE TABLE "NACOS"."PERMISSIONS"
-(
- "ROLE" VARCHAR(50) NOT NULL,
- "RESOURCE" VARCHAR(255) NOT NULL,
- "ACTION" VARCHAR(8) NOT NULL
-);
-CREATE TABLE "NACOS"."ROLES"
-(
- "USERNAME" VARCHAR(50) NOT NULL,
- "ROLE" VARCHAR(50) NOT NULL
-);
-CREATE TABLE "NACOS"."TENANT_CAPACITY"
-(
- "ID" BIGINT IDENTITY(1,1) NOT NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NOT NULL,
- "QUOTA" BIGINT DEFAULT 0
- NOT NULL,
- "USAGE" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_SIZE" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_AGGR_COUNT" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_AGGR_SIZE" BIGINT DEFAULT 0
- NOT NULL,
- "MAX_HISTORY_COUNT" BIGINT DEFAULT 0
- NOT NULL,
- "GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL,
- "GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
- NOT NULL
-);
-CREATE TABLE "NACOS"."TENANT_INFO"
-(
- "ID" BIGINT IDENTITY(1,1) NOT NULL,
- "KP" VARCHAR(128) NOT NULL,
- "TENANT_ID" VARCHAR(128) DEFAULT ''
- NULL,
- "TENANT_NAME" VARCHAR(128) DEFAULT ''
- NULL,
- "TENANT_DESC" VARCHAR(256) NULL,
- "CREATE_SOURCE" VARCHAR(32) NULL,
- "GMT_CREATE" BIGINT NOT NULL,
- "GMT_MODIFIED" BIGINT NOT NULL
-);
-CREATE TABLE "NACOS"."USERS"
-(
- "USERNAME" VARCHAR(50) NOT NULL,
- "PASSWORD" VARCHAR(500) NOT NULL,
- "ENABLED" TINYINT NOT NULL
-);
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO" ON;
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(2,'jeecg-dev.yaml','DEFAULT_GROUP','spring:
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-        allow:
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
-        # 连接池的配置信息
-        # 初始化大小,最小,最大
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        # 配置获取连接等待超时的时间
-        maxWait: 60000
-        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-        timeBetweenEvictionRunsMillis: 60000
-        # 配置一个连接在池中最小生存的时间,单位是毫秒
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        # 打开PSCache,并且指定每个连接上PSCache的大小
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,''wall''用于防火墙
-        filters: stat,wall,slf4j
-        wall:
-          selectWhereAlwayTrueCheck: false
-        stat:
-          merge-sql: true
-          slow-sql-millis: 5000
-
-      datasource:
-        master:
-          url: jdbc:mysql://jeecg-boot-mysql:3306/jeecgbootsy3_6?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-          # 多数据源配置
-          #multi-datasource1:
-          #url: jdbc:mysql://localhost:3306/jeecgboot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          #username: root
-          #password: root
-          #driver-class-name: com.mysql.cj.jdbc.Driver
-  #redis 配置
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    lettuce:
-      pool:
-        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
-        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
-        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
-        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
-      shutdown-timeout: 100ms
-    password:
-    port: 6379
-    #mongodb
-  data:
-    mongodb:
-      #有密码连接 账号密码包含特殊字符的需要用URLEncoder编码 库名必填
-      #uri: mongodb://jeecgdev:jeecgd_89@111.225.222.176:27017/jeecgdev
-      uri: mongodb://jeecg:123456@jeecg-boot-mongo:27017/jeecg?readPreference=secondaryPreferred&maxIdleTimeMS=60000&waitQueueTimeoutMS=2000&minPoolSize=5&maxPoolSize=100&maxLifeTimeMS=0&connectTimeoutMS=2000&socketTimeoutMS=2000
-      #集群方式
-      #uri: mongodb://192.168.0.221:27017,192.168.0.221:27018/imgdb
-      print: true  #是否打印查询语句
-      slowQuery: true  #是否记录慢查询到数据库中
-      slowTime: 1000 #慢查询最短时间,默认为1000毫秒
-  #rabbitmq配置
-  rabbitmq:
-    host: jeecg-boot-rabbitmq
-    username: guest
-    password: guest
-    port: 5672
-    publisher-confirms: true
-    publisher-returns: true
-    virtual-host: /
-    listener:
-      simple:
-        acknowledge-mode: manual
-        #消费者的最小数量
-        concurrency: 1
-        #消费者的最大数量
-        max-concurrency: 1
-        #是否支持重试
-        retry:
-          enabled: true
-#jeecg专用配置
-minidao:
-  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
-jeecg:
-  firewall:
-    dataSourceSafe: false
-    lowCodeMode: dev
-  # 签名密钥串(前后端要一致,正式发布请自行修改)
-  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
-  # 本地:local\Minio:minio\阿里云:alioss
-  uploadType: local
-  # 前端访问地址
-  domainUrl:
-    pc: http://localhost:3100
-    app: http://localhost:8051
-  path :
-    #文件上传根目录 设置
-    upload: /opt/upFiles
-    #webapp文件路径
-    webapp: /opt/webapp
-  shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/bigscreen/category/**,/bigscreen/visual/**,/bigscreen/map/**,/jmreport/bigscreen2/**
-  #阿里云oss存储配置
-  oss:
-    endpoint: oss-cn-beijing.aliyuncs.com
-    accessKey: ??
-    secretKey: ??
-    bucketName: jeecgdev
-    staticDomain: ??
-  # ElasticSearch 6设置
-  elasticsearch:
-    cluster-name: jeecg-ES
-    cluster-nodes: 127.0.0.1:9200
-    check-enabled: false
-  # 表单设计器配置
-  desform:
-    # 主题颜色(仅支持 16进制颜色代码)
-    theme-color: "#1890ff"
-    # 文件、图片上传方式,可选项:qiniu(七牛云)、system(跟随系统配置)
-    upload-type: system
-    map:
-      # 配置百度地图的AK,申请地址:https://lbs.baidu.com/apiconsole/key?application=key#/home
-      baidu: ??
-  # 在线预览文件服务器地址配置
-  file-view-domain: 127.0.0.1:8012
-  # minio文件上传
-  minio:
-    minio_url: http://minio.jeecg.com
-    minio_name: ??
-    minio_pass: ??
-    bucketName: otatest
-  #大屏报表参数设置
-  jmreport:
-    saasMode:
-    firewall:
-      dataSourceSafe: false
-      lowCodeMode: dev
-  ai-chat:
-    enabled: false
-    apiKey: "????"
-    apiHost: "https://api.openai.com"
-    timeout: 60
-  #Wps在线文档
-  wps:
-    domain: https://wwo.wps.cn/office/
-    appid: ??
-    appsecret: ??
-  #xxl-job配置
-  xxljob:
-    enabled: false
-    adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
-    appname: ${spring.application.name}
-    accessToken: ''''
-    logPath: logs/jeecg/job/jobhandler/
-    logRetentionDays: 30
-  #分布式锁配置
-  redisson:
-    address: jeecg-boot-redis:6379
-    password:
-    type: STANDALONE
-    enabled: true
-#Mybatis输出sql日志
-logging:
-  level:
-    org.jeecg.modules.system.mapper: info
-#cas单点登录
-cas:
-  prefixUrl: http://localhost:8888/cas
-#swagger
-knife4j:
-  enable: true
-  #开启生产环境屏蔽
-  production: false
-  basic:
-    enable: false
-    username: jeecg
-    password: jeecg1314
-
-#第三方登录
-justauth:
-  enabled: true
-  type:
-    GITHUB:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
-    WECHAT_ENTERPRISE:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
-      agent-id: 1000002
-    DINGTALK:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
-  cache:
-    type: default
-    prefix: ''demo::''
-    timeout: 1h
-#第三方APP对接
-third-app:
-  enabled: false
-  type:
-    #企业微信
-    WECHAT_ENTERPRISE:
-      enabled: false
-      #CORP_ID
-      client-id: ??
-      #SECRET
-      client-secret: ??
-      agent-id: ??
-      #自建应用秘钥(新版企微需要配置)
-      # agent-app-secret: ??
-    #钉钉
-    DINGTALK:
-      enabled: false
-      # appKey
-      client-id: ??
-      # appSecret
-      client-secret: ??
-      agent-id: ??','350e31a280673586f2203956da576136',TO_DATE('2024-07-09 14:30:06','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:06','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','','',null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(3,'jeecg.yaml','DEFAULT_GROUP','server:
-  tomcat:
-    max-swallow-size: -1
-  error:
-    include-exception: true
-    include-stacktrace: ALWAYS
-    include-message: ALWAYS
-  compression:
-    enabled: true
-    min-response-size: 1024
-    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-management:
-  health:
-    mail:
-      enabled: false
-  endpoints:
-    web:
-      exposure:
-        include: "*" #暴露所有节点
-    health:
-      sensitive: true #关闭过滤敏感信息
-  endpoint:
-    health:
-      show-details: ALWAYS  #显示详细信息
-flowable:
-  # 自动部署验证设置:true-开启(默认)、false-关闭
-  check-process-definitions: false
-  #配置项可以设置流程引擎启动和关闭时数据库执行的策略
-  database-schema-update: false
-  #保存历史数据级别设置为full最高级别,便于历史数据的追溯
-  history-level: full
-  #开启定时任务
-  async-executor-activate: true
-spring:
-  servlet:
-    multipart:
-      max-file-size: 10MB
-      max-request-size: 10MB
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  ## quartz定时任务,采用数据库方式
-  quartz:
-    job-store-type: jdbc
-    initialize-schema: embedded
-    #设置自动启动,默认为 true
-    auto-startup: false
-    #延迟1秒启动定时任务
-    startup-delay: 1s
-    #启动时更新己存在的Job
-    overwrite-existing-jobs: true
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: MyScheduler
-            instanceId: AUTO
-          jobStore:
-            #class: org.quartz.impl.jdbcjobstore.JobStoreTX
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: true
-            misfireThreshold: 12000
-            clusterCheckinInterval: 15000
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-  #json 时间戳统一转换
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-  aop:
-    proxy-target-class: true
-  jpa:
-    open-in-view: false
-  #配置freemarker
-  freemarker:
-    # 设置模板后缀名
-    suffix: .ftl
-    # 设置文档类型
-    content-type: text/html
-    # 设置页面编码格式
-    charset: UTF-8
-    # 设置页面缓存
-    cache: false
-    prefer-file-system-access: false
-    # 设置ftl文件路径
-    template-loader-path:
-      - classpath:/templates
-    template_update_delay: 0
-  # 设置静态文件路径,js,css等
-  mvc:
-    static-path-pattern: /**
-    #Spring Boot 2.6+ 手动指定为ant-path-matcher
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude:
-      - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-      - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
-#mybatis plus 设置
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
-  global-config:
-    # 关闭MP3.0自带的banner
-    banner: false
-    db-config:
-      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
-      id-type: ASSIGN_ID
-      # 默认数据库表下划线命名
-      table-underline: true
-  configuration:
-    # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
-    #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-    # 返回类型为Map,显示null对应的字段
-    call-setters-on-nulls: true','94755a848afefef22e34ff83668ec4f7',TO_DATE('2024-07-09 14:30:06','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:06','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','','',null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(4,'jeecg-gateway-router.json','DEFAULT_GROUP','[{
-  "id": "jeecg-system",
-  "order": 0,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/sys/**",
-      "_genkey_1": "/eoa/**",
-      "_genkey_2": "/joa/**",
-      "_genkey_3": "/jmreport/**",
-      "_genkey_4": "/bigscreen/**",
-      "_genkey_5": "/desform/**",
-      "_genkey_6": "/online/**",
-      "_genkey_8": "/act/**",
-      "_genkey_9": "/plug-in/**",
-      "_genkey_10": "/generic/**",
-      "_genkey_11": "/v1/**",
-      "_genkey_12": "/desflow/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-system"
-}, {
-  "id": "jeecg-demo",
-  "order": 1,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/mock/**",
-      "_genkey_1": "/test/**",
-      "_genkey_2": "/bigscreen/template1/**",
-      "_genkey_3": "/bigscreen/template2/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-demo"
-}, {
-  "id": "jeecg-system-websocket",
-  "order": 2,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/websocket/**",
-      "_genkey_1": "/eoaSocket/**",
-      "_genkey_2": "/newsWebsocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-system"
-}, {
-  "id": "jeecg-demo-websocket",
-  "order": 3,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/vxeSocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-demo"
-}]','c9eff51f264ebe266c07ad1c5b6778e2',TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','','',null,null,'json',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(5,'jeecg-gateway-dev.yaml','DEFAULT_GROUP','jeecg:
-  route:
-    config:
-      #路由加载模式: database、nacos、yml
-      data-type: database
-      #Nacos模式,读取配置文件jeecg-gateway-router.json(固定)
-      group: DEFAULT_GROUP
-      data-id: jeecg-gateway-router
-spring:
-  #redis配置
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    port: 6379
-    password:
-#swagger
-knife4j:
-  #开启生产环境屏蔽
-  production: false','8fea1277e460b477987521aecf432150',TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','','',null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(6,'jeecg-sharding.yaml','DEFAULT_GROUP','spring:
-  shardingsphere:
-    datasource:
-      names: ds0
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        username: root
-        password: root
-        type: com.alibaba.druid.pool.DruidDataSource
-    props:
-      sql-show: true
-    rules:
-      sharding:
-        binding-tables: sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-        tables:
-          sys_log:
-            actual-data-nodes: ds0.sys_log$->{0..1}
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','5d7aad99a23e68589e93facd1b221aea',TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','',null,null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(7,'jeecg-sharding-multi.yaml','DEFAULT_GROUP','spring:
-  shardingsphere:
-    datasource:
-      names: ds0,ds1
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-      ds1:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-    props:
-      sql-show: true
-    rules:
-      replica-query:
-        load-balancers:
-          round-robin:
-            type: ROUND_ROBIN
-            props:
-              default: 0
-        data-sources:
-          prds:
-            primary-data-source-name: ds0
-            replica-data-source-names: ds1
-            load-balancer-name: round_robin
-      sharding:
-        binding-tables:
-          - sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-          database-inline:
-            type: INLINE
-            props:
-              algorithm-expression: ds$->{operate_type % 2}
-        tables:
-          sys_log:
-            actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}
-            database-strategy:
-              standard:
-                sharding-column: operate_type
-                sharding-algorithm-name: database-inline
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','ef2f42fb2dda43cd0d4397a820f3144e',TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','',null,null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(14,'jeecg-dev.yaml','DEFAULT_GROUP','spring:
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-        allow:
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid:
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        maxWait: 60000
-        timeBetweenEvictionRunsMillis: 60000
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        filters: stat,wall,slf4j
-        wall:
-          selectWhereAlwayTrueCheck: false
-        stat:
-          merge-sql: true
-          slow-sql-millis: 5000
-      datasource:
-        master:
-          url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-  data:
-    redis:
-      database: 0
-      host: jeecg-boot-redis
-      password:
-      port: 6379
-  rabbitmq:
-    host: jeecg-boot-rabbitmq
-    username: guest
-    password: guest
-    port: 5672
-    publisher-confirms: true
-    publisher-returns: true
-    virtual-host: /
-    listener:
-      simple:
-        acknowledge-mode: manual
-        concurrency: 1
-        max-concurrency: 1
-        retry:
-          enabled: true
-  flyway:
-    enabled: false
-    encoding: UTF-8
-    locations: classpath:flyway/sql/mysql
-    sql-migration-prefix: V
-    sql-migration-separator: __
-    placeholder-prefix: ''#(''
-    placeholder-suffix: )
-    sql-migration-suffixes: .sql
-    validate-on-migrate: true
-    baseline-on-migrate: true
-    clean-disabled: true
-minidao:
-  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
-jeecg:
-  firewall:
-    dataSourceSafe: false
-    lowCodeMode: dev
-  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
-  signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
-  uploadType: local
-  domainUrl:
-    pc: http://localhost:3100
-    app: http://localhost:8051
-  path:
-    upload: /opt/upFiles
-    webapp: /opt/webapp
-  shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
-  oss:
-    endpoint: oss-cn-beijing.aliyuncs.com
-    accessKey: ??
-    secretKey: ??
-    bucketName: jeecgdev
-    staticDomain: ??
-  elasticsearch:
-    cluster-name: jeecg-ES
-    cluster-nodes: jeecg-boot-es:9200
-    check-enabled: false
-  file-view-domain: 127.0.0.1:8012
-  minio:
-    minio_url: http://minio.jeecg.com
-    minio_name: ??
-    minio_pass: ??
-    bucketName: otatest
-  jmreport:
-    saasMode:
-    firewall:
-      dataSourceSafe: false
-      lowCodeMode: dev
-  wps:
-    domain: https://wwo.wps.cn/office/
-    appid: ??
-    appsecret: ??
-  xxljob:
-    enabled: false
-    adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
-    appname: ${spring.application.name}
-    accessToken: ''''
-    logPath: logs/jeecg/job/jobhandler/
-    logRetentionDays: 30
-  redisson:
-    address: jeecg-boot-redis:6379
-    password:
-    type: STANDALONE
-    enabled: true
-  ai-chat:
-    enabled: false
-    apiKey: "????"
-    apiHost: "https://api.openai.com"
-    timeout: 60
-logging:
-  level:
-    org.jeecg.modules.system.mapper : info
-cas:
-  prefixUrl: http://localhost:8888/cas
-knife4j:
-  production: false
-  basic:
-    enable: false
-    username: jeecg
-    password: jeecg1314
-justauth:
-  enabled: true
-  type:
-    GITHUB:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
-    WECHAT_ENTERPRISE:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
-      agent-id: ??
-    DINGTALK:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
-  cache:
-    type: default
-    prefix: ''demo::''
-    timeout: 1h
-third-app:
-  enabled: false
-  type:
-    WECHAT_ENTERPRISE:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??
-    DINGTALK:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??','91c29720dfb424916a769201a25200cf',TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','springboot3','',null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(15,'jeecg.yaml','DEFAULT_GROUP','server:
-  undertow:
-    # max-http-post-size: 10MB
-    worker-threads: 16
-    buffers:
-      websocket: 8192
-      io: 16384
-  error:
-    include-exception: true
-    include-stacktrace: ALWAYS
-    include-message: ALWAYS
-  compression:
-    enabled: true
-    min-response-size: 1024
-    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-management:
-  health:
-    mail:
-      enabled: false
-  endpoints:
-    web:
-      exposure:
-        include: "*"
-    health:
-      sensitive: true
-  endpoint:
-    health:
-      show-details: ALWAYS
-spring:
-  servlet:
-    multipart:
-      max-file-size: 10MB
-      max-request-size: 10MB
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  quartz:
-    job-store-type: jdbc
-    initialize-schema: embedded
-    auto-startup: false
-    startup-delay: 1s
-    overwrite-existing-jobs: true
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: MyScheduler
-            instanceId: AUTO
-          jobStore:
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: true
-            misfireThreshold: 12000
-            clusterCheckinInterval: 15000
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-  aop:
-    proxy-target-class: true
-  activiti:
-    check-process-definitions: false
-    async-executor-activate: false
-    job-executor-activate: false
-  jpa:
-    open-in-view: false
-  freemarker:
-    suffix: .ftl
-    content-type: text/html
-    charset: UTF-8
-    cache: false
-    prefer-file-system-access: false
-    template-loader-path:
-      - classpath:/templates
-  mvc:
-    static-path-pattern: /**
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude:
-      - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-      - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
-  global-config:
-    banner: false
-    db-config:
-      id-type: ASSIGN_ID
-      table-underline: true
-  configuration:
-    call-setters-on-nulls: true','ce1ca3b6f8431e884aed94ab29be43a9',TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','springboot3','',null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(16,'jeecg-gateway-router.json','DEFAULT_GROUP','[{
-  "id": "jeecg-system",
-  "order": 0,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/sys/**",
-      "_genkey_1": "/jmreport/**",
-      "_genkey_3": "/online/**",
-      "_genkey_4": "/generic/**",
-      "_genkey_5": "/oauth2/**",
-      "_genkey_6": "/drag/**",
-      "_genkey_7": "/actuator/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-system"
-}, {
-  "id": "jeecg-demo",
-  "order": 1,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/mock/**",
-      "_genkey_1": "/test/**",
-      "_genkey_2": "/bigscreen/template1/**",
-      "_genkey_3": "/bigscreen/template2/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-demo"
-}, {
-  "id": "jeecg-system-websocket",
-  "order": 2,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/websocket/**",
-      "_genkey_1": "/newsWebsocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-system"
-}, {
-  "id": "jeecg-demo-websocket",
-  "order": 3,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/vxeSocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-demo"
-}]','9794beb09d30bc6b835f2ee870781587',TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','springboot3','',null,null,'json',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(17,'jeecg-sharding.yaml','DEFAULT_GROUP','spring:
-  shardingsphere:
-    datasource:
-      names: ds0
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        username: root
-        password: root
-        type: com.alibaba.druid.pool.DruidDataSource
-    props:
-      sql-show: true
-    rules:
-      sharding:
-        binding-tables: sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-        tables:
-          sys_log:
-            actual-data-nodes: ds0.sys_log$->{0..1}
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','a93fa455c32cd37ca84631d2bbe13005',TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','springboot3','',null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(18,'jeecg-gateway-dev.yaml','DEFAULT_GROUP','jeecg:
-  route:
-    config:
-      #type:database nacos yml
-      data-type: database
-      data-id: jeecg-gateway-router
-spring:
-  data:
-    redis:
-      database: 0
-      host: jeecg-boot-redis
-      port: 6379
-      password:
-knife4j:
-  production: false','19d7cd93eeb85a582c8a6942d499c7f7',TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','springboot3','',null,null,'yaml',null,'');
-INSERT INTO "NACOS"."CONFIG_INFO"("ID","DATA_ID","GROUP_ID","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","APP_NAME","TENANT_ID","C_DESC","C_USE","EFFECT","TYPE","C_SCHEMA","ENCRYPTED_DATA_KEY") VALUES(19,'jeecg-sharding-multi.yaml','DEFAULT_GROUP','spring:
-  shardingsphere:
-    datasource:
-      names: ds0,ds1
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-      ds1:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-    props:
-      sql-show: true
-    rules:
-      replica-query:
-        load-balancers:
-          round-robin:
-            type: ROUND_ROBIN
-            props:
-              default: 0
-        data-sources:
-          prds:
-            primary-data-source-name: ds0
-            replica-data-source-names: ds1
-            load-balancer-name: round_robin
-      sharding:
-        binding-tables:
-          - sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-          database-inline:
-            type: INLINE
-            props:
-              algorithm-expression: ds$->{operate_type % 2}
-        tables:
-          sys_log:
-            actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}
-            database-strategy:
-              standard:
-                sharding-column: operate_type
-                sharding-algorithm-name: database-inline
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','0fc2b030ca8c0008f148c84ecbd2a8c7',TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','','springboot3','',null,null,'yaml',null,'');
-
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO" OFF;
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO_AGGR" ON;
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO_AGGR" OFF;
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO_BETA" ON;
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO_BETA" OFF;
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO_TAG" ON;
-SET IDENTITY_INSERT "NACOS"."CONFIG_INFO_TAG" OFF;
-SET IDENTITY_INSERT "NACOS"."CONFIG_TAGS_RELATION" ON;
-SET IDENTITY_INSERT "NACOS"."CONFIG_TAGS_RELATION" OFF;
-SET IDENTITY_INSERT "NACOS"."GROUP_CAPACITY" ON;
-SET IDENTITY_INSERT "NACOS"."GROUP_CAPACITY" OFF;
-SET IDENTITY_INSERT "NACOS"."HIS_CONFIG_INFO" ON;
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,1,'1','DEFAULT_GROUP','','1','c4ca4238a0b923820dcc509a6f75849b',TO_DATE('2024-07-09 14:24:05','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:24:06','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(1,2,'1','DEFAULT_GROUP','','1','c4ca4238a0b923820dcc509a6f75849b',TO_DATE('2024-07-09 14:24:07','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:24:08','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','D','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,3,'jeecg-dev.yaml','DEFAULT_GROUP','','spring:
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-        allow:
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
-        # 连接池的配置信息
-        # 初始化大小,最小,最大
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        # 配置获取连接等待超时的时间
-        maxWait: 60000
-        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-        timeBetweenEvictionRunsMillis: 60000
-        # 配置一个连接在池中最小生存的时间,单位是毫秒
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        # 打开PSCache,并且指定每个连接上PSCache的大小
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,''wall''用于防火墙
-        filters: stat,wall,slf4j
-        wall:
-          selectWhereAlwayTrueCheck: false
-        stat:
-          merge-sql: true
-          slow-sql-millis: 5000
-
-      datasource:
-        master:
-          url: jdbc:mysql://jeecg-boot-mysql:3306/jeecgbootsy3_6?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-          # 多数据源配置
-          #multi-datasource1:
-          #url: jdbc:mysql://localhost:3306/jeecgboot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          #username: root
-          #password: root
-          #driver-class-name: com.mysql.cj.jdbc.Driver
-  #redis 配置
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    lettuce:
-      pool:
-        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
-        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
-        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
-        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
-      shutdown-timeout: 100ms
-    password:
-    port: 6379
-    #mongodb
-  data:
-    mongodb:
-      #有密码连接 账号密码包含特殊字符的需要用URLEncoder编码 库名必填
-      #uri: mongodb://jeecgdev:jeecgd_89@111.225.222.176:27017/jeecgdev
-      uri: mongodb://jeecg:123456@jeecg-boot-mongo:27017/jeecg?readPreference=secondaryPreferred&maxIdleTimeMS=60000&waitQueueTimeoutMS=2000&minPoolSize=5&maxPoolSize=100&maxLifeTimeMS=0&connectTimeoutMS=2000&socketTimeoutMS=2000
-      #集群方式
-      #uri: mongodb://192.168.0.221:27017,192.168.0.221:27018/imgdb
-      print: true  #是否打印查询语句
-      slowQuery: true  #是否记录慢查询到数据库中
-      slowTime: 1000 #慢查询最短时间,默认为1000毫秒
-  #rabbitmq配置
-  rabbitmq:
-    host: jeecg-boot-rabbitmq
-    username: guest
-    password: guest
-    port: 5672
-    publisher-confirms: true
-    publisher-returns: true
-    virtual-host: /
-    listener:
-      simple:
-        acknowledge-mode: manual
-        #消费者的最小数量
-        concurrency: 1
-        #消费者的最大数量
-        max-concurrency: 1
-        #是否支持重试
-        retry:
-          enabled: true
-#jeecg专用配置
-minidao:
-  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
-jeecg:
-  firewall:
-    dataSourceSafe: false
-    lowCodeMode: dev
-  # 签名密钥串(前后端要一致,正式发布请自行修改)
-  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
-  # 本地:local\Minio:minio\阿里云:alioss
-  uploadType: local
-  # 前端访问地址
-  domainUrl:
-    pc: http://localhost:3100
-    app: http://localhost:8051
-  path :
-    #文件上传根目录 设置
-    upload: /opt/upFiles
-    #webapp文件路径
-    webapp: /opt/webapp
-  shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/bigscreen/category/**,/bigscreen/visual/**,/bigscreen/map/**,/jmreport/bigscreen2/**
-  #阿里云oss存储配置
-  oss:
-    endpoint: oss-cn-beijing.aliyuncs.com
-    accessKey: ??
-    secretKey: ??
-    bucketName: jeecgdev
-    staticDomain: ??
-  # ElasticSearch 6设置
-  elasticsearch:
-    cluster-name: jeecg-ES
-    cluster-nodes: 127.0.0.1:9200
-    check-enabled: false
-  # 表单设计器配置
-  desform:
-    # 主题颜色(仅支持 16进制颜色代码)
-    theme-color: "#1890ff"
-    # 文件、图片上传方式,可选项:qiniu(七牛云)、system(跟随系统配置)
-    upload-type: system
-    map:
-      # 配置百度地图的AK,申请地址:https://lbs.baidu.com/apiconsole/key?application=key#/home
-      baidu: ??
-  # 在线预览文件服务器地址配置
-  file-view-domain: 127.0.0.1:8012
-  # minio文件上传
-  minio:
-    minio_url: http://minio.jeecg.com
-    minio_name: ??
-    minio_pass: ??
-    bucketName: otatest
-  #大屏报表参数设置
-  jmreport:
-    saasMode:
-    firewall:
-      dataSourceSafe: false
-      lowCodeMode: dev
-  ai-chat:
-    enabled: false
-    apiKey: "????"
-    apiHost: "https://api.openai.com"
-    timeout: 60
-  #Wps在线文档
-  wps:
-    domain: https://wwo.wps.cn/office/
-    appid: ??
-    appsecret: ??
-  #xxl-job配置
-  xxljob:
-    enabled: false
-    adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
-    appname: ${spring.application.name}
-    accessToken: ''''
-    logPath: logs/jeecg/job/jobhandler/
-    logRetentionDays: 30
-  #分布式锁配置
-  redisson:
-    address: jeecg-boot-redis:6379
-    password:
-    type: STANDALONE
-    enabled: true
-#Mybatis输出sql日志
-logging:
-  level:
-    org.jeecg.modules.system.mapper: info
-#cas单点登录
-cas:
-  prefixUrl: http://localhost:8888/cas
-#swagger
-knife4j:
-  enable: true
-  #开启生产环境屏蔽
-  production: false
-  basic:
-    enable: false
-    username: jeecg
-    password: jeecg1314
-
-#第三方登录
-justauth:
-  enabled: true
-  type:
-    GITHUB:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
-    WECHAT_ENTERPRISE:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
-      agent-id: 1000002
-    DINGTALK:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
-  cache:
-    type: default
-    prefix: ''demo::''
-    timeout: 1h
-#第三方APP对接
-third-app:
-  enabled: false
-  type:
-    #企业微信
-    WECHAT_ENTERPRISE:
-      enabled: false
-      #CORP_ID
-      client-id: ??
-      #SECRET
-      client-secret: ??
-      agent-id: ??
-      #自建应用秘钥(新版企微需要配置)
-      # agent-app-secret: ??
-    #钉钉
-    DINGTALK:
-      enabled: false
-      # appKey
-      client-id: ??
-      # appSecret
-      client-secret: ??
-      agent-id: ??','350e31a280673586f2203956da576136',TO_DATE('2024-07-09 14:30:05','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:06','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,4,'jeecg.yaml','DEFAULT_GROUP','','server:
-  tomcat:
-    max-swallow-size: -1
-  error:
-    include-exception: true
-    include-stacktrace: ALWAYS
-    include-message: ALWAYS
-  compression:
-    enabled: true
-    min-response-size: 1024
-    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-management:
-  health:
-    mail:
-      enabled: false
-  endpoints:
-    web:
-      exposure:
-        include: "*" #暴露所有节点
-    health:
-      sensitive: true #关闭过滤敏感信息
-  endpoint:
-    health:
-      show-details: ALWAYS  #显示详细信息
-flowable:
-  # 自动部署验证设置:true-开启(默认)、false-关闭
-  check-process-definitions: false
-  #配置项可以设置流程引擎启动和关闭时数据库执行的策略
-  database-schema-update: false
-  #保存历史数据级别设置为full最高级别,便于历史数据的追溯
-  history-level: full
-  #开启定时任务
-  async-executor-activate: true
-spring:
-  servlet:
-    multipart:
-      max-file-size: 10MB
-      max-request-size: 10MB
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  ## quartz定时任务,采用数据库方式
-  quartz:
-    job-store-type: jdbc
-    initialize-schema: embedded
-    #设置自动启动,默认为 true
-    auto-startup: false
-    #延迟1秒启动定时任务
-    startup-delay: 1s
-    #启动时更新己存在的Job
-    overwrite-existing-jobs: true
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: MyScheduler
-            instanceId: AUTO
-          jobStore:
-            #class: org.quartz.impl.jdbcjobstore.JobStoreTX
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: true
-            misfireThreshold: 12000
-            clusterCheckinInterval: 15000
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-  #json 时间戳统一转换
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-  aop:
-    proxy-target-class: true
-  jpa:
-    open-in-view: false
-  #配置freemarker
-  freemarker:
-    # 设置模板后缀名
-    suffix: .ftl
-    # 设置文档类型
-    content-type: text/html
-    # 设置页面编码格式
-    charset: UTF-8
-    # 设置页面缓存
-    cache: false
-    prefer-file-system-access: false
-    # 设置ftl文件路径
-    template-loader-path:
-      - classpath:/templates
-    template_update_delay: 0
-  # 设置静态文件路径,js,css等
-  mvc:
-    static-path-pattern: /**
-    #Spring Boot 2.6+ 手动指定为ant-path-matcher
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude:
-      - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-      - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
-#mybatis plus 设置
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
-  global-config:
-    # 关闭MP3.0自带的banner
-    banner: false
-    db-config:
-      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
-      id-type: ASSIGN_ID
-      # 默认数据库表下划线命名
-      table-underline: true
-  configuration:
-    # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
-    #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-    # 返回类型为Map,显示null对应的字段
-    call-setters-on-nulls: true','94755a848afefef22e34ff83668ec4f7',TO_DATE('2024-07-09 14:30:05','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,5,'jeecg-gateway-router.json','DEFAULT_GROUP','','[{
-  "id": "jeecg-system",
-  "order": 0,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/sys/**",
-      "_genkey_1": "/eoa/**",
-      "_genkey_2": "/joa/**",
-      "_genkey_3": "/jmreport/**",
-      "_genkey_4": "/bigscreen/**",
-      "_genkey_5": "/desform/**",
-      "_genkey_6": "/online/**",
-      "_genkey_8": "/act/**",
-      "_genkey_9": "/plug-in/**",
-      "_genkey_10": "/generic/**",
-      "_genkey_11": "/v1/**",
-      "_genkey_12": "/desflow/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-system"
-}, {
-  "id": "jeecg-demo",
-  "order": 1,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/mock/**",
-      "_genkey_1": "/test/**",
-      "_genkey_2": "/bigscreen/template1/**",
-      "_genkey_3": "/bigscreen/template2/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-demo"
-}, {
-  "id": "jeecg-system-websocket",
-  "order": 2,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/websocket/**",
-      "_genkey_1": "/eoaSocket/**",
-      "_genkey_2": "/newsWebsocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-system"
-}, {
-  "id": "jeecg-demo-websocket",
-  "order": 3,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/vxeSocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-demo"
-}]','c9eff51f264ebe266c07ad1c5b6778e2',TO_DATE('2024-07-09 14:30:05','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,6,'jeecg-gateway-dev.yaml','DEFAULT_GROUP','','jeecg:
-  route:
-    config:
-      #路由加载模式: database、nacos、yml
-      data-type: database
-      #Nacos模式,读取配置文件jeecg-gateway-router.json(固定)
-      group: DEFAULT_GROUP
-      data-id: jeecg-gateway-router
-spring:
-  #redis配置
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    port: 6379
-    password:
-#swagger
-knife4j:
-  #开启生产环境屏蔽
-  production: false','8fea1277e460b477987521aecf432150',TO_DATE('2024-07-09 14:30:05','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,7,'jeecg-sharding.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        username: root
-        password: root
-        type: com.alibaba.druid.pool.DruidDataSource
-    props:
-      sql-show: true
-    rules:
-      sharding:
-        binding-tables: sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-        tables:
-          sys_log:
-            actual-data-nodes: ds0.sys_log$->{0..1}
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','5d7aad99a23e68589e93facd1b221aea',TO_DATE('2024-07-09 14:30:05','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,8,'jeecg-sharding-multi.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0,ds1
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-      ds1:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-    props:
-      sql-show: true
-    rules:
-      replica-query:
-        load-balancers:
-          round-robin:
-            type: ROUND_ROBIN
-            props:
-              default: 0
-        data-sources:
-          prds:
-            primary-data-source-name: ds0
-            replica-data-source-names: ds1
-            load-balancer-name: round_robin
-      sharding:
-        binding-tables:
-          - sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-          database-inline:
-            type: INLINE
-            props:
-              algorithm-expression: ds$->{operate_type % 2}
-        tables:
-          sys_log:
-            actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}
-            database-strategy:
-              standard:
-                sharding-column: operate_type
-                sharding-algorithm-name: database-inline
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','ef2f42fb2dda43cd0d4397a820f3144e',TO_DATE('2024-07-09 14:30:05','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:07','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,9,'jeecg-dev.yaml','DEFAULT_GROUP','','spring:
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-        allow:
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid:
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        maxWait: 60000
-        timeBetweenEvictionRunsMillis: 60000
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        filters: stat,wall,slf4j
-        wall:
-          selectWhereAlwayTrueCheck: false
-        stat:
-          merge-sql: true
-          slow-sql-millis: 5000
-      datasource:
-        master:
-          url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    password:
-    port: 6379
-  rabbitmq:
-    host: jeecg-boot-rabbitmq
-    username: guest
-    password: guest
-    port: 5672
-    publisher-confirms: true
-    publisher-returns: true
-    virtual-host: /
-    listener:
-      simple:
-        acknowledge-mode: manual
-        concurrency: 1
-        max-concurrency: 1
-        retry:
-          enabled: true
-  flyway:
-    enabled: false
-    encoding: UTF-8
-    locations: classpath:flyway/sql/mysql
-    sql-migration-prefix: V
-    sql-migration-separator: __
-    placeholder-prefix: ''#(''
-    placeholder-suffix: )
-    sql-migration-suffixes: .sql
-    validate-on-migrate: true
-    baseline-on-migrate: true
-    clean-disabled: true
-minidao:
-  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
-jeecg:
-  firewall:
-    dataSourceSafe: false
-    lowCodeMode: dev
-  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
-  signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode
-  uploadType: local
-  domainUrl:
-    pc: http://localhost:3100
-    app: http://localhost:8051
-  path:
-    upload: /opt/upFiles
-    webapp: /opt/webapp
-  shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
-  oss:
-    endpoint: oss-cn-beijing.aliyuncs.com
-    accessKey: ??
-    secretKey: ??
-    bucketName: jeecgdev
-    staticDomain: ??
-  elasticsearch:
-    cluster-name: jeecg-ES
-    cluster-nodes: jeecg-boot-es:9200
-    check-enabled: false
-  file-view-domain: 127.0.0.1:8012
-  minio:
-    minio_url: http://minio.jeecg.com
-    minio_name: ??
-    minio_pass: ??
-    bucketName: otatest
-  jmreport:
-    saasMode:
-    firewall:
-      dataSourceSafe: false
-      lowCodeMode: dev
-  wps:
-    domain: https://wwo.wps.cn/office/
-    appid: ??
-    appsecret: ??
-  xxljob:
-    enabled: true
-    adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
-    appname: ${spring.application.name}
-    accessToken: ''''
-    logPath: logs/jeecg/job/jobhandler/
-    logRetentionDays: 30
-  redisson:
-    address: jeecg-boot-redis:6379
-    password:
-    type: STANDALONE
-    enabled: true
-  ai-chat:
-    enabled: false
-    apiKey: "????"
-    apiHost: "https://api.openai.com"
-    timeout: 60
-logging:
-  level:
-    org.jeecg.modules.system.mapper : info
-cas:
-  prefixUrl: http://localhost:8888/cas
-knife4j:
-  production: false
-  basic:
-    enable: false
-    username: jeecg
-    password: jeecg1314
-justauth:
-  enabled: true
-  type:
-    GITHUB:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
-    WECHAT_ENTERPRISE:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
-      agent-id: ??
-    DINGTALK:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
-  cache:
-    type: default
-    prefix: ''demo::''
-    timeout: 1h
-third-app:
-  enabled: false
-  type:
-    WECHAT_ENTERPRISE:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??
-    DINGTALK:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??','822f70f7a278a503a02568186582ceaa',TO_DATE('2024-07-09 14:30:19','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:20','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,10,'jeecg.yaml','DEFAULT_GROUP','','server:
-  tomcat:
-    max-swallow-size: -1
-  error:
-    include-exception: true
-    include-stacktrace: ALWAYS
-    include-message: ALWAYS
-  compression:
-    enabled: true
-    min-response-size: 1024
-    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-management:
-  health:
-    mail:
-      enabled: false
-  endpoints:
-    web:
-      exposure:
-        include: "*"
-    health:
-      sensitive: true
-  endpoint:
-    health:
-      show-details: ALWAYS
-spring:
-  servlet:
-    multipart:
-      max-file-size: 10MB
-      max-request-size: 10MB
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  quartz:
-    job-store-type: jdbc
-    initialize-schema: embedded
-    auto-startup: false
-    startup-delay: 1s
-    overwrite-existing-jobs: true
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: MyScheduler
-            instanceId: AUTO
-          jobStore:
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: true
-            misfireThreshold: 12000
-            clusterCheckinInterval: 15000
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-  aop:
-    proxy-target-class: true
-  activiti:
-    check-process-definitions: false
-    async-executor-activate: false
-    job-executor-activate: false
-  jpa:
-    open-in-view: false
-  freemarker:
-    suffix: .ftl
-    content-type: text/html
-    charset: UTF-8
-    cache: false
-    prefer-file-system-access: false
-    template-loader-path:
-      - classpath:/templates
-  mvc:
-    static-path-pattern: /**
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude:
-      - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-      - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
-  global-config:
-    banner: false
-    db-config:
-      id-type: ASSIGN_ID
-      table-underline: true
-  configuration:
-    call-setters-on-nulls: true','94dbdad61f7e2e3ace5a4fc07bb8c2a2',TO_DATE('2024-07-09 14:30:19','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:20','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,11,'jeecg-gateway-router.json','DEFAULT_GROUP','','[{
-  "id": "jeecg-system",
-  "order": 0,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/sys/**",
-      "_genkey_1": "/jmreport/**",
-      "_genkey_3": "/online/**",
-      "_genkey_4": "/generic/**",
-      "_genkey_5": "/drag/**",
-      "_genkey_6": "/actuator/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-system"
-}, {
-  "id": "jeecg-demo",
-  "order": 1,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/mock/**",
-      "_genkey_1": "/test/**",
-      "_genkey_2": "/bigscreen/template1/**",
-      "_genkey_3": "/bigscreen/template2/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-demo"
-}, {
-  "id": "jeecg-system-websocket",
-  "order": 2,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/websocket/**",
-      "_genkey_1": "/newsWebsocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-system"
-}, {
-  "id": "jeecg-demo-websocket",
-  "order": 3,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/vxeSocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-demo"
-}]','708c0948118bdb96bdfaa87200a14432',TO_DATE('2024-07-09 14:30:19','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:20','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,12,'jeecg-sharding.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        username: root
-        password: root
-        type: com.alibaba.druid.pool.DruidDataSource
-    props:
-      sql-show: true
-    rules:
-      sharding:
-        binding-tables: sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-        tables:
-          sys_log:
-            actual-data-nodes: ds0.sys_log$->{0..1}
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','a93fa455c32cd37ca84631d2bbe13005',TO_DATE('2024-07-09 14:30:19','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:20','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,13,'jeecg-gateway-dev.yaml','DEFAULT_GROUP','','jeecg:
-  route:
-    config:
-      #type:database nacos yml
-      data-type: database
-      data-id: jeecg-gateway-router
-spring:
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    port: 6379
-    password:
-knife4j:
-  production: false','98e211c54b43a73f7189d92f1c77f815',TO_DATE('2024-07-09 14:30:19','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:20','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,14,'jeecg-sharding-multi.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0,ds1
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-      ds1:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-    props:
-      sql-show: true
-    rules:
-      replica-query:
-        load-balancers:
-          round-robin:
-            type: ROUND_ROBIN
-            props:
-              default: 0
-        data-sources:
-          prds:
-            primary-data-source-name: ds0
-            replica-data-source-names: ds1
-            load-balancer-name: round_robin
-      sharding:
-        binding-tables:
-          - sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-          database-inline:
-            type: INLINE
-            props:
-              algorithm-expression: ds$->{operate_type % 2}
-        tables:
-          sys_log:
-            actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}
-            database-strategy:
-              standard:
-                sharding-column: operate_type
-                sharding-algorithm-name: database-inline
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','0fc2b030ca8c0008f148c84ecbd2a8c7',TO_DATE('2024-07-09 14:30:19','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:30:20','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(8,15,'jeecg-dev.yaml','DEFAULT_GROUP','','spring:
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-        allow:
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid:
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        maxWait: 60000
-        timeBetweenEvictionRunsMillis: 60000
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        filters: stat,wall,slf4j
-        wall:
-          selectWhereAlwayTrueCheck: false
-        stat:
-          merge-sql: true
-          slow-sql-millis: 5000
-      datasource:
-        master:
-          url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    password:
-    port: 6379
-  rabbitmq:
-    host: jeecg-boot-rabbitmq
-    username: guest
-    password: guest
-    port: 5672
-    publisher-confirms: true
-    publisher-returns: true
-    virtual-host: /
-    listener:
-      simple:
-        acknowledge-mode: manual
-        concurrency: 1
-        max-concurrency: 1
-        retry:
-          enabled: true
-  flyway:
-    enabled: false
-    encoding: UTF-8
-    locations: classpath:flyway/sql/mysql
-    sql-migration-prefix: V
-    sql-migration-separator: __
-    placeholder-prefix: ''#(''
-    placeholder-suffix: )
-    sql-migration-suffixes: .sql
-    validate-on-migrate: true
-    baseline-on-migrate: true
-    clean-disabled: true
-minidao:
-  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
-jeecg:
-  firewall:
-    dataSourceSafe: false
-    lowCodeMode: dev
-  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
-  signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode
-  uploadType: local
-  domainUrl:
-    pc: http://localhost:3100
-    app: http://localhost:8051
-  path:
-    upload: /opt/upFiles
-    webapp: /opt/webapp
-  shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
-  oss:
-    endpoint: oss-cn-beijing.aliyuncs.com
-    accessKey: ??
-    secretKey: ??
-    bucketName: jeecgdev
-    staticDomain: ??
-  elasticsearch:
-    cluster-name: jeecg-ES
-    cluster-nodes: jeecg-boot-es:9200
-    check-enabled: false
-  file-view-domain: 127.0.0.1:8012
-  minio:
-    minio_url: http://minio.jeecg.com
-    minio_name: ??
-    minio_pass: ??
-    bucketName: otatest
-  jmreport:
-    saasMode:
-    firewall:
-      dataSourceSafe: false
-      lowCodeMode: dev
-  wps:
-    domain: https://wwo.wps.cn/office/
-    appid: ??
-    appsecret: ??
-  xxljob:
-    enabled: true
-    adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
-    appname: ${spring.application.name}
-    accessToken: ''''
-    logPath: logs/jeecg/job/jobhandler/
-    logRetentionDays: 30
-  redisson:
-    address: jeecg-boot-redis:6379
-    password:
-    type: STANDALONE
-    enabled: true
-  ai-chat:
-    enabled: false
-    apiKey: "????"
-    apiHost: "https://api.openai.com"
-    timeout: 60
-logging:
-  level:
-    org.jeecg.modules.system.mapper : info
-cas:
-  prefixUrl: http://localhost:8888/cas
-knife4j:
-  production: false
-  basic:
-    enable: false
-    username: jeecg
-    password: jeecg1314
-justauth:
-  enabled: true
-  type:
-    GITHUB:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
-    WECHAT_ENTERPRISE:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
-      agent-id: ??
-    DINGTALK:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
-  cache:
-    type: default
-    prefix: ''demo::''
-    timeout: 1h
-third-app:
-  enabled: false
-  type:
-    WECHAT_ENTERPRISE:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??
-    DINGTALK:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??','822f70f7a278a503a02568186582ceaa',TO_DATE('2024-07-09 14:34:25','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:27','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','D','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(9,16,'jeecg.yaml','DEFAULT_GROUP','','server:
-  tomcat:
-    max-swallow-size: -1
-  error:
-    include-exception: true
-    include-stacktrace: ALWAYS
-    include-message: ALWAYS
-  compression:
-    enabled: true
-    min-response-size: 1024
-    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-management:
-  health:
-    mail:
-      enabled: false
-  endpoints:
-    web:
-      exposure:
-        include: "*"
-    health:
-      sensitive: true
-  endpoint:
-    health:
-      show-details: ALWAYS
-spring:
-  servlet:
-    multipart:
-      max-file-size: 10MB
-      max-request-size: 10MB
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  quartz:
-    job-store-type: jdbc
-    initialize-schema: embedded
-    auto-startup: false
-    startup-delay: 1s
-    overwrite-existing-jobs: true
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: MyScheduler
-            instanceId: AUTO
-          jobStore:
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: true
-            misfireThreshold: 12000
-            clusterCheckinInterval: 15000
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-  aop:
-    proxy-target-class: true
-  activiti:
-    check-process-definitions: false
-    async-executor-activate: false
-    job-executor-activate: false
-  jpa:
-    open-in-view: false
-  freemarker:
-    suffix: .ftl
-    content-type: text/html
-    charset: UTF-8
-    cache: false
-    prefer-file-system-access: false
-    template-loader-path:
-      - classpath:/templates
-  mvc:
-    static-path-pattern: /**
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude:
-      - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-      - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
-  global-config:
-    banner: false
-    db-config:
-      id-type: ASSIGN_ID
-      table-underline: true
-  configuration:
-    call-setters-on-nulls: true','94dbdad61f7e2e3ace5a4fc07bb8c2a2',TO_DATE('2024-07-09 14:34:25','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:27','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','D','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(10,17,'jeecg-gateway-router.json','DEFAULT_GROUP','','[{
-  "id": "jeecg-system",
-  "order": 0,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/sys/**",
-      "_genkey_1": "/jmreport/**",
-      "_genkey_3": "/online/**",
-      "_genkey_4": "/generic/**",
-      "_genkey_5": "/drag/**",
-      "_genkey_6": "/actuator/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-system"
-}, {
-  "id": "jeecg-demo",
-  "order": 1,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/mock/**",
-      "_genkey_1": "/test/**",
-      "_genkey_2": "/bigscreen/template1/**",
-      "_genkey_3": "/bigscreen/template2/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-demo"
-}, {
-  "id": "jeecg-system-websocket",
-  "order": 2,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/websocket/**",
-      "_genkey_1": "/newsWebsocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-system"
-}, {
-  "id": "jeecg-demo-websocket",
-  "order": 3,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/vxeSocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-demo"
-}]','708c0948118bdb96bdfaa87200a14432',TO_DATE('2024-07-09 14:34:25','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:27','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','D','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(11,18,'jeecg-sharding.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        username: root
-        password: root
-        type: com.alibaba.druid.pool.DruidDataSource
-    props:
-      sql-show: true
-    rules:
-      sharding:
-        binding-tables: sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-        tables:
-          sys_log:
-            actual-data-nodes: ds0.sys_log$->{0..1}
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','a93fa455c32cd37ca84631d2bbe13005',TO_DATE('2024-07-09 14:34:25','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:27','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','D','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(12,19,'jeecg-gateway-dev.yaml','DEFAULT_GROUP','','jeecg:
-  route:
-    config:
-      #type:database nacos yml
-      data-type: database
-      data-id: jeecg-gateway-router
-spring:
-  redis:
-    database: 0
-    host: jeecg-boot-redis
-    port: 6379
-    password:
-knife4j:
-  production: false','98e211c54b43a73f7189d92f1c77f815',TO_DATE('2024-07-09 14:34:25','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:27','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','D','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(13,20,'jeecg-sharding-multi.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0,ds1
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-      ds1:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-    props:
-      sql-show: true
-    rules:
-      replica-query:
-        load-balancers:
-          round-robin:
-            type: ROUND_ROBIN
-            props:
-              default: 0
-        data-sources:
-          prds:
-            primary-data-source-name: ds0
-            replica-data-source-names: ds1
-            load-balancer-name: round_robin
-      sharding:
-        binding-tables:
-          - sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-          database-inline:
-            type: INLINE
-            props:
-              algorithm-expression: ds$->{operate_type % 2}
-        tables:
-          sys_log:
-            actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}
-            database-strategy:
-              standard:
-                sharding-column: operate_type
-                sharding-algorithm-name: database-inline
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','0fc2b030ca8c0008f148c84ecbd2a8c7',TO_DATE('2024-07-09 14:34:25','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:27','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','D','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,21,'jeecg-dev.yaml','DEFAULT_GROUP','','spring:
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-        allow:
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid:
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        maxWait: 60000
-        timeBetweenEvictionRunsMillis: 60000
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        filters: stat,wall,slf4j
-        wall:
-          selectWhereAlwayTrueCheck: false
-        stat:
-          merge-sql: true
-          slow-sql-millis: 5000
-      datasource:
-        master:
-          url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-  data:
-    redis:
-      database: 0
-      host: jeecg-boot-redis
-      password:
-      port: 6379
-  rabbitmq:
-    host: jeecg-boot-rabbitmq
-    username: guest
-    password: guest
-    port: 5672
-    publisher-confirms: true
-    publisher-returns: true
-    virtual-host: /
-    listener:
-      simple:
-        acknowledge-mode: manual
-        concurrency: 1
-        max-concurrency: 1
-        retry:
-          enabled: true
-  flyway:
-    enabled: false
-    encoding: UTF-8
-    locations: classpath:flyway/sql/mysql
-    sql-migration-prefix: V
-    sql-migration-separator: __
-    placeholder-prefix: ''#(''
-    placeholder-suffix: )
-    sql-migration-suffixes: .sql
-    validate-on-migrate: true
-    baseline-on-migrate: true
-    clean-disabled: true
-minidao:
-  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
-jeecg:
-  firewall:
-    dataSourceSafe: false
-    lowCodeMode: dev
-  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
-  signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
-  uploadType: local
-  domainUrl:
-    pc: http://localhost:3100
-    app: http://localhost:8051
-  path:
-    upload: /opt/upFiles
-    webapp: /opt/webapp
-  shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
-  oss:
-    endpoint: oss-cn-beijing.aliyuncs.com
-    accessKey: ??
-    secretKey: ??
-    bucketName: jeecgdev
-    staticDomain: ??
-  elasticsearch:
-    cluster-name: jeecg-ES
-    cluster-nodes: jeecg-boot-es:9200
-    check-enabled: false
-  file-view-domain: 127.0.0.1:8012
-  minio:
-    minio_url: http://minio.jeecg.com
-    minio_name: ??
-    minio_pass: ??
-    bucketName: otatest
-  jmreport:
-    saasMode:
-    firewall:
-      dataSourceSafe: false
-      lowCodeMode: dev
-  wps:
-    domain: https://wwo.wps.cn/office/
-    appid: ??
-    appsecret: ??
-  xxljob:
-    enabled: false
-    adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
-    appname: ${spring.application.name}
-    accessToken: ''''
-    logPath: logs/jeecg/job/jobhandler/
-    logRetentionDays: 30
-  redisson:
-    address: jeecg-boot-redis:6379
-    password:
-    type: STANDALONE
-    enabled: true
-  ai-chat:
-    enabled: false
-    apiKey: "????"
-    apiHost: "https://api.openai.com"
-    timeout: 60
-logging:
-  level:
-    org.jeecg.modules.system.mapper : info
-cas:
-  prefixUrl: http://localhost:8888/cas
-knife4j:
-  production: false
-  basic:
-    enable: false
-    username: jeecg
-    password: jeecg1314
-justauth:
-  enabled: true
-  type:
-    GITHUB:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
-    WECHAT_ENTERPRISE:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
-      agent-id: ??
-    DINGTALK:
-      client-id: ??
-      client-secret: ??
-      redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
-  cache:
-    type: default
-    prefix: ''demo::''
-    timeout: 1h
-third-app:
-  enabled: false
-  type:
-    WECHAT_ENTERPRISE:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??
-    DINGTALK:
-      enabled: false
-      client-id: ??
-      client-secret: ??
-      agent-id: ??','91c29720dfb424916a769201a25200cf',TO_DATE('2024-07-09 14:34:32','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,22,'jeecg.yaml','DEFAULT_GROUP','','server:
-  undertow:
-    # max-http-post-size: 10MB
-    worker-threads: 16
-    buffers:
-      websocket: 8192
-      io: 16384
-  error:
-    include-exception: true
-    include-stacktrace: ALWAYS
-    include-message: ALWAYS
-  compression:
-    enabled: true
-    min-response-size: 1024
-    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-management:
-  health:
-    mail:
-      enabled: false
-  endpoints:
-    web:
-      exposure:
-        include: "*"
-    health:
-      sensitive: true
-  endpoint:
-    health:
-      show-details: ALWAYS
-spring:
-  servlet:
-    multipart:
-      max-file-size: 10MB
-      max-request-size: 10MB
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  quartz:
-    job-store-type: jdbc
-    initialize-schema: embedded
-    auto-startup: false
-    startup-delay: 1s
-    overwrite-existing-jobs: true
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: MyScheduler
-            instanceId: AUTO
-          jobStore:
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: true
-            misfireThreshold: 12000
-            clusterCheckinInterval: 15000
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-  aop:
-    proxy-target-class: true
-  activiti:
-    check-process-definitions: false
-    async-executor-activate: false
-    job-executor-activate: false
-  jpa:
-    open-in-view: false
-  freemarker:
-    suffix: .ftl
-    content-type: text/html
-    charset: UTF-8
-    cache: false
-    prefer-file-system-access: false
-    template-loader-path:
-      - classpath:/templates
-  mvc:
-    static-path-pattern: /**
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude:
-      - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-      - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
-  global-config:
-    banner: false
-    db-config:
-      id-type: ASSIGN_ID
-      table-underline: true
-  configuration:
-    call-setters-on-nulls: true','ce1ca3b6f8431e884aed94ab29be43a9',TO_DATE('2024-07-09 14:34:32','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,23,'jeecg-gateway-router.json','DEFAULT_GROUP','','[{
-  "id": "jeecg-system",
-  "order": 0,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/sys/**",
-      "_genkey_1": "/jmreport/**",
-      "_genkey_3": "/online/**",
-      "_genkey_4": "/generic/**",
-      "_genkey_5": "/oauth2/**",
-      "_genkey_6": "/drag/**",
-      "_genkey_7": "/actuator/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-system"
-}, {
-  "id": "jeecg-demo",
-  "order": 1,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/mock/**",
-      "_genkey_1": "/test/**",
-      "_genkey_2": "/bigscreen/template1/**",
-      "_genkey_3": "/bigscreen/template2/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb://jeecg-demo"
-}, {
-  "id": "jeecg-system-websocket",
-  "order": 2,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/websocket/**",
-      "_genkey_1": "/newsWebsocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-system"
-}, {
-  "id": "jeecg-demo-websocket",
-  "order": 3,
-  "predicates": [{
-    "name": "Path",
-    "args": {
-      "_genkey_0": "/vxeSocket/**"
-    }
-  }],
-  "filters": [],
-  "uri": "lb:ws://jeecg-demo"
-}]','9794beb09d30bc6b835f2ee870781587',TO_DATE('2024-07-09 14:34:32','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,24,'jeecg-sharding.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        username: root
-        password: root
-        type: com.alibaba.druid.pool.DruidDataSource
-    props:
-      sql-show: true
-    rules:
-      sharding:
-        binding-tables: sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-        tables:
-          sys_log:
-            actual-data-nodes: ds0.sys_log$->{0..1}
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','a93fa455c32cd37ca84631d2bbe13005',TO_DATE('2024-07-09 14:34:32','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,25,'jeecg-gateway-dev.yaml','DEFAULT_GROUP','','jeecg:
-  route:
-    config:
-      #type:database nacos yml
-      data-type: database
-      data-id: jeecg-gateway-router
-spring:
-  data:
-    redis:
-      database: 0
-      host: jeecg-boot-redis
-      port: 6379
-      password:
-knife4j:
-  production: false','19d7cd93eeb85a582c8a6942d499c7f7',TO_DATE('2024-07-09 14:34:32','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-INSERT INTO "NACOS"."HIS_CONFIG_INFO"("ID","NID","DATA_ID","GROUP_ID","APP_NAME","CONTENT","MD5","GMT_CREATE","GMT_MODIFIED","SRC_USER","SRC_IP","OP_TYPE","TENANT_ID","ENCRYPTED_DATA_KEY") VALUES(0,26,'jeecg-sharding-multi.yaml','DEFAULT_GROUP','','spring:
-  shardingsphere:
-    datasource:
-      names: ds0,ds1
-      ds0:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-      ds1:
-        driverClassName: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-        type: com.alibaba.druid.pool.DruidDataSource
-        username: root
-        password: root
-    props:
-      sql-show: true
-    rules:
-      replica-query:
-        load-balancers:
-          round-robin:
-            type: ROUND_ROBIN
-            props:
-              default: 0
-        data-sources:
-          prds:
-            primary-data-source-name: ds0
-            replica-data-source-names: ds1
-            load-balancer-name: round_robin
-      sharding:
-        binding-tables:
-          - sys_log
-        key-generators:
-          snowflake:
-            type: SNOWFLAKE
-            props:
-              worker-id: 123
-        sharding-algorithms:
-          table-classbased:
-            props:
-              strategy: standard
-              algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
-            type: CLASS_BASED
-          database-inline:
-            type: INLINE
-            props:
-              algorithm-expression: ds$->{operate_type % 2}
-        tables:
-          sys_log:
-            actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}
-            database-strategy:
-              standard:
-                sharding-column: operate_type
-                sharding-algorithm-name: database-inline
-            table-strategy:
-              standard:
-                sharding-algorithm-name: table-classbased
-                sharding-column: log_type','0fc2b030ca8c0008f148c84ecbd2a8c7',TO_DATE('2024-07-09 14:34:32','YYYY-MM-DD HH24:MI:SS.FF'),TO_DATE('2024-07-09 14:34:33','YYYY-MM-DD HH24:MI:SS.FF'),null,'192.168.1.11','I','springboot3','');
-
-SET IDENTITY_INSERT "NACOS"."HIS_CONFIG_INFO" OFF;
-INSERT INTO "NACOS"."ROLES"("USERNAME","ROLE") VALUES('nacos','ROLE_ADMIN');
-
-SET IDENTITY_INSERT "NACOS"."TENANT_CAPACITY" ON;
-SET IDENTITY_INSERT "NACOS"."TENANT_CAPACITY" OFF;
-SET IDENTITY_INSERT "NACOS"."TENANT_INFO" ON;
-INSERT INTO "NACOS"."TENANT_INFO"("ID","KP","TENANT_ID","TENANT_NAME","TENANT_DESC","CREATE_SOURCE","GMT_CREATE","GMT_MODIFIED") VALUES(1,'1','springboot3','springboot3','springboot3版本配置文件,与springboot2有很大区别','nacos',1720506551826,1720506551826);
-
-SET IDENTITY_INSERT "NACOS"."TENANT_INFO" OFF;
-INSERT INTO "NACOS"."USERS"("USERNAME","PASSWORD","ENABLED") VALUES('nacos','$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu',1);
-
-ALTER TABLE "NACOS"."CONFIG_INFO" ADD CONSTRAINT  PRIMARY KEY("ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_INFO_AGGR" ADD CONSTRAINT  PRIMARY KEY("ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_INFO_BETA" ADD CONSTRAINT  PRIMARY KEY("ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_INFO_TAG" ADD CONSTRAINT  PRIMARY KEY("ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_TAGS_RELATION" ADD CONSTRAINT  PRIMARY KEY("NID") ;
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CONSTRAINT  PRIMARY KEY("ID") ;
-
-ALTER TABLE "NACOS"."HIS_CONFIG_INFO" ADD CONSTRAINT  PRIMARY KEY("NID") ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CONSTRAINT  PRIMARY KEY("ID") ;
-
-ALTER TABLE "NACOS"."TENANT_INFO" ADD CONSTRAINT  PRIMARY KEY("ID") ;
-
-ALTER TABLE "NACOS"."USERS" ADD CONSTRAINT  PRIMARY KEY("USERNAME") ;
-
-ALTER TABLE "NACOS"."HIS_CONFIG_INFO" ADD CHECK("ID" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."CONFIG_INFO" ADD CONSTRAINT "UK_CONFIGINFO_DATAGROUPTENANT" UNIQUE("DATA_ID","GROUP_ID","TENANT_ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_INFO_AGGR" ADD CONSTRAINT "UK_CONFIGINFOAGGR_DATAGROUPTENANTDATUM" UNIQUE("DATA_ID","GROUP_ID","TENANT_ID","DATUM_ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_INFO_BETA" ADD CONSTRAINT "UK_CONFIGINFOBETA_DATAGROUPTENANT" UNIQUE("DATA_ID","GROUP_ID","TENANT_ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_INFO_TAG" ADD CONSTRAINT "UK_CONFIGINFOTAG_DATAGROUPTENANTTAG" UNIQUE("DATA_ID","GROUP_ID","TENANT_ID","TAG_ID") ;
-
-ALTER TABLE "NACOS"."CONFIG_TAGS_RELATION" ADD CONSTRAINT "UK_CONFIGTAGRELATION_CONFIGIDTAG" UNIQUE("ID","TAG_NAME","TAG_TYPE") ;
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CONSTRAINT "UK_GROUP_ID" UNIQUE("GROUP_ID") ;
-
-ALTER TABLE "NACOS"."PERMISSIONS" ADD CONSTRAINT "UK_ROLE_PERMISSION" UNIQUE("ROLE","RESOURCE","ACTION") ;
-
-ALTER TABLE "NACOS"."ROLES" ADD CONSTRAINT "IDX_USER_ROLE" UNIQUE("USERNAME","ROLE") ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CONSTRAINT "UK_TENANT_ID" UNIQUE("TENANT_ID") ;
-
-ALTER TABLE "NACOS"."TENANT_INFO" ADD CONSTRAINT "UK_TENANT_INFO_KPTENANTID" UNIQUE("KP","TENANT_ID") ;
-
-COMMENT ON TABLE "NACOS"."CONFIG_INFO" IS 'config_info';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."ID" IS 'id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."DATA_ID" IS 'data_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."CONTENT" IS 'content';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."MD5" IS 'md5';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."GMT_CREATE" IS '创建时间';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."GMT_MODIFIED" IS '修改时间';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."SRC_USER" IS 'source user';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."SRC_IP" IS 'source ip';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."TENANT_ID" IS '租户字段';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."ENCRYPTED_DATA_KEY" IS '密钥';
-
-COMMENT ON TABLE "NACOS"."CONFIG_INFO_AGGR" IS '增加租户字段';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."ID" IS 'id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."DATA_ID" IS 'data_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."GROUP_ID" IS 'group_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."DATUM_ID" IS 'datum_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."CONTENT" IS '内容';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."GMT_MODIFIED" IS '修改时间';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."TENANT_ID" IS '租户字段';
-
-COMMENT ON TABLE "NACOS"."CONFIG_INFO_BETA" IS 'config_info_beta';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."ID" IS 'id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."DATA_ID" IS 'data_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."GROUP_ID" IS 'group_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."APP_NAME" IS 'app_name';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."CONTENT" IS 'content';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."BETA_IPS" IS 'betaIps';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."MD5" IS 'md5';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."GMT_CREATE" IS '创建时间';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."GMT_MODIFIED" IS '修改时间';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."SRC_USER" IS 'source user';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."SRC_IP" IS 'source ip';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."TENANT_ID" IS '租户字段';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."ENCRYPTED_DATA_KEY" IS '密钥';
-
-COMMENT ON TABLE "NACOS"."CONFIG_INFO_TAG" IS 'config_info_tag';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."ID" IS 'id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."DATA_ID" IS 'data_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."GROUP_ID" IS 'group_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."TENANT_ID" IS 'tenant_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."TAG_ID" IS 'tag_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."APP_NAME" IS 'app_name';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."CONTENT" IS 'content';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."MD5" IS 'md5';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."GMT_CREATE" IS '创建时间';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."GMT_MODIFIED" IS '修改时间';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."SRC_USER" IS 'source user';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."SRC_IP" IS 'source ip';
-
-COMMENT ON TABLE "NACOS"."CONFIG_TAGS_RELATION" IS 'config_tag_relation';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."ID" IS 'id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."TAG_NAME" IS 'tag_name';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."TAG_TYPE" IS 'tag_type';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."DATA_ID" IS 'data_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."GROUP_ID" IS 'group_id';
-
-COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."TENANT_ID" IS 'tenant_id';
-
-CREATE INDEX "IDX_DID"
-ON "NACOS"."HIS_CONFIG_INFO"("DATA_ID");
-
-CREATE INDEX "IDX_GMT_CREATE"
-ON "NACOS"."HIS_CONFIG_INFO"("GMT_CREATE");
-
-CREATE INDEX "IDX_GMT_MODIFIED"
-ON "NACOS"."HIS_CONFIG_INFO"("GMT_MODIFIED");
-
-CREATE INDEX "IDX_TENANT_ID"
-ON "NACOS"."TENANT_INFO"("TENANT_ID");
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CHECK("USAGE" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CHECK("MAX_SIZE" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CHECK("MAX_AGGR_COUNT" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CHECK("MAX_AGGR_SIZE" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CHECK("MAX_HISTORY_COUNT" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."GROUP_CAPACITY" ADD CHECK("QUOTA" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CHECK("QUOTA" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CHECK("USAGE" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CHECK("MAX_SIZE" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CHECK("MAX_AGGR_COUNT" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CHECK("MAX_AGGR_SIZE" >= 0) ENABLE ;
-
-ALTER TABLE "NACOS"."TENANT_CAPACITY" ADD CHECK("MAX_HISTORY_COUNT" >= 0) ENABLE ;
-
-COMMENT ON TABLE "NACOS"."GROUP_CAPACITY" IS '集群、各Group容量信息表';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."ID" IS '主键ID';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."GROUP_ID" IS 'Group ID,空字符表示整个集群';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."QUOTA" IS '配额,0表示使用默认值';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."USAGE" IS '使用量';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_SIZE" IS '单个配置大小上限,单位为字节,0表示使用默认值';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_AGGR_COUNT" IS '聚合子配置最大个数,,0表示使用默认值';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_AGGR_SIZE" IS '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_HISTORY_COUNT" IS '最大变更历史数量';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."GMT_CREATE" IS '创建时间';
-
-COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."GMT_MODIFIED" IS '修改时间';
-
-COMMENT ON TABLE "NACOS"."HIS_CONFIG_INFO" IS '多租户改造';
-
-COMMENT ON COLUMN "NACOS"."HIS_CONFIG_INFO"."APP_NAME" IS 'app_name';
-
-COMMENT ON COLUMN "NACOS"."HIS_CONFIG_INFO"."TENANT_ID" IS '租户字段';
-
-COMMENT ON COLUMN "NACOS"."HIS_CONFIG_INFO"."ENCRYPTED_DATA_KEY" IS '密钥';
-
-COMMENT ON TABLE "NACOS"."TENANT_CAPACITY" IS '租户容量信息表';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."ID" IS '主键ID';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."TENANT_ID" IS 'Tenant ID';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."QUOTA" IS '配额,0表示使用默认值';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."USAGE" IS '使用量';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_SIZE" IS '单个配置大小上限,单位为字节,0表示使用默认值';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_AGGR_COUNT" IS '聚合子配置最大个数';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_AGGR_SIZE" IS '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_HISTORY_COUNT" IS '最大变更历史数量';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."GMT_CREATE" IS '创建时间';
-
-COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."GMT_MODIFIED" IS '修改时间';
-
-COMMENT ON TABLE "NACOS"."TENANT_INFO" IS 'tenant_info';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."ID" IS 'id';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."KP" IS 'kp';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."TENANT_ID" IS 'tenant_id';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."TENANT_NAME" IS 'tenant_name';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."TENANT_DESC" IS 'tenant_desc';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."CREATE_SOURCE" IS 'create_source';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."GMT_CREATE" IS '创建时间';
-
-COMMENT ON COLUMN "NACOS"."TENANT_INFO"."GMT_MODIFIED" IS '修改时间';
-

+ 0 - 94
jeecg-server-cloud/jeecg-cloud-nacos/pom.xml

@@ -1,94 +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>
-    <artifactId>jeecg-cloud-nacos</artifactId>
-    <name>jeecg-cloud-nacos</name>
-    <description>nacos启动模块</description>
-    <version>3.7.1</version>
-
-    <parent>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.7.18</version>
-        <relativePath/>
-    </parent>
-
-    <repositories>
-        <repository>
-            <id>aliyun</id>
-            <name>aliyun Repository</name>
-            <url>https://maven.aliyun.com/repository/public</url>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-        <repository>
-            <id>jeecg</id>
-            <name>jeecg Repository</name>
-            <url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-    </repositories>
-
-    <properties>
-        <log4j2.version>2.17.0</log4j2.version>
-        <dm8.version>8.1.1.49</dm8.version>
-        <nacos.version>2.3.2</nacos.version>
-    </properties>
-    
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.tomcat.embed</groupId>
-            <artifactId>tomcat-embed-jasper</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-security</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.jeecgframework.nacos</groupId>
-            <artifactId>nacos-naming</artifactId>
-            <version>${nacos.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.jeecgframework.nacos</groupId>
-            <artifactId>nacos-istio</artifactId>
-            <version>${nacos.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.jeecgframework.nacos</groupId>
-            <artifactId>nacos-config</artifactId>
-            <version>${nacos.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.jeecgframework.nacos</groupId>
-            <artifactId>nacos-console</artifactId>
-            <version>${nacos.version}</version>
-        </dependency>
-
-        <!--达梦数据库驱动 版本号1-3-26-2023.07.26-197096-20046-ENT -->
-        <dependency>
-            <groupId>com.dameng</groupId>
-            <artifactId>Dm8JdbcDriver18</artifactId>
-            <version>${dm8.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.dameng</groupId>
-            <artifactId>DmDialect-for-hibernate5.0</artifactId>
-            <version>${dm8.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>

+ 0 - 50
jeecg-server-cloud/jeecg-cloud-nacos/src/main/java/com/alibaba/nacos/JeecgNacosApplication.java

@@ -1,50 +0,0 @@
-package com.alibaba.nacos;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.servlet.ServletComponentScan;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Nacos 启动类
- *
- * @author zyf
- */
-@SpringBootApplication(scanBasePackages = "com.alibaba.nacos")
-@ServletComponentScan
-@EnableScheduling
-public class JeecgNacosApplication {
-
-    /** 是否单机模式启动 */
-    private static String standalone = "true";
-    /** 是否开启鉴权 */
-    private static String enabled = "false";
-
-    public static void main(String[] args) {
-        System.setProperty("nacos.standalone", standalone);
-        System.setProperty("nacos.core.auth.enabled", enabled);
-//        //一旦Nacos初始化,用户名nacos将不能被修改,但你可以通过控制台或API来修改密码  https://nacos.io/en/blog/faq/nacos-user-question-history8420       
-//        System.setProperty("nacos.core.auth.default.username", "nacos");
-//        System.setProperty("nacos.core.auth.default.password", "nacos");
-        System.setProperty("server.tomcat.basedir","logs");
-        //自定义启动端口号
-        System.setProperty("server.port","8848");
-        SpringApplication.run(JeecgNacosApplication.class, args);
-    }
-
-    /**
-     * 默认跳转首页
-     *
-     * @param model
-     * @return
-     */
-    @GetMapping("/")
-    public String index(Model model, HttpServletResponse response) {
-        // 视图重定向 - 跳转
-        return "/nacos";
-    }
-}

+ 0 - 63
jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application-dm.yml

@@ -1,63 +0,0 @@
-server:
-  servlet:
-    contextPath: /nacos
-  tomcat:
-    accesslog:
-      enabled: true
-      pattern: '%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i'
-    basedir: ''
-spring:
-  sql:
-    init:
-      platform: dm
-db:
-  pool: 
-    config:
-      driverClassName: dm.jdbc.driver.DmDriver
-  num: 1
-  password:
-    '0': SYSDBA
-  url:
-    '0': jdbc:dm://192.168.1.188:30236/DMSERVER?schema=NACOS&compatibleMode=mysql&ignoreCase=true&ENCODING=utf-8
-  user:
-    '0': SYSDBA
-management:
-  metrics:
-    export:
-      elastic:
-        enabled: false
-      influx:
-        enabled: false
-nacos:
-  core:
-    auth:
-      enabled: false
-      caching:
-        enabled: true
-      server:
-        identity:
-          key: example
-          value: example
-      plugin:
-        nacos:
-          token:
-            expire:
-              seconds: 18000
-            secret:
-              key: SecretKey01234567890123456789012345345678999987654901234567890123456789
-      system:
-        type: nacos
-  istio:
-    mcp:
-      server:
-        enabled: false
-  naming:
-    empty-service:
-      auto-clean: true
-      clean:
-        initial-delay-ms: 50000
-        period-time-ms: 30000
-  security:
-    ignore:
-      urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
-  standalone: true

+ 0 - 60
jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application-mysql.yml

@@ -1,60 +0,0 @@
-server:
-  servlet:
-    contextPath: /nacos
-  tomcat:
-    accesslog:
-      enabled: true
-      pattern: '%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i'
-    basedir: ''
-spring:
-  sql:
-    init:
-      platform: mysql
-db:
-  num: 1
-  password:
-    '0': ${MYSQL-PWD:root}
-  url:
-    '0': jdbc:mysql://${MYSQL-HOST:jeecg-boot-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:nacos}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
-  user:
-    '0': ${MYSQL-USER:root}
-management:
-  metrics:
-    export:
-      elastic:
-        enabled: false
-      influx:
-        enabled: false
-nacos:
-  core:
-    auth:
-      enabled: false
-      caching:
-        enabled: true
-      server:
-        identity:
-          key: nacos
-          value: nacos
-      plugin:
-        nacos:
-          token:
-            expire:
-              seconds: 18000
-            secret:
-              key: VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
-      system:
-        type: nacos
-  istio:
-    mcp:
-      server:
-        enabled: false
-  naming:
-    empty-service:
-      auto-clean: true
-      clean:
-        initial-delay-ms: 50000
-        period-time-ms: 30000
-  security:
-    ignore:
-      urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
-  standalone: true

+ 0 - 3
jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application.yml

@@ -1,3 +0,0 @@
-spring:
-  profiles:
-    active: mysql

+ 0 - 15
jeecg-server-cloud/jeecg-demo-cloud-start/Dockerfile

@@ -1,15 +0,0 @@
-FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
-
-MAINTAINER jeecgos@163.com
-
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-
-RUN mkdir -p /jeecg-demo-cloud
-
-WORKDIR /jeecg-demo-cloud
-
-EXPOSE 7002
-
-ADD ./target/jeecg-demo-cloud-start-3.7.1.jar ./
-
-CMD sleep 60;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-demo-cloud-start-3.7.1.jar

+ 0 - 3
jeecg-server-cloud/jeecg-demo-cloud-start/README.md

@@ -1,3 +0,0 @@
-采用jar启动必须设置-Dfile.encoding=utf-8 ,不然会加载不到naocs文件
-
-java  -Dfile.encoding=utf-8  -jar  xxxx.jar

+ 0 - 48
jeecg-server-cloud/jeecg-demo-cloud-start/pom.xml

@@ -1,48 +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">
-    <parent>
-        <artifactId>jeecg-server-cloud</artifactId>
-        <groupId>org.jeecgframework.boot</groupId>
-        <version>3.7.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>jeecg-demo-cloud-start</artifactId>
-    <description>Demo微服务启动</description>
-
-    <dependencies>
-        <!--引入微服务启动依赖 starter-->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-cloud</artifactId>
-        </dependency>
-        <!--system cloud api-->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-system-cloud-api</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-job</artifactId>
-        </dependency>
-
-        <!-- 引入demo模块 -->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-module-demo</artifactId>
-            <version>${jeecgboot.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-</project>

+ 0 - 35
jeecg-server-cloud/jeecg-demo-cloud-start/src/main/java/org/jeecg/JeecgDemoCloudApplication.java

@@ -1,35 +0,0 @@
-package org.jeecg;
-
-import org.jeecg.common.base.BaseMap;
-import org.jeecg.common.constant.GlobalConstants;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.openfeign.EnableFeignClients;
-import org.springframework.data.redis.core.RedisTemplate;
-
-@SpringBootApplication
-@EnableFeignClients
-public class JeecgDemoCloudApplication implements CommandLineRunner {
-    @Autowired
-    private RedisTemplate<String, Object> redisTemplate;
-
-    public static void main(String[] args) {
-        SpringApplication.run(JeecgDemoCloudApplication.class, args);
-    }
-
-    /**
-     * 启动的时候,触发下gateway网关刷新
-     *
-     * 解决: 先启动gateway后启动服务,Swagger接口文档访问不通的问题
-     * @param args
-     */
-    @Override
-    public void run(String... args) {
-        BaseMap params = new BaseMap();
-        params.put(GlobalConstants.HANDLER_NAME, GlobalConstants.LODER_ROUDER_HANDLER);
-        //刷新网关
-        redisTemplate.convertAndSend(GlobalConstants.REDIS_TOPIC_NAME, params);
-    }
-}

+ 0 - 24
jeecg-server-cloud/jeecg-demo-cloud-start/src/main/resources/application.yml

@@ -1,24 +0,0 @@
-server:
-  port: 7002
-  
-spring:
-  application:
-    name: jeecg-demo
-  cloud:
-    nacos:
-      config:
-        server-addr: @config.server-addr@
-        group: @config.group@
-        namespace: @config.namespace@
-        username: @config.username@
-        password: @config.password@
-      discovery:
-        server-addr: ${spring.cloud.nacos.config.server-addr}
-        group: @config.group@
-        namespace: @config.namespace@
-        username: @config.username@
-        password: @config.password@
-  config:
-    import:
-      - optional:nacos:jeecg.yaml
-      - optional:nacos:jeecg-@profile.name@.yaml

+ 0 - 77
jeecg-server-cloud/jeecg-demo-cloud-start/src/main/resources/logback-spring.xml

@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration debug="false">
-	<!--定义日志文件的存储地址 -->
-	<property name="LOG_HOME" value="../logs" />
-
-	<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
-	<!-- 控制台输出 -->
-	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>-->
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{50}:%L) - %msg%n</pattern>
-		</encoder>
-	</appender>
-
-	<!-- 按照每天生成日志文件 -->
-	<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<!--日志文件输出的文件名 -->
-			<FileNamePattern>${LOG_HOME}/jeecg-demo-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
-			<!--日志文件保留天数 -->
-			<MaxHistory>30</MaxHistory>
-			<maxFileSize>10MB</maxFileSize>
-		</rollingPolicy>
-		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
-		</encoder>
-	</appender>
-
-	<!-- 生成 error html格式日志开始 -->
-	<appender name="HTML" class="ch.qos.logback.core.FileAppender">
-		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-			<!--设置日志级别,过滤掉info日志,只输入error日志-->
-			<level>ERROR</level>
-		</filter>
-		<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
-			<layout class="ch.qos.logback.classic.html.HTMLLayout">
-				<pattern>%p%d%msg%M%F{32}%L</pattern>
-			</layout>
-		</encoder>
-		<file>${LOG_HOME}/error-log.html</file>
-	</appender>
-	<!-- 生成 error html格式日志结束 -->
-
-	<!-- 每天生成一个html格式的日志开始 -->
-	<appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<!--日志文件输出的文件名 -->
-			<FileNamePattern>${LOG_HOME}/jeecg-demo-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
-			<!--日志文件保留天数 -->
-			<MaxHistory>30</MaxHistory>
-			<MaxFileSize>10MB</MaxFileSize>
-		</rollingPolicy>
-		<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
-			<layout class="ch.qos.logback.classic.html.HTMLLayout">
-				<pattern>%p%d%msg%M%F{32}%L</pattern>
-			</layout>
-		</encoder>
-	</appender>
-	<!-- 每天生成一个html格式的日志结束 -->
-
-	<!--myibatis log configure -->
-	<logger name="com.apache.ibatis" level="TRACE" />
-	<logger name="java.sql.Connection" level="DEBUG" />
-	<logger name="java.sql.Statement" level="DEBUG" />
-	<logger name="java.sql.PreparedStatement" level="DEBUG" />
-
-	<!-- 日志输出级别 -->
-	<root level="INFO">
-		<appender-ref ref="STDOUT" />
-		<appender-ref ref="FILE" />
-		<appender-ref ref="HTML" />
-		<appender-ref ref="FILE_HTML" />
-	</root>
-
-</configuration>

+ 0 - 15
jeecg-server-cloud/jeecg-system-cloud-start/Dockerfile

@@ -1,15 +0,0 @@
-FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
-
-MAINTAINER jeecgos@163.com
-
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-
-RUN mkdir -p /jeecg-system-cloud
-
-WORKDIR /jeecg-system-cloud
-
-EXPOSE 7001
-
-ADD ./target/jeecg-system-cloud-start-3.7.1.jar ./
-
-CMD sleep 60;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-system-cloud-start-3.7.1.jar

+ 0 - 3
jeecg-server-cloud/jeecg-system-cloud-start/README.md

@@ -1,3 +0,0 @@
-采用jar启动必须设置-Dfile.encoding=utf-8 ,不然会加载不到naocs文件
-
-java  -Dfile.encoding=utf-8  -jar  xxxx.jar

+ 0 - 81
jeecg-server-cloud/jeecg-system-cloud-start/pom.xml

@@ -1,81 +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">
-    <parent>
-        <artifactId>jeecg-server-cloud</artifactId>
-        <groupId>org.jeecgframework.boot</groupId>
-        <version>3.7.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>jeecg-system-cloud-start</artifactId>
-    <description>System项目微服务启动</description>
-
-    <dependencies>
-        <!-- 引入jeecg-boot-starter-cloud依赖 -->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-cloud</artifactId>
-            <!-- 3.2版本号后,可选择是否排除jeecg-system-cloud-api,不排除会优先通过fegin调用接口
-            <exclusions>
-                <exclusion>
-                    <groupId>org.jeecgframework.boot</groupId>
-                    <artifactId>jeecg-system-cloud-api</artifactId>
-                </exclusion>
-            </exclusions>-->
-        </dependency>
-        <!-- jeecg-system-biz依赖 -->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-system-biz</artifactId>
-            <!-- 排除demo模块,demo模块采用微服务独立启动 -->
-            <exclusions>
-                <exclusion>
-                    <groupId>org.jeecgframework.boot</groupId>
-                    <artifactId>jeecg-module-demo</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- feign 熔断限流、分布式锁、xxljob示例 
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-cloud-test-more</artifactId>
-            <version>${jeecgboot.version}</version>
-        </dependency>-->
-        <!-- rabbitmq例子
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-cloud-test-rabbitmq</artifactId>
-            <version>${jeecgboot.version}</version>
-        </dependency>-->
-        <!-- rocketmq例子-->
-        <!--<dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-cloud-test-rocketmq</artifactId>
-            <version>${jeecgboot.version}</version>
-        </dependency>-->
-        <!-- 分布式事务例子
-       <dependency>
-           <groupId>org.jeecgframework.boot</groupId>
-           <artifactId>jeecg-cloud-test-seata</artifactId>
-           <version>${jeecgboot.version}</version>
-       </dependency>-->
-        <!-- 分库分表例子
-       <dependency>
-           <groupId>org.jeecgframework.boot</groupId>
-           <artifactId>jeecg-cloud-test-shardingsphere</artifactId>
-           <version>${jeecgboot.version}</version>
-       </dependency>-->
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-</project>

+ 0 - 69
jeecg-server-cloud/jeecg-system-cloud-start/src/main/java/org/jeecg/JeecgSystemCloudApplication.java

@@ -1,69 +0,0 @@
-package org.jeecg;
-
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.base.BaseMap;
-import org.jeecg.common.constant.GlobalConstants;
-import org.jeecg.common.util.oConvertUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
-import org.springframework.cloud.openfeign.EnableFeignClients;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.core.env.Environment;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.scheduling.annotation.EnableScheduling;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * 微服务启动类(采用此类启动项目为微服务模式)
- *  注意: 需要先初始化Nacos的数据库脚本,db/tables_nacos.sql
- * @author zyf
- * @date: 2022/4/21 10:55
- */
-@Slf4j
-@SpringBootApplication
-@EnableFeignClients(basePackages = {"org.jeecg"})
-@EnableScheduling
-public class JeecgSystemCloudApplication extends SpringBootServletInitializer implements CommandLineRunner {
-
-    @Autowired
-    private RedisTemplate<String, Object> redisTemplate;
-    @Override
-    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
-        return application.sources(JeecgSystemCloudApplication.class);
-    }
-
-    public static void main(String[] args) throws UnknownHostException {
-        ConfigurableApplicationContext application = SpringApplication.run(JeecgSystemCloudApplication.class, args);
-        Environment env = application.getEnvironment();
-        String ip = InetAddress.getLocalHost().getHostAddress();
-        String port = env.getProperty("server.port");
-        String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
-        log.info("\n----------------------------------------------------------\n\t" +
-                "Application Jeecg-Boot is running! Access URLs:\n\t" +
-                "Local: \t\thttp://localhost:" + port + path + "/doc.html\n" +
-                "External: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
-                "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
-                "----------------------------------------------------------");
-
-    }
-
-    /**
-     * 启动的时候,触发下gateway网关刷新
-     *
-     * 解决: 先启动gateway后启动服务,Swagger接口文档访问不通的问题
-     * @param args
-     */
-    @Override
-    public void run(String... args) {
-        BaseMap params = new BaseMap();
-        params.put(GlobalConstants.HANDLER_NAME, GlobalConstants.LODER_ROUDER_HANDLER);
-        //刷新网关
-        redisTemplate.convertAndSend(GlobalConstants.REDIS_TOPIC_NAME, params);
-    }
-}

+ 0 - 24
jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/application.yml

@@ -1,24 +0,0 @@
-server:
-  port: 7001
-  
-spring:
-  application:
-    name: jeecg-system
-  cloud:
-    nacos:
-      config:
-        server-addr: @config.server-addr@
-        group: @config.group@
-        namespace: @config.namespace@
-        username: @config.username@
-        password: @config.password@
-      discovery:
-        server-addr: ${spring.cloud.nacos.config.server-addr}
-        group: @config.group@
-        namespace: @config.namespace@
-        username: @config.username@
-        password: @config.password@
-  config:
-    import:
-      - optional:nacos:jeecg.yaml
-      - optional:nacos:jeecg-@profile.name@.yaml

+ 0 - 29
jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/jeecg/jeecg_config.properties

@@ -1,29 +0,0 @@
-#code_generate_project_path
-project_path=E:\\workspace\\jeecg-boot
-#bussi_package[User defined]
-bussi_package=org.jeecg.modules.demo
-
-
-#default code path
-#source_root_package=src
-#webroot_package=WebRoot
-
-#maven code path
-source_root_package=src.main.java
-webroot_package=src.main.webapp
-
-#ftl resource url
-templatepath=/jeecg/code-template
-system_encoding=utf-8
-
-#db Table id [User defined] 
-db_table_id=id
-
-#db convert flag[true/false]
-db_filed_convert=true
-
-#page Search Field num [User defined]
-page_search_filed_num=1
-#page_filter_fields
-page_filter_fields=create_time,create_by,update_time,update_by
-exclude_table=act_,ext_act_,design_,onl_,sys_,qrtz_

+ 0 - 27
jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/jeecg/jeecg_database.properties

@@ -1,27 +0,0 @@
-#mysql
-diver_name=com.mysql.jdbc.Driver
-url=jdbc:mysql://localhost:3306/jeecg-boot?useUnicode=true&characterEncoding=UTF-8
-username=root
-password=root
-database_name=jeecg-boot
-
-#oracle
-#diver_name=oracle.jdbc.driver.OracleDriver
-#url=jdbc:oracle:thin:@192.168.1.200:1521:ORCL
-#username=scott
-#password=tiger
-#database_name=ORCL
-
-#postgre
-#diver_name=org.postgresql.Driver
-#url=jdbc:postgresql://localhost:5432/jeecg
-#username=postgres
-#password=postgres
-#database_name=jeecg
-
-#SQLServer2005\u4ee5\u4e0a
-#diver_name=org.hibernate.dialect.SQLServerDialect
-#url=jdbc:sqlserver://192.168.1.200:1433;DatabaseName=jeecg
-#username=sa
-#password=SA
-#database_name=jeecg

+ 0 - 77
jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/logback-spring.xml

@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration debug="false">
-	<!--定义日志文件的存储地址 -->
-	<property name="LOG_HOME" value="../logs" />
-
-	<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
-	<!-- 控制台输出 -->
-	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>-->
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{50}:%L) - %msg%n</pattern>
-		</encoder>
-	</appender>
-
-	<!-- 按照每天生成日志文件 -->
-	<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<!--日志文件输出的文件名 -->
-			<FileNamePattern>${LOG_HOME}/jeecg-system-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
-			<!--日志文件保留天数 -->
-			<MaxHistory>30</MaxHistory>
-			<maxFileSize>10MB</maxFileSize>
-		</rollingPolicy>
-		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
-		</encoder>
-	</appender>
-
-	<!-- 生成 error html格式日志开始 -->
-	<appender name="HTML" class="ch.qos.logback.core.FileAppender">
-		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-			<!--设置日志级别,过滤掉info日志,只输入error日志-->
-			<level>ERROR</level>
-		</filter>
-		<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
-			<layout class="ch.qos.logback.classic.html.HTMLLayout">
-				<pattern>%p%d%msg%M%F{32}%L</pattern>
-			</layout>
-		</encoder>
-		<file>${LOG_HOME}/error-log.html</file>
-	</appender>
-	<!-- 生成 error html格式日志结束 -->
-
-	<!-- 每天生成一个html格式的日志开始 -->
-	<appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<!--日志文件输出的文件名 -->
-			<FileNamePattern>${LOG_HOME}/jeecg-system-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
-			<!--日志文件保留天数 -->
-			<MaxHistory>30</MaxHistory>
-			<MaxFileSize>10MB</MaxFileSize>
-		</rollingPolicy>
-		<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
-			<layout class="ch.qos.logback.classic.html.HTMLLayout">
-				<pattern>%p%d%msg%M%F{32}%L</pattern>
-			</layout>
-		</encoder>
-	</appender>
-	<!-- 每天生成一个html格式的日志结束 -->
-
-	<!--myibatis log configure -->
-	<logger name="com.apache.ibatis" level="TRACE" />
-	<logger name="java.sql.Connection" level="DEBUG" />
-	<logger name="java.sql.Statement" level="DEBUG" />
-	<logger name="java.sql.PreparedStatement" level="DEBUG" />
-
-	<!-- 日志输出级别 -->
-	<root level="INFO">
-		<appender-ref ref="STDOUT" />
-		<appender-ref ref="FILE" />
-		<appender-ref ref="HTML" />
-		<appender-ref ref="FILE_HTML" />
-	</root>
-
-</configuration>

+ 0 - 2
jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/README.md

@@ -1,2 +0,0 @@
-http://localhost:9111
-账号密码:admin/admin

+ 0 - 65
jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/pom.xml

@@ -1,65 +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">
-    <parent>
-        <artifactId>jeecg-visual</artifactId>
-        <groupId>org.jeecgframework.boot</groupId>
-        <version>3.7.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>jeecg-cloud-monitor</artifactId>
-
-    <dependencies>
-        <!--Spring Boot Admin Server监控服务端-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>de.codecentric</groupId>
-            <artifactId>spring-boot-admin-starter-server</artifactId>
-            <version>2.3.1</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <!--安全模块-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-security</artifactId>
-        </dependency>
-        <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>
-            </exclusions>
-        </dependency>
-        <!--undertow容器-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-undertow</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-    </build>
-</project>

+ 0 - 18
jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/src/main/java/org/jeecg/monitor/JeecgMonitorApplication.java

@@ -1,18 +0,0 @@
-package org.jeecg.monitor;
-
-import de.codecentric.boot.admin.server.config.EnableAdminServer;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * 监控服务
- * @author zyf
- * @date: 2022/4/21 10:55
- */
-@SpringBootApplication
-@EnableAdminServer
-public class JeecgMonitorApplication {
-    public static void main(String[] args) {
-        SpringApplication.run(JeecgMonitorApplication.class, args);
-    }
-}

+ 0 - 52
jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/src/main/java/org/jeecg/monitor/config/SecuritySecureConfig.java

@@ -1,52 +0,0 @@
-package org.jeecg.monitor.config;
-
-import de.codecentric.boot.admin.server.config.AdminServerProperties;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
-import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
-
-/**
- * @author scott
- */
-@Configuration
-public class SecuritySecureConfig extends WebSecurityConfigurerAdapter {
-
-    private final String adminContextPath;
-
-    public SecuritySecureConfig(AdminServerProperties adminServerProperties) {
-        this.adminContextPath = adminServerProperties.getContextPath();
-    }
-
-
-    @Override
-    protected void configure(HttpSecurity http) throws Exception {
-        // 登录成功处理类
-        SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
-        successHandler.setTargetUrlParameter("redirectTo");
-        successHandler.setDefaultTargetUrl(adminContextPath + "/");
-
-        http.authorizeRequests()
-                //静态文件允许访问
-                .antMatchers(adminContextPath + "/assets/**").permitAll()
-                //登录页面允许访问
-                .antMatchers(adminContextPath + "/login", "/css/**", "/js/**", "/image/*").permitAll()
-                //其他所有请求需要登录
-                .anyRequest().authenticated()
-                .and()
-                //登录页面配置,用于替换security默认页面
-                .formLogin().loginPage(adminContextPath + "/login").successHandler(successHandler).and()
-                //登出页面配置,用于替换security默认页面
-                .logout().logoutUrl(adminContextPath + "/logout").and()
-                .httpBasic().and()
-                .csrf()
-                .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
-                .ignoringAntMatchers(
-                        "/instances",
-                        "/actuator/**"
-                );
-
-    }
-
-}

+ 0 - 37
jeecg-server-cloud/jeecg-visual/jeecg-cloud-monitor/src/main/resources/application.yml

@@ -1,37 +0,0 @@
-server:
-  port: 9111
-spring:
-  boot:
-    admin:
-      ui:
-        title: JeecgCloud监控中心
-      client:
-        instance:
-          metadata:
-            tags:
-              environment: local
-  security:
-    user:
-      name: "admin"
-      password: "admin"
-  application:
-    name: jeecg-monitor
-  cloud:
-    nacos:
-      discovery:
-        server-addr: @config.server-addr@
-        metadata:
-          user.name: ${spring.security.user.name}
-          user.password: ${spring.security.user.password}
-# 服务端点检查
-management:
-  trace:
-    http:
-      enabled: true
-  endpoints:
-    web:
-      exposure:
-        include: "*"
-  endpoint:
-    health:
-      show-details: always

+ 0 - 15
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/Dockerfile

@@ -1,15 +0,0 @@
-FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
-
-MAINTAINER jeecgos@163.com
-
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-
-RUN mkdir -p /jeecg-cloud-sentinel
-
-WORKDIR /jeecg-cloud-sentinel
-
-EXPOSE 8848
-
-ADD ./target/jeecg-cloud-sentinel-3.7.1.jar ./
-
-CMD sleep 5;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-sentinel-3.7.1.jar

+ 0 - 9
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/README.md

@@ -1,9 +0,0 @@
-访问地址: http://localhost:9000
-账号密码:sentinel/sentinel
-
-
-# 使用方法
-
-- 1、第一次登录sentinel内容是空的,必须访问了微服务实例的请求才会出现配置
-- 2、sentinel做了深度改造,支持持久化到nacos中
-- 3、目前只针对gateway做的控制,其他服务不需要

+ 0 - 147
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/pom.xml

@@ -1,147 +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>
-        <artifactId>jeecg-visual</artifactId>
-        <groupId>org.jeecgframework.boot</groupId>
-        <version>3.7.1</version>
-    </parent>
-    <artifactId>jeecg-cloud-sentinel</artifactId>
-    <name>jeecg-cloud-sentinel</name>
-    <description>sentinel启动模块</description>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.jeecgframework.cloud</groupId>
-            <artifactId>sentinel-dashboard</artifactId>
-            <version>1.8.3</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>sentinel-web-servlet</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>sentinel-transport-simple-http</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>sentinel-parameter-flow-control</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>sentinel-core</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>sentinel-api-gateway-adapter-common</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-datasource-nacos</artifactId>
-            <version>1.8.3</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>sentinel-core</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-core</artifactId>
-            <version>1.8.3</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-web-servlet</artifactId>
-            <version>1.8.3</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>sentinel-core</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-transport-simple-http</artifactId>
-            <version>1.8.3</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-parameter-flow-control</artifactId>
-            <version>1.8.3</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>sentinel-core</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-api-gateway-adapter-common</artifactId>
-            <version>1.8.3</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>sentinel-parameter-flow-control</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>sentinel-core</artifactId>
-                    <groupId>com.alibaba.csp</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-        <!--undertow容器-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-undertow</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
-            <version>2.6</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>4.5.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpcore</artifactId>
-            <version>4.4.5</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpasyncclient</artifactId>
-            <version>4.1.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpcore-nio</artifactId>
-            <version>4.4.6</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>

+ 0 - 52
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/JeecgSentinelApplication.java

@@ -1,52 +0,0 @@
-/*
- * Copyright 1999-2018 Alibaba Group Holding Ltd.
- *
- * 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.
- */
-package com.alibaba.csp.sentinel.dashboard;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.core.env.Environment;
-import com.alibaba.csp.sentinel.init.InitExecutor;
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * Sentinel dashboard application.
- *
- * @author Carpenter Lee
- */
-@SpringBootApplication
-@Slf4j
-public class JeecgSentinelApplication {
-
-    public static void main(String[] args) {
-        System.setProperty("csp.sentinel.app.type", "1");
-        triggerSentinelInit();
-        ConfigurableApplicationContext application = SpringApplication.run(JeecgSentinelApplication.class, args);
-        Environment env = application.getEnvironment();
-        // 目前jeecg-sentinel 1.8.3 版本存在alibaba-sentinel 1.8.3版本 启动nacos数据源导致配置不生效的问题,以下为临时处理办法
-        System.getProperties().setProperty("sentinel.dashboard.auth.username", env.getProperty("sentinel.dashboard.auth.username"));
-        System.getProperties().setProperty("sentinel.dashboard.auth.password", env.getProperty("sentinel.dashboard.auth.password"));
-        String port = env.getProperty("server.port");
-        log.info("\n----------------------------------------------------------\n\t" +
-                "Application SentinelDashboard is running! Access URLs:\n\t" +
-                "Local: \t\thttp://localhost:" + port  + "/\n\t" +
-                "----------------------------------------------------------");
-    }
-
-    private static void triggerSentinelInit() {
-        new Thread(() -> InitExecutor.doInit()).start();
-    }
-}

+ 0 - 39
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/constants/SentinelConStants.java

@@ -1,39 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.constants;
-
-/**
- * sentinel常量配置
- * @author zyf
- */
-public class SentinelConStants {
-    public static final String GROUP_ID = "SENTINEL_GROUP";
-
-    /**
-     * 流控规则
-     */
-    public static final String FLOW_DATA_ID_POSTFIX = "-flow-rules";
-    /**
-     * 热点参数
-     */
-    public static final String PARAM_FLOW_DATA_ID_POSTFIX = "-param-rules";
-    /**
-     * 降级规则
-     */
-    public static final String DEGRADE_DATA_ID_POSTFIX = "-degrade-rules";
-    /**
-     * 系统规则
-     */
-    public static final String SYSTEM_DATA_ID_POSTFIX = "-system-rules";
-    /**
-     * 授权规则
-     */
-    public static final String AUTHORITY_DATA_ID_POSTFIX = "-authority-rules";
-
-    /**
-     * 网关API
-     */
-    public static final String GETEWAY_API_DATA_ID_POSTFIX = "-api-rules";
-    /**
-     * 网关流控规则
-     */
-    public static final String GETEWAY_FLOW_DATA_ID_POSTFIX = "-flow-rules";
-}

+ 0 - 181
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/AuthorityRuleController.java

@@ -1,181 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.controller;
-
-
-import java.util.Date;
-import java.util.List;
-
-import com.alibaba.csp.sentinel.dashboard.auth.AuthAction;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService.PrivilegeType;
-import com.alibaba.csp.sentinel.dashboard.controller.base.BaseRuleController;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.slots.block.RuleConstant;
-import com.alibaba.csp.sentinel.util.StringUtil;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.AuthorityRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.domain.Result;
-import com.alibaba.csp.sentinel.dashboard.repository.rule.RuleRepository;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-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;
-
-/**
- * 授权规则控制器
- *
- * @author zyf
- * @date 2022-04-13
- */
-@RestController
-@RequestMapping(value = "/authority")
-public class AuthorityRuleController extends BaseRuleController {
-
-    private final Logger logger = LoggerFactory.getLogger(AuthorityRuleController.class);
-
-    @Autowired
-    private RuleRepository<AuthorityRuleEntity, Long> repository;
-    @Autowired
-    @Qualifier("authorityRuleNacosProvider")
-    private DynamicRuleProvider<List<AuthorityRuleEntity>> ruleProvider;
-    @Autowired
-    @Qualifier("authorityRuleNacosPublisher")
-    private DynamicRulePublisher<List<AuthorityRuleEntity>> rulePublisher;
-
-    @GetMapping("/rules")
-    @AuthAction(PrivilegeType.READ_RULE)
-    public Result<List<AuthorityRuleEntity>> apiQueryAllRulesForMachine(@RequestParam String app,
-                                                                        @RequestParam String ip,
-                                                                        @RequestParam Integer port) {
-        if (StringUtil.isEmpty(app)) {
-            return Result.ofFail(-1, "app cannot be null or empty");
-        }
-        if (StringUtil.isEmpty(ip)) {
-            return Result.ofFail(-1, "ip cannot be null or empty");
-        }
-        if (port == null || port <= 0) {
-            return Result.ofFail(-1, "Invalid parameter: port");
-        }
-        try {
-            List<AuthorityRuleEntity> rules = ruleProvider.getRules(app);
-            rules = repository.saveAll(rules);
-            return Result.ofSuccess(rules);
-        } catch (Throwable throwable) {
-            logger.error("Error when querying authority rules", throwable);
-            return Result.ofFail(-1, throwable.getMessage());
-        }
-    }
-
-    private <R> Result<R> checkEntityInternal(AuthorityRuleEntity entity) {
-        if (entity == null) {
-            return Result.ofFail(-1, "bad rule body");
-        }
-        if (StringUtil.isBlank(entity.getApp())) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        if (StringUtil.isBlank(entity.getIp())) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        if (entity.getPort() == null || entity.getPort() <= 0) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-        if (entity.getRule() == null) {
-            return Result.ofFail(-1, "rule can't be null");
-        }
-        if (StringUtil.isBlank(entity.getResource())) {
-            return Result.ofFail(-1, "resource name cannot be null or empty");
-        }
-        if (StringUtil.isBlank(entity.getLimitApp())) {
-            return Result.ofFail(-1, "limitApp should be valid");
-        }
-        if (entity.getStrategy() != RuleConstant.AUTHORITY_WHITE
-                && entity.getStrategy() != RuleConstant.AUTHORITY_BLACK) {
-            return Result.ofFail(-1, "Unknown strategy (must be blacklist or whitelist)");
-        }
-        return null;
-    }
-
-    @PostMapping("/rule")
-    @AuthAction(PrivilegeType.WRITE_RULE)
-    public Result<AuthorityRuleEntity> apiAddAuthorityRule(@RequestBody AuthorityRuleEntity entity) {
-        Result<AuthorityRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-        entity.setId(null);
-        Date date = new Date();
-        entity.setGmtCreate(date);
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            publishRules(entity.getApp());
-        } catch (Throwable throwable) {
-            logger.error("Failed to add authority rule", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @PutMapping("/rule/{id}")
-    @AuthAction(PrivilegeType.WRITE_RULE)
-    public Result<AuthorityRuleEntity> apiUpdateParamFlowRule(@PathVariable("id") Long id,
-                                                              @RequestBody AuthorityRuleEntity entity) {
-        if (id == null || id <= 0) {
-            return Result.ofFail(-1, "Invalid id");
-        }
-        Result<AuthorityRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-        entity.setId(id);
-        Date date = new Date();
-        entity.setGmtCreate(null);
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            if (entity == null) {
-                return Result.ofFail(-1, "Failed to save authority rule");
-            }
-            publishRules(entity.getApp());
-        } catch (Throwable throwable) {
-            logger.error("Failed to save authority rule", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @DeleteMapping("/rule/{id}")
-    @AuthAction(PrivilegeType.DELETE_RULE)
-    public Result<Long> apiDeleteRule(@PathVariable("id") Long id) {
-        if (id == null) {
-            return Result.ofFail(-1, "id cannot be null");
-        }
-        AuthorityRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofSuccess(null);
-        }
-        try {
-            repository.delete(id);
-            publishRules(oldEntity.getApp());
-        } catch (Exception e) {
-            return Result.ofFail(-1, e.getMessage());
-        }
-        return Result.ofSuccess(id);
-    }
-
-    private void publishRules(String app) throws Exception {
-        List<AuthorityRuleEntity> rules = repository.findAllByApp(app);
-        rulePublisher.publish(app, rules);
-        //延迟加载
-        delayTime();
-    }
-}

+ 0 - 209
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/DegradeController.java

@@ -1,209 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.controller;
-
-
-import java.util.Date;
-import java.util.List;
-
-import com.alibaba.csp.sentinel.dashboard.auth.AuthAction;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService.PrivilegeType;
-import com.alibaba.csp.sentinel.dashboard.controller.base.BaseRuleController;
-import com.alibaba.csp.sentinel.dashboard.repository.rule.RuleRepository;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.slots.block.RuleConstant;
-import com.alibaba.csp.sentinel.slots.block.degrade.circuitbreaker.CircuitBreakerStrategy;
-import com.alibaba.csp.sentinel.util.StringUtil;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.DegradeRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.domain.Result;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-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.RestController;
-
-/**
- * 降级规则控制器
- *
- * @author zyf
- * @date 2022-04-13
- */
-@RestController
-@RequestMapping("/degrade")
-public class DegradeController extends BaseRuleController {
-
-    private final Logger logger = LoggerFactory.getLogger(DegradeController.class);
-
-    @Autowired
-    private RuleRepository<DegradeRuleEntity, Long> repository;
-    @Autowired
-    @Qualifier("degradeRuleNacosProvider")
-    private DynamicRuleProvider<List<DegradeRuleEntity>> ruleProvider;
-    @Autowired
-    @Qualifier("degradeRuleNacosPublisher")
-    private DynamicRulePublisher<List<DegradeRuleEntity>> rulePublisher;
-
-    @GetMapping("/rules.json")
-    @AuthAction(PrivilegeType.READ_RULE)
-    public Result<List<DegradeRuleEntity>> apiQueryMachineRules(String app, String ip, Integer port) {
-        if (StringUtil.isEmpty(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        if (StringUtil.isEmpty(ip)) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        if (port == null) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-        try {
-            List<DegradeRuleEntity> rules = ruleProvider.getRules(app);
-            rules = repository.saveAll(rules);
-            return Result.ofSuccess(rules);
-        } catch (Throwable throwable) {
-            logger.error("queryApps error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-    }
-
-    @PostMapping("/rule")
-    @AuthAction(PrivilegeType.WRITE_RULE)
-    public Result<DegradeRuleEntity> apiAddRule(@RequestBody DegradeRuleEntity entity) {
-        Result<DegradeRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-        Date date = new Date();
-        entity.setGmtCreate(date);
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            publishRules(entity.getApp());
-        } catch (Throwable t) {
-            logger.error("Failed to add new degrade rule, app={}, ip={}", entity.getApp(), entity.getIp(), t);
-            return Result.ofThrowable(-1, t);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @PutMapping("/rule/{id}")
-    @AuthAction(PrivilegeType.WRITE_RULE)
-    public Result<DegradeRuleEntity> apiUpdateRule(@PathVariable("id") Long id,
-                                                   @RequestBody DegradeRuleEntity entity) {
-        if (id == null || id <= 0) {
-            return Result.ofFail(-1, "id can't be null or negative");
-        }
-        DegradeRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofFail(-1, "Degrade rule does not exist, id=" + id);
-        }
-        entity.setApp(oldEntity.getApp());
-        entity.setIp(oldEntity.getIp());
-        entity.setPort(oldEntity.getPort());
-        entity.setId(oldEntity.getId());
-        Result<DegradeRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-
-        entity.setGmtCreate(oldEntity.getGmtCreate());
-        entity.setGmtModified(new Date());
-        try {
-            entity = repository.save(entity);
-            publishRules(entity.getApp());
-        } catch (Throwable t) {
-            logger.error("Failed to save degrade rule, id={}, rule={}", id, entity, t);
-            return Result.ofThrowable(-1, t);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @DeleteMapping("/rule/{id}")
-    @AuthAction(PrivilegeType.DELETE_RULE)
-    public Result<Long> delete(@PathVariable("id") Long id) {
-        if (id == null) {
-            return Result.ofFail(-1, "id can't be null");
-        }
-
-        DegradeRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofSuccess(null);
-        }
-
-        try {
-            repository.delete(id);
-            publishRules(oldEntity.getApp());
-        } catch (Throwable throwable) {
-            logger.error("Failed to delete degrade rule, id={}", id, throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(id);
-    }
-
-    private void publishRules(/*@NonNull*/ String app) throws Exception {
-        List<DegradeRuleEntity> rules = repository.findAllByApp(app);
-        rulePublisher.publish(app, rules);
-        //延迟加载
-        delayTime();
-    }
-
-    private <R> Result<R> checkEntityInternal(DegradeRuleEntity entity) {
-        if (StringUtil.isBlank(entity.getApp())) {
-            return Result.ofFail(-1, "app can't be blank");
-        }
-        if (StringUtil.isBlank(entity.getIp())) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        if (entity.getPort() == null || entity.getPort() <= 0) {
-            return Result.ofFail(-1, "invalid port: " + entity.getPort());
-        }
-        if (StringUtil.isBlank(entity.getLimitApp())) {
-            return Result.ofFail(-1, "limitApp can't be null or empty");
-        }
-        if (StringUtil.isBlank(entity.getResource())) {
-            return Result.ofFail(-1, "resource can't be null or empty");
-        }
-        Double threshold = entity.getCount();
-        if (threshold == null || threshold < 0) {
-            return Result.ofFail(-1, "invalid threshold: " + threshold);
-        }
-        Integer recoveryTimeoutSec = entity.getTimeWindow();
-        if (recoveryTimeoutSec == null || recoveryTimeoutSec <= 0) {
-            return Result.ofFail(-1, "recoveryTimeout should be positive");
-        }
-        Integer strategy = entity.getGrade();
-        if (strategy == null) {
-            return Result.ofFail(-1, "circuit breaker strategy cannot be null");
-        }
-        if (strategy < CircuitBreakerStrategy.SLOW_REQUEST_RATIO.getType()
-                || strategy > RuleConstant.DEGRADE_GRADE_EXCEPTION_COUNT) {
-            return Result.ofFail(-1, "Invalid circuit breaker strategy: " + strategy);
-        }
-        if (entity.getMinRequestAmount()  == null || entity.getMinRequestAmount() <= 0) {
-            return Result.ofFail(-1, "Invalid minRequestAmount");
-        }
-        if (entity.getStatIntervalMs() == null || entity.getStatIntervalMs() <= 0) {
-            return Result.ofFail(-1, "Invalid statInterval");
-        }
-        if (strategy == RuleConstant.DEGRADE_GRADE_RT) {
-            Double slowRatio = entity.getSlowRatioThreshold();
-            if (slowRatio == null) {
-                return Result.ofFail(-1, "SlowRatioThreshold is required for slow request ratio strategy");
-            } else if (slowRatio < 0 || slowRatio > 1) {
-                return Result.ofFail(-1, "SlowRatioThreshold should be in range: [0.0, 1.0]");
-            }
-        } else if (strategy == RuleConstant.DEGRADE_GRADE_EXCEPTION_RATIO) {
-            if (threshold > 1) {
-                return Result.ofFail(-1, "Ratio threshold should be in range: [0.0, 1.0]");
-            }
-        }
-        return null;
-    }
-}

+ 0 - 253
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/ParamFlowRuleController.java

@@ -1,253 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.controller;
-
-
-import com.alibaba.csp.sentinel.dashboard.auth.AuthAction;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService.PrivilegeType;
-import com.alibaba.csp.sentinel.dashboard.client.CommandNotFoundException;
-import com.alibaba.csp.sentinel.dashboard.controller.base.BaseRuleController;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.SentinelVersion;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.ParamFlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.discovery.AppManagement;
-import com.alibaba.csp.sentinel.dashboard.domain.Result;
-import com.alibaba.csp.sentinel.dashboard.repository.rule.RuleRepository;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.dashboard.util.VersionUtils;
-import com.alibaba.csp.sentinel.slots.block.RuleConstant;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Optional;
-import java.util.concurrent.ExecutionException;
-/**
- * 热点参数规则控制器
- *
- * @author zyf
- * @date 2022-04-13
- */
-@RestController
-@RequestMapping(value = "/paramFlow")
-public class ParamFlowRuleController extends BaseRuleController {
-
-    private final Logger logger = LoggerFactory.getLogger(ParamFlowRuleController.class);
-
-    @Autowired
-    private AppManagement appManagement;
-    @Autowired
-    private RuleRepository<ParamFlowRuleEntity, Long> repository;
-    @Autowired
-    @Qualifier("paramFlowRuleNacosProvider")
-    private DynamicRuleProvider<List<ParamFlowRuleEntity>> ruleProvider;
-    @Autowired
-    @Qualifier("paramFlowRuleNacosPublisher")
-    private DynamicRulePublisher<List<ParamFlowRuleEntity>> rulePublisher;
-
-    private boolean checkIfSupported(String app, String ip, int port) {
-        try {
-            return Optional.ofNullable(appManagement.getDetailApp(app))
-                    .flatMap(e -> e.getMachine(ip, port))
-                    .flatMap(m -> VersionUtils.parseVersion(m.getVersion())
-                            .map(v -> v.greaterOrEqual(version020)))
-                    .orElse(true);
-            // If error occurred or cannot retrieve machine info, return true.
-        } catch (Exception ex) {
-            return true;
-        }
-    }
-
-    @GetMapping("/rules")
-    @AuthAction(PrivilegeType.READ_RULE)
-    public Result<List<ParamFlowRuleEntity>> apiQueryAllRulesForMachine(@RequestParam String app,
-                                                                        @RequestParam String ip,
-                                                                        @RequestParam Integer port) {
-        if (StringUtil.isEmpty(app)) {
-            return Result.ofFail(-1, "app cannot be null or empty");
-        }
-        if (StringUtil.isEmpty(ip)) {
-            return Result.ofFail(-1, "ip cannot be null or empty");
-        }
-        if (port == null || port <= 0) {
-            return Result.ofFail(-1, "Invalid parameter: port");
-        }
-        if (!checkIfSupported(app, ip, port)) {
-            return unsupportedVersion();
-        }
-        try {
-            List<ParamFlowRuleEntity> rules = ruleProvider.getRules(app);
-            rules = repository.saveAll(rules);
-            return Result.ofSuccess(rules);
-        } catch (ExecutionException ex) {
-            logger.error("Error when querying parameter flow rules", ex.getCause());
-            if (isNotSupported(ex.getCause())) {
-                return unsupportedVersion();
-            } else {
-                return Result.ofThrowable(-1, ex.getCause());
-            }
-        } catch (Throwable throwable) {
-            logger.error("Error when querying parameter flow rules", throwable);
-            return Result.ofFail(-1, throwable.getMessage());
-        }
-    }
-
-    private boolean isNotSupported(Throwable ex) {
-        return ex instanceof CommandNotFoundException;
-    }
-
-    @PostMapping("/rule")
-    @AuthAction(AuthService.PrivilegeType.WRITE_RULE)
-    public Result<ParamFlowRuleEntity> apiAddParamFlowRule(@RequestBody ParamFlowRuleEntity entity) {
-        Result<ParamFlowRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-        if (!checkIfSupported(entity.getApp(), entity.getIp(), entity.getPort())) {
-            return unsupportedVersion();
-        }
-        entity.setId(null);
-        entity.getRule().setResource(entity.getResource().trim());
-        Date date = new Date();
-        entity.setGmtCreate(date);
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            publishRules(entity.getApp());
-            return Result.ofSuccess(entity);
-        } catch (ExecutionException ex) {
-            logger.error("Error when adding new parameter flow rules", ex.getCause());
-            if (isNotSupported(ex.getCause())) {
-                return unsupportedVersion();
-            } else {
-                return Result.ofThrowable(-1, ex.getCause());
-            }
-        } catch (Throwable throwable) {
-            logger.error("Error when adding new parameter flow rules", throwable);
-            return Result.ofFail(-1, throwable.getMessage());
-        }
-    }
-
-    private <R> Result<R> checkEntityInternal(ParamFlowRuleEntity entity) {
-        if (entity == null) {
-            return Result.ofFail(-1, "bad rule body");
-        }
-        if (StringUtil.isBlank(entity.getApp())) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        if (StringUtil.isBlank(entity.getIp())) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        if (entity.getPort() == null || entity.getPort() <= 0) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-        if (entity.getRule() == null) {
-            return Result.ofFail(-1, "rule can't be null");
-        }
-        if (StringUtil.isBlank(entity.getResource())) {
-            return Result.ofFail(-1, "resource name cannot be null or empty");
-        }
-        if (entity.getCount() < 0) {
-            return Result.ofFail(-1, "count should be valid");
-        }
-        if (entity.getGrade() != RuleConstant.FLOW_GRADE_QPS) {
-            return Result.ofFail(-1, "Unknown mode (blockGrade) for parameter flow control");
-        }
-        if (entity.getParamIdx() == null || entity.getParamIdx() < 0) {
-            return Result.ofFail(-1, "paramIdx should be valid");
-        }
-        if (entity.getDurationInSec() <= 0) {
-            return Result.ofFail(-1, "durationInSec should be valid");
-        }
-        if (entity.getControlBehavior() < 0) {
-            return Result.ofFail(-1, "controlBehavior should be valid");
-        }
-        return null;
-    }
-
-    @PutMapping("/rule/{id}")
-    @AuthAction(AuthService.PrivilegeType.WRITE_RULE)
-    public Result<ParamFlowRuleEntity> apiUpdateParamFlowRule(@PathVariable("id") Long id,
-                                                              @RequestBody ParamFlowRuleEntity entity) {
-        if (id == null || id <= 0) {
-            return Result.ofFail(-1, "Invalid id");
-        }
-        ParamFlowRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofFail(-1, "id " + id + " does not exist");
-        }
-
-        Result<ParamFlowRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-        if (!checkIfSupported(entity.getApp(), entity.getIp(), entity.getPort())) {
-            return unsupportedVersion();
-        }
-        entity.setId(id);
-        Date date = new Date();
-        entity.setGmtCreate(oldEntity.getGmtCreate());
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            publishRules(entity.getApp());
-            return Result.ofSuccess(entity);
-        } catch (ExecutionException ex) {
-            logger.error("Error when updating parameter flow rules, id=" + id, ex.getCause());
-            if (isNotSupported(ex.getCause())) {
-                return unsupportedVersion();
-            } else {
-                return Result.ofThrowable(-1, ex.getCause());
-            }
-        } catch (Throwable throwable) {
-            logger.error("Error when updating parameter flow rules, id=" + id, throwable);
-            return Result.ofFail(-1, throwable.getMessage());
-        }
-    }
-
-    @DeleteMapping("/rule/{id}")
-    @AuthAction(PrivilegeType.DELETE_RULE)
-    public Result<Long> apiDeleteRule(@PathVariable("id") Long id) {
-        if (id == null) {
-            return Result.ofFail(-1, "id cannot be null");
-        }
-        ParamFlowRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofSuccess(null);
-        }
-
-        try {
-            repository.delete(id);
-            publishRules(oldEntity.getApp());
-            return Result.ofSuccess(id);
-        } catch (ExecutionException ex) {
-            logger.error("Error when deleting parameter flow rules", ex.getCause());
-            if (isNotSupported(ex.getCause())) {
-                return unsupportedVersion();
-            } else {
-                return Result.ofThrowable(-1, ex.getCause());
-            }
-        } catch (Throwable throwable) {
-            logger.error("Error when deleting parameter flow rules", throwable);
-            return Result.ofFail(-1, throwable.getMessage());
-        }
-    }
-
-    private void publishRules(String app) throws Exception {
-        List<ParamFlowRuleEntity> rules = repository.findAllByApp(app);
-        rulePublisher.publish(app, rules);
-        //延迟加载
-        delayTime();
-    }
-
-    private <R> Result<R> unsupportedVersion() {
-        return Result.ofFail(4041,
-                "Sentinel client not supported for parameter flow control (unsupported version or dependency absent)");
-    }
-
-    private final SentinelVersion version020 = new SentinelVersion().setMinorVersion(2);
-}

+ 0 - 242
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/SystemController.java

@@ -1,242 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.controller;
-
-
-import java.util.Date;
-import java.util.List;
-
-import com.alibaba.csp.sentinel.dashboard.auth.AuthAction;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService.PrivilegeType;
-import com.alibaba.csp.sentinel.dashboard.controller.base.BaseRuleController;
-import com.alibaba.csp.sentinel.dashboard.repository.rule.RuleRepository;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.util.StringUtil;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.SystemRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.domain.Result;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-
-/**
- * 系统规则控制器
- *
- * @author zyf
- * @date 2022-04-13
- */
-@RestController
-@RequestMapping("/system")
-public class SystemController extends BaseRuleController {
-
-    private final Logger logger = LoggerFactory.getLogger(SystemController.class);
-
-    @Autowired
-    private RuleRepository<SystemRuleEntity, Long> repository;
-    @Autowired
-    @Qualifier("systemRuleNacosProvider")
-    private DynamicRuleProvider<List<SystemRuleEntity>> ruleProvider;
-    @Autowired
-    @Qualifier("systemRuleNacosPublisher")
-    private DynamicRulePublisher<List<SystemRuleEntity>> rulePublisher;
-
-    private <R> Result<R> checkBasicParams(String app, String ip, Integer port) {
-        if (StringUtil.isEmpty(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        if (StringUtil.isEmpty(ip)) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        if (port == null) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-        if (port <= 0 || port > 65535) {
-            return Result.ofFail(-1, "port should be in (0, 65535)");
-        }
-        return null;
-    }
-
-    @GetMapping("/rules.json")
-    @AuthAction(PrivilegeType.READ_RULE)
-    public Result<List<SystemRuleEntity>> apiQueryMachineRules(String app, String ip,
-                                                               Integer port) {
-        Result<List<SystemRuleEntity>> checkResult = checkBasicParams(app, ip, port);
-        if (checkResult != null) {
-            return checkResult;
-        }
-        try {
-            List<SystemRuleEntity> rules = ruleProvider.getRules(app);
-            rules = repository.saveAll(rules);
-            return Result.ofSuccess(rules);
-        } catch (Throwable throwable) {
-            logger.error("Query machine system rules error", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-    }
-
-    private int countNotNullAndNotNegative(Number... values) {
-        int notNullCount = 0;
-        for (int i = 0; i < values.length; i++) {
-            if (values[i] != null && values[i].doubleValue() >= 0) {
-                notNullCount++;
-            }
-        }
-        return notNullCount;
-    }
-
-    @RequestMapping("/new.json")
-    @AuthAction(PrivilegeType.WRITE_RULE)
-    public Result<SystemRuleEntity> apiAdd(String app, String ip, Integer port,
-                                           Double highestSystemLoad, Double highestCpuUsage, Long avgRt,
-                                           Long maxThread, Double qps) {
-
-        Result<SystemRuleEntity> checkResult = checkBasicParams(app, ip, port);
-        if (checkResult != null) {
-            return checkResult;
-        }
-
-        int notNullCount = countNotNullAndNotNegative(highestSystemLoad, avgRt, maxThread, qps, highestCpuUsage);
-        if (notNullCount != 1) {
-            return Result.ofFail(-1, "only one of [highestSystemLoad, avgRt, maxThread, qps,highestCpuUsage] "
-                    + "value must be set > 0, but " + notNullCount + " values get");
-        }
-        if (null != highestCpuUsage && highestCpuUsage > 1) {
-            return Result.ofFail(-1, "highestCpuUsage must between [0.0, 1.0]");
-        }
-        SystemRuleEntity entity = new SystemRuleEntity();
-        entity.setApp(app.trim());
-        entity.setIp(ip.trim());
-        entity.setPort(port);
-        // -1 is a fake value
-        if (null != highestSystemLoad) {
-            entity.setHighestSystemLoad(highestSystemLoad);
-        } else {
-            entity.setHighestSystemLoad(-1D);
-        }
-
-        if (null != highestCpuUsage) {
-            entity.setHighestCpuUsage(highestCpuUsage);
-        } else {
-            entity.setHighestCpuUsage(-1D);
-        }
-
-        if (avgRt != null) {
-            entity.setAvgRt(avgRt);
-        } else {
-            entity.setAvgRt(-1L);
-        }
-        if (maxThread != null) {
-            entity.setMaxThread(maxThread);
-        } else {
-            entity.setMaxThread(-1L);
-        }
-        if (qps != null) {
-            entity.setQps(qps);
-        } else {
-            entity.setQps(-1D);
-        }
-        Date date = new Date();
-        entity.setGmtCreate(date);
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            publishRules(app);
-        } catch (Throwable throwable) {
-            logger.error("Add SystemRule error", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @GetMapping("/save.json")
-    @AuthAction(PrivilegeType.WRITE_RULE)
-    public Result<SystemRuleEntity> apiUpdateIfNotNull(Long id, String app, Double highestSystemLoad,
-                                                       Double highestCpuUsage, Long avgRt, Long maxThread, Double qps) {
-        if (id == null) {
-            return Result.ofFail(-1, "id can't be null");
-        }
-        SystemRuleEntity entity = repository.findById(id);
-        if (entity == null) {
-            return Result.ofFail(-1, "id " + id + " dose not exist");
-        }
-
-        if (StringUtil.isNotBlank(app)) {
-            entity.setApp(app.trim());
-        }
-        if (highestSystemLoad != null) {
-            if (highestSystemLoad < 0) {
-                return Result.ofFail(-1, "highestSystemLoad must >= 0");
-            }
-            entity.setHighestSystemLoad(highestSystemLoad);
-        }
-        if (highestCpuUsage != null) {
-            if (highestCpuUsage < 0) {
-                return Result.ofFail(-1, "highestCpuUsage must >= 0");
-            }
-            if (highestCpuUsage > 1) {
-                return Result.ofFail(-1, "highestCpuUsage must <= 1");
-            }
-            entity.setHighestCpuUsage(highestCpuUsage);
-        }
-        if (avgRt != null) {
-            if (avgRt < 0) {
-                return Result.ofFail(-1, "avgRt must >= 0");
-            }
-            entity.setAvgRt(avgRt);
-        }
-        if (maxThread != null) {
-            if (maxThread < 0) {
-                return Result.ofFail(-1, "maxThread must >= 0");
-            }
-            entity.setMaxThread(maxThread);
-        }
-        if (qps != null) {
-            if (qps < 0) {
-                return Result.ofFail(-1, "qps must >= 0");
-            }
-            entity.setQps(qps);
-        }
-        Date date = new Date();
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            publishRules(entity.getApp());
-        } catch (Throwable throwable) {
-            logger.error("save error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @RequestMapping("/delete.json")
-    @AuthAction(PrivilegeType.DELETE_RULE)
-    public Result<?> delete(Long id) {
-        if (id == null) {
-            return Result.ofFail(-1, "id can't be null");
-        }
-        SystemRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofSuccess(null);
-        }
-        try {
-            repository.delete(id);
-            publishRules(oldEntity.getApp());
-        } catch (Throwable throwable) {
-            logger.error("delete error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(id);
-    }
-
-    private void publishRules(String app) throws Exception {
-        List<SystemRuleEntity> rules = repository.findAllByApp(app);
-        rulePublisher.publish(app, rules);
-        //延迟加载
-        delayTime();
-    }
-}

+ 0 - 26
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/base/BaseRuleController.java

@@ -1,26 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.controller.base;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * Nacos持久化通用处理类
- *
- * @author zyf
- * @date 2022-04-13
- */
-public class BaseRuleController {
-    /**
-     * 延迟一下
-     *
-     * 解释:列表加载数据的时候,Nacos持久化还没做完,导致加载数据不对
-     */
-    public static void delayTime(){
-        try {
-            TimeUnit.MILLISECONDS.sleep(100);
-            System.out.println("-------------睡100毫秒-----------");
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-}

+ 0 - 260
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/gateway/GatewayApiController.java

@@ -1,260 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.controller.gateway;
-
-import com.alibaba.csp.sentinel.dashboard.auth.AuthAction;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService;
-import com.alibaba.csp.sentinel.dashboard.controller.base.BaseRuleController;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.ApiDefinitionEntity;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.ApiPredicateItemEntity;
-import com.alibaba.csp.sentinel.dashboard.discovery.MachineInfo;
-import com.alibaba.csp.sentinel.dashboard.domain.Result;
-import com.alibaba.csp.sentinel.dashboard.domain.vo.gateway.api.AddApiReqVo;
-import com.alibaba.csp.sentinel.dashboard.domain.vo.gateway.api.ApiPredicateItemVo;
-import com.alibaba.csp.sentinel.dashboard.domain.vo.gateway.api.UpdateApiReqVo;
-import com.alibaba.csp.sentinel.dashboard.repository.gateway.InMemApiDefinitionStore;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.util.CollectionUtils;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.*;
-
-import static com.alibaba.csp.sentinel.adapter.gateway.common.SentinelGatewayConstants.*;
-
-/**
- * 网关API规则控制器
- *
- * @author zyf
- * @date 2022-04-13
- */
-@RestController
-@RequestMapping(value = "/gateway/api")
-public class GatewayApiController extends BaseRuleController {
-
-    private final Logger logger = LoggerFactory.getLogger(GatewayApiController.class);
-
-    @Autowired
-    private InMemApiDefinitionStore repository;
-
-
-    @Autowired
-    @Qualifier("gateWayApiNacosProvider")
-    private DynamicRuleProvider<List<ApiDefinitionEntity>> apiProvider;
-
-    @Autowired
-    @Qualifier("gateWayApiNacosPublisher")
-    private DynamicRulePublisher<List<ApiDefinitionEntity>> apiPublisher;
-
-    @GetMapping("/list.json")
-    @AuthAction(AuthService.PrivilegeType.READ_RULE)
-    public Result<List<ApiDefinitionEntity>> queryApis(String app, String ip, Integer port) {
-        if (StringUtil.isEmpty(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        if (StringUtil.isEmpty(ip)) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        if (port == null) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-
-        try {
-            List<ApiDefinitionEntity> apis = apiProvider.getRules(app);
-            repository.saveAll(apis);
-            return Result.ofSuccess(apis);
-        } catch (Throwable throwable) {
-            logger.error("queryApis error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-    }
-
-    @PostMapping("/new.json")
-    @AuthAction(AuthService.PrivilegeType.WRITE_RULE)
-    public Result<ApiDefinitionEntity> addApi(HttpServletRequest request, @RequestBody AddApiReqVo reqVo) {
-
-        String app = reqVo.getApp();
-        if (StringUtil.isBlank(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-
-        ApiDefinitionEntity entity = new ApiDefinitionEntity();
-        entity.setApp(app.trim());
-
-        String ip = reqVo.getIp();
-        if (StringUtil.isBlank(ip)) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        entity.setIp(ip.trim());
-
-        Integer port = reqVo.getPort();
-        if (port == null) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-        entity.setPort(port);
-
-        // API名称
-        String apiName = reqVo.getApiName();
-        if (StringUtil.isBlank(apiName)) {
-            return Result.ofFail(-1, "apiName can't be null or empty");
-        }
-        entity.setApiName(apiName.trim());
-
-        // 匹配规则列表
-        List<ApiPredicateItemVo> predicateItems = reqVo.getPredicateItems();
-        if (CollectionUtils.isEmpty(predicateItems)) {
-            return Result.ofFail(-1, "predicateItems can't empty");
-        }
-
-        List<ApiPredicateItemEntity> predicateItemEntities = new ArrayList<>();
-        for (ApiPredicateItemVo predicateItem : predicateItems) {
-            ApiPredicateItemEntity predicateItemEntity = new ApiPredicateItemEntity();
-
-            // 匹配模式
-            Integer matchStrategy = predicateItem.getMatchStrategy();
-            if (!Arrays.asList(URL_MATCH_STRATEGY_EXACT, URL_MATCH_STRATEGY_PREFIX, URL_MATCH_STRATEGY_REGEX).contains(matchStrategy)) {
-                return Result.ofFail(-1, "invalid matchStrategy: " + matchStrategy);
-            }
-            predicateItemEntity.setMatchStrategy(matchStrategy);
-
-            // 匹配串
-            String pattern = predicateItem.getPattern();
-            if (StringUtil.isBlank(pattern)) {
-                return Result.ofFail(-1, "pattern can't be null or empty");
-            }
-            predicateItemEntity.setPattern(pattern);
-
-            predicateItemEntities.add(predicateItemEntity);
-        }
-        entity.setPredicateItems(new LinkedHashSet<>(predicateItemEntities));
-
-        // 检查API名称不能重复
-        List<ApiDefinitionEntity> allApis = repository.findAllByMachine(MachineInfo.of(app.trim(), ip.trim(), port));
-        if (allApis.stream().map(o -> o.getApiName()).anyMatch(o -> o.equals(apiName.trim()))) {
-            return Result.ofFail(-1, "apiName exists: " + apiName);
-        }
-
-        Date date = new Date();
-        entity.setGmtCreate(date);
-        entity.setGmtModified(date);
-
-        try {
-            entity = repository.save(entity);
-        } catch (Throwable throwable) {
-            logger.error("add gateway api error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-
-        if (!publishApis(app, ip, port)) {
-            logger.warn("publish gateway apis fail after add");
-        }
-
-        return Result.ofSuccess(entity);
-    }
-
-    @PostMapping("/save.json")
-    @AuthAction(AuthService.PrivilegeType.WRITE_RULE)
-    public Result<ApiDefinitionEntity> updateApi(@RequestBody UpdateApiReqVo reqVo) {
-        String app = reqVo.getApp();
-        if (StringUtil.isBlank(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-
-        Long id = reqVo.getId();
-        if (id == null) {
-            return Result.ofFail(-1, "id can't be null");
-        }
-
-        ApiDefinitionEntity entity = repository.findById(id);
-        if (entity == null) {
-            return Result.ofFail(-1, "api does not exist, id=" + id);
-        }
-
-        // 匹配规则列表
-        List<ApiPredicateItemVo> predicateItems = reqVo.getPredicateItems();
-        if (CollectionUtils.isEmpty(predicateItems)) {
-            return Result.ofFail(-1, "predicateItems can't empty");
-        }
-
-        List<ApiPredicateItemEntity> predicateItemEntities = new ArrayList<>();
-        for (ApiPredicateItemVo predicateItem : predicateItems) {
-            ApiPredicateItemEntity predicateItemEntity = new ApiPredicateItemEntity();
-
-            // 匹配模式
-            int matchStrategy = predicateItem.getMatchStrategy();
-            if (!Arrays.asList(URL_MATCH_STRATEGY_EXACT, URL_MATCH_STRATEGY_PREFIX, URL_MATCH_STRATEGY_REGEX).contains(matchStrategy)) {
-                return Result.ofFail(-1, "Invalid matchStrategy: " + matchStrategy);
-            }
-            predicateItemEntity.setMatchStrategy(matchStrategy);
-
-            // 匹配串
-            String pattern = predicateItem.getPattern();
-            if (StringUtil.isBlank(pattern)) {
-                return Result.ofFail(-1, "pattern can't be null or empty");
-            }
-            predicateItemEntity.setPattern(pattern);
-
-            predicateItemEntities.add(predicateItemEntity);
-        }
-        entity.setPredicateItems(new LinkedHashSet<>(predicateItemEntities));
-
-        Date date = new Date();
-        entity.setGmtModified(date);
-
-        try {
-            entity = repository.save(entity);
-        } catch (Throwable throwable) {
-            logger.error("update gateway api error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-
-        if (!publishApis(app, entity.getIp(), entity.getPort())) {
-            logger.warn("publish gateway apis fail after update");
-        }
-
-        return Result.ofSuccess(entity);
-    }
-
-    @PostMapping("/delete.json")
-    @AuthAction(AuthService.PrivilegeType.DELETE_RULE)
-    public Result<Long> deleteApi(Long id) {
-        if (id == null) {
-            return Result.ofFail(-1, "id can't be null");
-        }
-
-        ApiDefinitionEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofSuccess(null);
-        }
-
-        try {
-            repository.delete(id);
-        } catch (Throwable throwable) {
-            logger.error("delete gateway api error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-
-        if (!publishApis(oldEntity.getApp(), oldEntity.getIp(), oldEntity.getPort())) {
-            logger.warn("publish gateway apis fail after delete");
-        }
-        return Result.ofSuccess(id);
-    }
-
-    private boolean publishApis(String app, String ip, Integer port) {
-        List<ApiDefinitionEntity> apis = repository.findAllByApp(app);
-        try {
-            apiPublisher.publish(app, apis);
-            //延迟加载
-            delayTime();
-            return true;
-        } catch (Exception e) {
-            logger.error("publish api error!");
-            e.printStackTrace();
-            return false;
-        }
-    }
-}

+ 0 - 431
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/gateway/GatewayFlowRuleController.java

@@ -1,431 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.controller.gateway;
-
-import com.alibaba.csp.sentinel.dashboard.auth.AuthAction;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService;
-import com.alibaba.csp.sentinel.dashboard.controller.base.BaseRuleController;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.GatewayFlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.GatewayParamFlowItemEntity;
-import com.alibaba.csp.sentinel.dashboard.domain.Result;
-import com.alibaba.csp.sentinel.dashboard.domain.vo.gateway.rule.AddFlowRuleReqVo;
-import com.alibaba.csp.sentinel.dashboard.domain.vo.gateway.rule.GatewayParamFlowItemVo;
-import com.alibaba.csp.sentinel.dashboard.domain.vo.gateway.rule.UpdateFlowRuleReqVo;
-import com.alibaba.csp.sentinel.dashboard.repository.gateway.InMemGatewayFlowRuleStore;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-
-import static com.alibaba.csp.sentinel.slots.block.RuleConstant.*;
-import static com.alibaba.csp.sentinel.adapter.gateway.common.SentinelGatewayConstants.*;
-import static com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.GatewayFlowRuleEntity.*;
-
-/**
- * 网关限流规则控制器
- *
- * @author zyf
- * @date 2022-04-13
- */
-@RestController
-@RequestMapping(value = "/gateway/flow")
-public class GatewayFlowRuleController extends BaseRuleController {
-
-    private final Logger logger = LoggerFactory.getLogger(GatewayFlowRuleController.class);
-
-    @Autowired
-    private InMemGatewayFlowRuleStore repository;
-
-    @Autowired
-    @Qualifier("gateWayFlowRulesNacosProvider")
-    private DynamicRuleProvider<List<GatewayFlowRuleEntity>> ruleProvider;
-
-    @Autowired
-    @Qualifier("gateWayFlowRulesNacosPublisher")
-    private DynamicRulePublisher<List<GatewayFlowRuleEntity>> rulePublisher;
-
-    @GetMapping("/list.json")
-    @AuthAction(AuthService.PrivilegeType.READ_RULE)
-    public Result<List<GatewayFlowRuleEntity>> queryFlowRules(String app, String ip, Integer port) {
-
-        if (StringUtil.isEmpty(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        if (StringUtil.isEmpty(ip)) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        if (port == null) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-
-        try {
-            List<GatewayFlowRuleEntity> rules = ruleProvider.getRules(app);
-            repository.saveAll(rules);
-            return Result.ofSuccess(rules);
-        } catch (Throwable throwable) {
-            logger.error("query gateway flow rules error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-    }
-
-    @PostMapping("/new.json")
-    @AuthAction(AuthService.PrivilegeType.WRITE_RULE)
-    public Result<GatewayFlowRuleEntity> addFlowRule(@RequestBody AddFlowRuleReqVo reqVo) {
-
-        String app = reqVo.getApp();
-        if (StringUtil.isBlank(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-
-        GatewayFlowRuleEntity entity = new GatewayFlowRuleEntity();
-        entity.setApp(app.trim());
-
-        String ip = reqVo.getIp();
-        if (StringUtil.isBlank(ip)) {
-            return Result.ofFail(-1, "ip can't be null or empty");
-        }
-        entity.setIp(ip.trim());
-
-        Integer port = reqVo.getPort();
-        if (port == null) {
-            return Result.ofFail(-1, "port can't be null");
-        }
-        entity.setPort(port);
-
-        // API类型, Route ID或API分组
-        Integer resourceMode = reqVo.getResourceMode();
-        if (resourceMode == null) {
-            return Result.ofFail(-1, "resourceMode can't be null");
-        }
-        if (!Arrays.asList(RESOURCE_MODE_ROUTE_ID, RESOURCE_MODE_CUSTOM_API_NAME).contains(resourceMode)) {
-            return Result.ofFail(-1, "invalid resourceMode: " + resourceMode);
-        }
-        entity.setResourceMode(resourceMode);
-
-        // API名称
-        String resource = reqVo.getResource();
-        if (StringUtil.isBlank(resource)) {
-            return Result.ofFail(-1, "resource can't be null or empty");
-        }
-        entity.setResource(resource.trim());
-
-        // 针对请求属性
-        GatewayParamFlowItemVo paramItem = reqVo.getParamItem();
-        if (paramItem != null) {
-            GatewayParamFlowItemEntity itemEntity = new GatewayParamFlowItemEntity();
-            entity.setParamItem(itemEntity);
-
-            // 参数属性 0-ClientIP 1-Remote Host 2-Header 3-URL参数 4-Cookie
-            Integer parseStrategy = paramItem.getParseStrategy();
-            if (!Arrays.asList(PARAM_PARSE_STRATEGY_CLIENT_IP, PARAM_PARSE_STRATEGY_HOST, PARAM_PARSE_STRATEGY_HEADER
-                    , PARAM_PARSE_STRATEGY_URL_PARAM, PARAM_PARSE_STRATEGY_COOKIE).contains(parseStrategy)) {
-                return Result.ofFail(-1, "invalid parseStrategy: " + parseStrategy);
-            }
-            itemEntity.setParseStrategy(paramItem.getParseStrategy());
-
-            // 当参数属性为2-Header 3-URL参数 4-Cookie时,参数名称必填
-            if (Arrays.asList(PARAM_PARSE_STRATEGY_HEADER, PARAM_PARSE_STRATEGY_URL_PARAM, PARAM_PARSE_STRATEGY_COOKIE).contains(parseStrategy)) {
-                // 参数名称
-                String fieldName = paramItem.getFieldName();
-                if (StringUtil.isBlank(fieldName)) {
-                    return Result.ofFail(-1, "fieldName can't be null or empty");
-                }
-                itemEntity.setFieldName(paramItem.getFieldName());
-            }
-
-            String pattern = paramItem.getPattern();
-            // 如果匹配串不为空,验证匹配模式
-            if (StringUtil.isNotEmpty(pattern)) {
-                itemEntity.setPattern(pattern);
-                Integer matchStrategy = paramItem.getMatchStrategy();
-                if (!Arrays.asList(PARAM_MATCH_STRATEGY_EXACT, PARAM_MATCH_STRATEGY_CONTAINS, PARAM_MATCH_STRATEGY_REGEX).contains(matchStrategy)) {
-                    return Result.ofFail(-1, "invalid matchStrategy: " + matchStrategy);
-                }
-                itemEntity.setMatchStrategy(matchStrategy);
-            }
-        }
-
-        // 阈值类型 0-线程数 1-QPS
-        Integer grade = reqVo.getGrade();
-        if (grade == null) {
-            return Result.ofFail(-1, "grade can't be null");
-        }
-        if (!Arrays.asList(FLOW_GRADE_THREAD, FLOW_GRADE_QPS).contains(grade)) {
-            return Result.ofFail(-1, "invalid grade: " + grade);
-        }
-        entity.setGrade(grade);
-
-        // QPS阈值
-        Double count = reqVo.getCount();
-        if (count == null) {
-            return Result.ofFail(-1, "count can't be null");
-        }
-        if (count < 0) {
-            return Result.ofFail(-1, "count should be at lease zero");
-        }
-        entity.setCount(count);
-
-        // 间隔
-        Long interval = reqVo.getInterval();
-        if (interval == null) {
-            return Result.ofFail(-1, "interval can't be null");
-        }
-        if (interval <= 0) {
-            return Result.ofFail(-1, "interval should be greater than zero");
-        }
-        entity.setInterval(interval);
-
-        // 间隔单位
-        Integer intervalUnit = reqVo.getIntervalUnit();
-        if (intervalUnit == null) {
-            return Result.ofFail(-1, "intervalUnit can't be null");
-        }
-        if (!Arrays.asList(INTERVAL_UNIT_SECOND, INTERVAL_UNIT_MINUTE, INTERVAL_UNIT_HOUR, INTERVAL_UNIT_DAY).contains(intervalUnit)) {
-            return Result.ofFail(-1, "Invalid intervalUnit: " + intervalUnit);
-        }
-        entity.setIntervalUnit(intervalUnit);
-
-        // 流控方式 0-快速失败 2-匀速排队
-        Integer controlBehavior = reqVo.getControlBehavior();
-        if (controlBehavior == null) {
-            return Result.ofFail(-1, "controlBehavior can't be null");
-        }
-        if (!Arrays.asList(CONTROL_BEHAVIOR_DEFAULT, CONTROL_BEHAVIOR_RATE_LIMITER).contains(controlBehavior)) {
-            return Result.ofFail(-1, "invalid controlBehavior: " + controlBehavior);
-        }
-        entity.setControlBehavior(controlBehavior);
-
-        if (CONTROL_BEHAVIOR_DEFAULT == controlBehavior) {
-            // 0-快速失败, 则Burst size必填
-            Integer burst = reqVo.getBurst();
-            if (burst == null) {
-                return Result.ofFail(-1, "burst can't be null");
-            }
-            if (burst < 0) {
-                return Result.ofFail(-1, "invalid burst: " + burst);
-            }
-            entity.setBurst(burst);
-        } else if (CONTROL_BEHAVIOR_RATE_LIMITER == controlBehavior) {
-            // 1-匀速排队, 则超时时间必填
-            Integer maxQueueingTimeoutMs = reqVo.getMaxQueueingTimeoutMs();
-            if (maxQueueingTimeoutMs == null) {
-                return Result.ofFail(-1, "maxQueueingTimeoutMs can't be null");
-            }
-            if (maxQueueingTimeoutMs < 0) {
-                return Result.ofFail(-1, "invalid maxQueueingTimeoutMs: " + maxQueueingTimeoutMs);
-            }
-            entity.setMaxQueueingTimeoutMs(maxQueueingTimeoutMs);
-        }
-
-        Date date = new Date();
-        entity.setGmtCreate(date);
-        entity.setGmtModified(date);
-
-        try {
-            entity = repository.save(entity);
-        } catch (Throwable throwable) {
-            logger.error("add gateway flow rule error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-
-        if (!publishRules(app, ip, port)) {
-            logger.warn("publish gateway flow rules fail after add");
-        }
-
-        return Result.ofSuccess(entity);
-    }
-
-    @PostMapping("/save.json")
-    @AuthAction(AuthService.PrivilegeType.WRITE_RULE)
-    public Result<GatewayFlowRuleEntity> updateFlowRule(@RequestBody UpdateFlowRuleReqVo reqVo) {
-
-        String app = reqVo.getApp();
-        if (StringUtil.isBlank(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-
-        Long id = reqVo.getId();
-        if (id == null) {
-            return Result.ofFail(-1, "id can't be null");
-        }
-
-        GatewayFlowRuleEntity entity = repository.findById(id);
-        if (entity == null) {
-            return Result.ofFail(-1, "gateway flow rule does not exist, id=" + id);
-        }
-
-        // 针对请求属性
-        GatewayParamFlowItemVo paramItem = reqVo.getParamItem();
-        if (paramItem != null) {
-            GatewayParamFlowItemEntity itemEntity = new GatewayParamFlowItemEntity();
-            entity.setParamItem(itemEntity);
-
-            // 参数属性 0-ClientIP 1-Remote Host 2-Header 3-URL参数 4-Cookie
-            Integer parseStrategy = paramItem.getParseStrategy();
-            if (!Arrays.asList(PARAM_PARSE_STRATEGY_CLIENT_IP, PARAM_PARSE_STRATEGY_HOST, PARAM_PARSE_STRATEGY_HEADER
-                    , PARAM_PARSE_STRATEGY_URL_PARAM, PARAM_PARSE_STRATEGY_COOKIE).contains(parseStrategy)) {
-                return Result.ofFail(-1, "invalid parseStrategy: " + parseStrategy);
-            }
-            itemEntity.setParseStrategy(paramItem.getParseStrategy());
-
-            // 当参数属性为2-Header 3-URL参数 4-Cookie时,参数名称必填
-            if (Arrays.asList(PARAM_PARSE_STRATEGY_HEADER, PARAM_PARSE_STRATEGY_URL_PARAM, PARAM_PARSE_STRATEGY_COOKIE).contains(parseStrategy)) {
-                // 参数名称
-                String fieldName = paramItem.getFieldName();
-                if (StringUtil.isBlank(fieldName)) {
-                    return Result.ofFail(-1, "fieldName can't be null or empty");
-                }
-                itemEntity.setFieldName(paramItem.getFieldName());
-            }
-
-            String pattern = paramItem.getPattern();
-            // 如果匹配串不为空,验证匹配模式
-            if (StringUtil.isNotEmpty(pattern)) {
-                itemEntity.setPattern(pattern);
-                Integer matchStrategy = paramItem.getMatchStrategy();
-                if (!Arrays.asList(PARAM_MATCH_STRATEGY_EXACT, PARAM_MATCH_STRATEGY_CONTAINS, PARAM_MATCH_STRATEGY_REGEX).contains(matchStrategy)) {
-                    return Result.ofFail(-1, "invalid matchStrategy: " + matchStrategy);
-                }
-                itemEntity.setMatchStrategy(matchStrategy);
-            }
-        } else {
-            entity.setParamItem(null);
-        }
-
-        // 阈值类型 0-线程数 1-QPS
-        Integer grade = reqVo.getGrade();
-        if (grade == null) {
-            return Result.ofFail(-1, "grade can't be null");
-        }
-        if (!Arrays.asList(FLOW_GRADE_THREAD, FLOW_GRADE_QPS).contains(grade)) {
-            return Result.ofFail(-1, "invalid grade: " + grade);
-        }
-        entity.setGrade(grade);
-
-        // QPS阈值
-        Double count = reqVo.getCount();
-        if (count == null) {
-            return Result.ofFail(-1, "count can't be null");
-        }
-        if (count < 0) {
-            return Result.ofFail(-1, "count should be at lease zero");
-        }
-        entity.setCount(count);
-
-        // 间隔
-        Long interval = reqVo.getInterval();
-        if (interval == null) {
-            return Result.ofFail(-1, "interval can't be null");
-        }
-        if (interval <= 0) {
-            return Result.ofFail(-1, "interval should be greater than zero");
-        }
-        entity.setInterval(interval);
-
-        // 间隔单位
-        Integer intervalUnit = reqVo.getIntervalUnit();
-        if (intervalUnit == null) {
-            return Result.ofFail(-1, "intervalUnit can't be null");
-        }
-        if (!Arrays.asList(INTERVAL_UNIT_SECOND, INTERVAL_UNIT_MINUTE, INTERVAL_UNIT_HOUR, INTERVAL_UNIT_DAY).contains(intervalUnit)) {
-            return Result.ofFail(-1, "Invalid intervalUnit: " + intervalUnit);
-        }
-        entity.setIntervalUnit(intervalUnit);
-
-        // 流控方式 0-快速失败 2-匀速排队
-        Integer controlBehavior = reqVo.getControlBehavior();
-        if (controlBehavior == null) {
-            return Result.ofFail(-1, "controlBehavior can't be null");
-        }
-        if (!Arrays.asList(CONTROL_BEHAVIOR_DEFAULT, CONTROL_BEHAVIOR_RATE_LIMITER).contains(controlBehavior)) {
-            return Result.ofFail(-1, "invalid controlBehavior: " + controlBehavior);
-        }
-        entity.setControlBehavior(controlBehavior);
-
-        if (CONTROL_BEHAVIOR_DEFAULT == controlBehavior) {
-            // 0-快速失败, 则Burst size必填
-            Integer burst = reqVo.getBurst();
-            if (burst == null) {
-                return Result.ofFail(-1, "burst can't be null");
-            }
-            if (burst < 0) {
-                return Result.ofFail(-1, "invalid burst: " + burst);
-            }
-            entity.setBurst(burst);
-        } else if (CONTROL_BEHAVIOR_RATE_LIMITER == controlBehavior) {
-            // 2-匀速排队, 则超时时间必填
-            Integer maxQueueingTimeoutMs = reqVo.getMaxQueueingTimeoutMs();
-            if (maxQueueingTimeoutMs == null) {
-                return Result.ofFail(-1, "maxQueueingTimeoutMs can't be null");
-            }
-            if (maxQueueingTimeoutMs < 0) {
-                return Result.ofFail(-1, "invalid maxQueueingTimeoutMs: " + maxQueueingTimeoutMs);
-            }
-            entity.setMaxQueueingTimeoutMs(maxQueueingTimeoutMs);
-        }
-
-        Date date = new Date();
-        entity.setGmtModified(date);
-
-        try {
-            entity = repository.save(entity);
-        } catch (Throwable throwable) {
-            logger.error("update gateway flow rule error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-
-        if (!publishRules(app, entity.getIp(), entity.getPort())) {
-            logger.warn("publish gateway flow rules fail after update");
-        }
-
-        return Result.ofSuccess(entity);
-    }
-
-
-    @PostMapping("/delete.json")
-    @AuthAction(AuthService.PrivilegeType.DELETE_RULE)
-    public Result<Long> deleteFlowRule(Long id) {
-
-        if (id == null) {
-            return Result.ofFail(-1, "id can't be null");
-        }
-
-        GatewayFlowRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofSuccess(null);
-        }
-
-        try {
-            repository.delete(id);
-        } catch (Throwable throwable) {
-            logger.error("delete gateway flow rule error:", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-
-        if (!publishRules(oldEntity.getApp(), oldEntity.getIp(), oldEntity.getPort())) {
-            logger.warn("publish gateway flow rules fail after delete");
-        }
-
-        return Result.ofSuccess(id);
-    }
-
-    private boolean publishRules(String app, String ip, Integer port) {
-        List<GatewayFlowRuleEntity> rules = repository.findAllByApp(app);
-        try {
-            rulePublisher.publish(app, rules);
-            //延迟加载
-            delayTime();
-            return true;
-        } catch (Exception e) {
-            logger.error("publish rules error!");
-            e.printStackTrace();
-            return false;
-        }
-    }
-}

+ 0 - 230
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/v2/FlowControllerV2.java

@@ -1,230 +0,0 @@
-/*
- * Copyright 1999-2018 Alibaba Group Holding Ltd.
- *
- * 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.
- */
-package com.alibaba.csp.sentinel.dashboard.controller.v2;
-
-import java.util.Date;
-import java.util.List;
-
-import com.alibaba.csp.sentinel.dashboard.auth.AuthAction;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService;
-import com.alibaba.csp.sentinel.dashboard.auth.AuthService.PrivilegeType;
-import com.alibaba.csp.sentinel.dashboard.controller.base.BaseRuleController;
-import com.alibaba.csp.sentinel.util.StringUtil;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.FlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.repository.rule.InMemoryRuleRepositoryAdapter;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.dashboard.domain.Result;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.util.ObjectUtils;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-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;
-
-/**
- * 流控规则控制器
- *
- * @author zyf
- * @date 2022-04-13
- */
-@RestController
-@RequestMapping(value = "/v2/flow")
-public class FlowControllerV2 extends BaseRuleController {
-
-    private final Logger logger = LoggerFactory.getLogger(FlowControllerV2.class);
-
-    @Autowired
-    private InMemoryRuleRepositoryAdapter<FlowRuleEntity> repository;
-
-    @Autowired
-    @Qualifier("flowRuleNacosProvider")
-    private DynamicRuleProvider<List<FlowRuleEntity>> ruleProvider;
-    @Autowired
-    @Qualifier("flowRuleNacosPublisher")
-    private DynamicRulePublisher<List<FlowRuleEntity>> rulePublisher;
-
-    @GetMapping("/rules")
-    @AuthAction(PrivilegeType.READ_RULE)
-    public Result<List<FlowRuleEntity>> apiQueryMachineRules(@RequestParam String app) {
-
-        if (StringUtil.isEmpty(app)) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        try {
-            List<FlowRuleEntity> rules = ruleProvider.getRules(app);
-            if (rules != null && !rules.isEmpty()) {
-                for (FlowRuleEntity entity : rules) {
-                    entity.setApp(app);
-                    if (entity.getClusterConfig() != null && entity.getClusterConfig().getFlowId() != null) {
-                        entity.setId(entity.getClusterConfig().getFlowId());
-                    }
-                }
-            }
-            rules = repository.saveAll(rules);
-            return Result.ofSuccess(rules);
-        } catch (Throwable throwable) {
-            logger.error("Error when querying flow rules", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-    }
-
-    private <R> Result<R> checkEntityInternal(FlowRuleEntity entity) {
-        if (entity == null) {
-            return Result.ofFail(-1, "invalid body");
-        }
-        if (StringUtil.isBlank(entity.getApp())) {
-            return Result.ofFail(-1, "app can't be null or empty");
-        }
-        if (StringUtil.isBlank(entity.getLimitApp())) {
-            return Result.ofFail(-1, "limitApp can't be null or empty");
-        }
-        if (StringUtil.isBlank(entity.getResource())) {
-            return Result.ofFail(-1, "resource can't be null or empty");
-        }
-        if (entity.getGrade() == null) {
-            return Result.ofFail(-1, "grade can't be null");
-        }
-        if (entity.getGrade() != 0 && entity.getGrade() != 1) {
-            return Result.ofFail(-1, "grade must be 0 or 1, but " + entity.getGrade() + " got");
-        }
-        if (entity.getCount() == null || entity.getCount() < 0) {
-            return Result.ofFail(-1, "count should be at lease zero");
-        }
-        if (entity.getStrategy() == null) {
-            return Result.ofFail(-1, "strategy can't be null");
-        }
-        if (entity.getStrategy() != 0 && StringUtil.isBlank(entity.getRefResource())) {
-            return Result.ofFail(-1, "refResource can't be null or empty when strategy!=0");
-        }
-        if (entity.getControlBehavior() == null) {
-            return Result.ofFail(-1, "controlBehavior can't be null");
-        }
-        int controlBehavior = entity.getControlBehavior();
-        if (controlBehavior == 1 && entity.getWarmUpPeriodSec() == null) {
-            return Result.ofFail(-1, "warmUpPeriodSec can't be null when controlBehavior==1");
-        }
-        if (controlBehavior == 2 && entity.getMaxQueueingTimeMs() == null) {
-            return Result.ofFail(-1, "maxQueueingTimeMs can't be null when controlBehavior==2");
-        }
-        if (entity.isClusterMode() && entity.getClusterConfig() == null) {
-            return Result.ofFail(-1, "cluster config should be valid");
-        }
-        return null;
-    }
-
-    @PostMapping("/rule")
-    @AuthAction(value = AuthService.PrivilegeType.WRITE_RULE)
-    public Result<FlowRuleEntity> apiAddFlowRule(@RequestBody FlowRuleEntity entity) {
-
-        Result<FlowRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-        entity.setId(null);
-        Date date = new Date();
-        entity.setGmtCreate(date);
-        entity.setGmtModified(date);
-        entity.setLimitApp(entity.getLimitApp().trim());
-        entity.setResource(entity.getResource().trim());
-        try {
-            entity = repository.save(entity);
-            publishRules(entity.getApp());
-        } catch (Throwable throwable) {
-            logger.error("Failed to add flow rule", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @PutMapping("/rule/{id}")
-    @AuthAction(AuthService.PrivilegeType.WRITE_RULE)
-
-    public Result<FlowRuleEntity> apiUpdateFlowRule(@PathVariable("id") Long id,
-                                                    @RequestBody FlowRuleEntity entity) {
-        if (id == null || id <= 0) {
-            return Result.ofFail(-1, "Invalid id");
-        }
-        FlowRuleEntity oldEntity = repository.findById(id);
-        if (oldEntity == null) {
-            return Result.ofFail(-1, "id " + id + " does not exist");
-        }
-        if (entity == null) {
-            return Result.ofFail(-1, "invalid body");
-        }
-
-        entity.setApp(oldEntity.getApp());
-        entity.setIp(oldEntity.getIp());
-        entity.setPort(oldEntity.getPort());
-        Result<FlowRuleEntity> checkResult = checkEntityInternal(entity);
-        if (checkResult != null) {
-            return checkResult;
-        }
-
-        entity.setId(id);
-        Date date = new Date();
-        entity.setGmtCreate(oldEntity.getGmtCreate());
-        entity.setGmtModified(date);
-        try {
-            entity = repository.save(entity);
-            if (entity == null) {
-                return Result.ofFail(-1, "save entity fail");
-            }
-            publishRules(oldEntity.getApp());
-        } catch (Throwable throwable) {
-            logger.error("Failed to update flow rule", throwable);
-            return Result.ofThrowable(-1, throwable);
-        }
-        return Result.ofSuccess(entity);
-    }
-
-    @DeleteMapping("/rule/{id}")
-    @AuthAction(PrivilegeType.DELETE_RULE)
-    public Result<Long> apiDeleteRule(@PathVariable("id") Long id) {
-        if (id == null || id <= 0) {
-            return Result.ofFail(-1, "Invalid id");
-        }
-        FlowRuleEntity oldEntity = repository.findById(id);
-        if (ObjectUtils.isEmpty(oldEntity)) {
-            return Result.ofSuccess(null);
-        }
-
-        try {
-            repository.delete(id);
-            publishRules(oldEntity.getApp());
-        } catch (Exception e) {
-            return Result.ofFail(-1, e.getMessage());
-        }
-        return Result.ofSuccess(id);
-    }
-
-    private void publishRules(/*@NonNull*/ String app) throws Exception {
-        List<FlowRuleEntity> rules = repository.findAllByApp(app);
-        rulePublisher.publish(app, rules);
-        //延迟加载
-        delayTime();
-    }
-}

+ 0 - 32
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/NacosConfigProperties.java

@@ -1,32 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos;
-
-/**
- * @Description: nacos配置
- * @author: zyf
- * @date: 2022/03/01$
- * @version: V1.0
- */
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-@Component
-@ConfigurationProperties(prefix = "nacos.server")
-@Data
-public class NacosConfigProperties {
-
-    private String ip;
-
-    private String namespace;
-
-    private String username;
-
-    private String password;
-
-    private String groupId;
-
-    public String getServerAddr() {
-        return this.getIp();
-    }
-
-}

+ 0 - 165
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/SentinelConfig.java

@@ -1,165 +0,0 @@
-/*
- * Copyright 1999-2018 Alibaba Group Holding Ltd.
- *
- * 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.
- */
-package com.alibaba.csp.sentinel.dashboard.rule.nacos;
-
-import java.util.List;
-import java.util.Properties;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.ApiDefinitionEntity;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.GatewayFlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.*;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.AuthorityRuleCorrectEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.ParamFlowRuleCorrectEntity;
-import com.alibaba.nacos.api.PropertyKeyConst;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.nacos.api.config.ConfigFactory;
-import com.alibaba.nacos.api.config.ConfigService;
-
-/**
- *  sentinel配置类
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Configuration
-public class SentinelConfig {
-
-    @Autowired
-    private NacosConfigProperties nacosConfigProperties;
-
-
-    /**
-     * 流控规则
-     * @return
-     */
-    @Bean
-    public Converter<List<FlowRuleEntity>, String> flowRuleEntityEncoder() {
-        return JSON::toJSONString;
-    }
-
-    @Bean
-    public Converter<String, List<FlowRuleEntity>> flowRuleEntityDecoder() {
-        return s -> JSON.parseArray(s, FlowRuleEntity.class);
-    }
-    /**
-     *  降级规则
-     * @return
-     */
-    @Bean
-    public Converter<List<DegradeRuleEntity>, String> degradeRuleEntityEncoder() {
-        return JSON::toJSONString;
-    }
-
-    @Bean
-    public Converter<String, List<DegradeRuleEntity>> degradeRuleEntityDecoder() {
-        return s -> JSON.parseArray(s, DegradeRuleEntity.class);
-    }
-
-    /**
-     *   热点参数 规则
-     * @return
-     */
-    @Bean
-    public Converter<List<ParamFlowRuleCorrectEntity>, String> paramFlowRuleEntityEncoder() {
-        return JSON::toJSONString;
-    }
-
-    @Bean
-    public Converter<String, List<ParamFlowRuleCorrectEntity>> paramFlowRuleEntityDecoder() {
-        return s -> JSON.parseArray(s, ParamFlowRuleCorrectEntity.class);
-    }
-
-    /**
-     * 系统规则
-     * @return
-     */
-    @Bean
-    public Converter<List<SystemRuleEntity>, String> systemRuleRuleEntityEncoder() {
-        return JSON::toJSONString;
-    }
-
-    @Bean
-    public Converter<String, List<SystemRuleEntity>> systemRuleRuleEntityDecoder() {
-        return s -> JSON.parseArray(s, SystemRuleEntity.class);
-    }
-    /**
-     * 授权规则
-     * @return
-     */
-    @Bean
-    public Converter<List<AuthorityRuleCorrectEntity>, String> authorityRuleRuleEntityEncoder() {
-        return JSON::toJSONString;
-    }
-
-    @Bean
-    public Converter<String, List<AuthorityRuleCorrectEntity>> authorityRuleRuleEntityDecoder() {
-        return s -> JSON.parseArray(s, AuthorityRuleCorrectEntity.class);
-    }
-
-    /**
-     * 网关API
-     *
-     * @return
-     * @throws Exception
-     */
-    @Bean
-    public Converter<List<ApiDefinitionEntity>, String> apiDefinitionEntityEncoder() {
-        return JSON::toJSONString;
-    }
-
-    @Bean
-    public Converter<String, List<ApiDefinitionEntity>> apiDefinitionEntityDecoder() {
-        return s -> JSON.parseArray(s, ApiDefinitionEntity.class);
-    }
-
-    /**
-     * 网关flowRule
-     *
-     * @return
-     * @throws Exception
-     */
-    @Bean
-    public Converter<List<GatewayFlowRuleEntity>, String> gatewayFlowRuleEntityEncoder() {
-        return JSON::toJSONString;
-    }
-
-    @Bean
-    public Converter<String, List<GatewayFlowRuleEntity>> gatewayFlowRuleEntityDecoder() {
-        return s -> JSON.parseArray(s, GatewayFlowRuleEntity.class);
-    }
-
-    @Bean
-    public ConfigService nacosConfigService() throws Exception {
-        Properties properties=new Properties();
-        properties.put(PropertyKeyConst.SERVER_ADDR,nacosConfigProperties.getServerAddr());
-        if(StringUtils.isNotBlank(nacosConfigProperties.getUsername())){
-            properties.put(PropertyKeyConst.USERNAME,nacosConfigProperties.getUsername());
-        }
-        if(StringUtils.isNotBlank(nacosConfigProperties.getPassword())){
-            properties.put(PropertyKeyConst.PASSWORD,nacosConfigProperties.getPassword());
-        }
-        if(StringUtils.isNotBlank(nacosConfigProperties.getNamespace())){
-            properties.put(PropertyKeyConst.NAMESPACE,nacosConfigProperties.getNamespace());
-        }
-        return ConfigFactory.createConfigService(properties);
-    }
-}

+ 0 - 50
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/authority/AuthorityRuleNacosProvider.java

@@ -1,50 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.authority;
-
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.AuthorityRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.AuthorityRuleCorrectEntity;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRule;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 授权规则拉取(黑名单白名单)
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("authorityRuleNacosProvider")
-public class AuthorityRuleNacosProvider implements DynamicRuleProvider<List<AuthorityRuleEntity>> {
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<String, List<AuthorityRuleCorrectEntity>> converter;
-
-    @Override
-    public List<AuthorityRuleEntity> getRules(String appName) throws Exception {
-        String rules = configService.getConfig(appName + SentinelConStants.AUTHORITY_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, 3000);
-        if (StringUtil.isEmpty(rules)) {
-            return new ArrayList<>();
-        }
-        List<AuthorityRuleCorrectEntity> entityList = converter.convert(rules);
-        return entityList.stream().map(rule -> {
-            AuthorityRule authorityRule = new AuthorityRule();
-            BeanUtils.copyProperties(rule, authorityRule);
-            AuthorityRuleEntity entity = AuthorityRuleEntity.fromAuthorityRule(rule.getApp(), rule.getIp(), rule.getPort(), authorityRule);
-            entity.setId(rule.getId());
-            entity.setGmtCreate(rule.getGmtCreate());
-            return entity;
-        }).collect(Collectors.toList());
-    }
-}

+ 0 - 47
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/authority/AuthorityRuleNacosPublisher.java

@@ -1,47 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.authority;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.AuthorityRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.AuthorityRuleCorrectEntity;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.AssertUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 授权规则持久化(黑名单白名单)
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("authorityRuleNacosPublisher")
-public class AuthorityRuleNacosPublisher implements DynamicRulePublisher<List<AuthorityRuleEntity>> {
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<List<AuthorityRuleCorrectEntity>, String> converter;
-
-    @Override
-    public void publish(String app, List<AuthorityRuleEntity> rules) throws Exception {
-        AssertUtil.notEmpty(app, "app name cannot be empty");
-        if (rules == null) {
-            return;
-        }
-        //  转换
-        List<AuthorityRuleCorrectEntity> list = rules.stream().map(rule -> {
-            AuthorityRuleCorrectEntity entity = new AuthorityRuleCorrectEntity();
-            BeanUtils.copyProperties(rule, entity);
-            return entity;
-        }).collect(Collectors.toList());
-
-        configService.publishConfig(app + SentinelConStants.AUTHORITY_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, converter.convert(list));
-    }
-}
-

+ 0 - 39
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/degrade/DegradeRuleNacosProvider.java

@@ -1,39 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.degrade;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.DegradeRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 降级规则拉取
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("degradeRuleNacosProvider")
-public class DegradeRuleNacosProvider implements DynamicRuleProvider<List<DegradeRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<String, List<DegradeRuleEntity>> converter;
-
-    @Override
-    public List<DegradeRuleEntity> getRules(String appName) throws Exception {
-        String rules = configService.getConfig(appName + SentinelConStants.DEGRADE_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, 3000);
-        if (StringUtil.isEmpty(rules)) {
-            return new ArrayList<>();
-        }
-        return converter.convert(rules);
-    }
-}

+ 0 - 38
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/degrade/DegradeRuleNacosPublisher.java

@@ -1,38 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.degrade;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.DegradeRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.AssertUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * 降级规则推送
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("degradeRuleNacosPublisher")
-public class DegradeRuleNacosPublisher implements DynamicRulePublisher<List<DegradeRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<List<DegradeRuleEntity>, String> converter;
-
-    @Override
-    public void publish(String app, List<DegradeRuleEntity> rules) throws Exception {
-        AssertUtil.notEmpty(app, "app name cannot be empty");
-        if (rules == null) {
-            return;
-        }
-        configService.publishConfig(app + SentinelConStants.DEGRADE_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, converter.convert(rules));
-    }
-}

+ 0 - 110
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/entity/AuthorityRuleCorrectEntity.java

@@ -1,110 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.entity;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.RuleEntity;
-import com.alibaba.csp.sentinel.slots.block.Rule;
-import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRule;
-
-import java.util.Date;
-
-/**
- * @author zyf
- * @description 重写授权规则实体类,原因同热点规则
- * @date 2022-04-13
- */
-public class AuthorityRuleCorrectEntity implements RuleEntity {
-
-    private Long id;
-    private String app;
-    private String ip;
-    private Integer port;
-    private String limitApp;
-    private String resource;
-    private Date gmtCreate;
-    private Date gmtModified;
-
-    private int strategy;
-
-    @Override
-    public Long getId() {
-        return id;
-    }
-
-    @Override
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    @Override
-    public String getApp() {
-        return app;
-    }
-
-    public void setApp(String app) {
-        this.app = app;
-    }
-
-    @Override
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    @Override
-    public Integer getPort() {
-        return port;
-    }
-
-    public void setPort(Integer port) {
-        this.port = port;
-    }
-
-    public String getLimitApp() {
-        return limitApp;
-    }
-
-    public void setLimitApp(String limitApp) {
-        this.limitApp = limitApp;
-    }
-
-    public String getResource() {
-        return resource;
-    }
-
-    public void setResource(String resource) {
-        this.resource = resource;
-    }
-
-    @Override
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public int getStrategy() {
-        return strategy;
-    }
-
-    public void setStrategy(int strategy) {
-        this.strategy = strategy;
-    }
-
-    @Override
-    public Rule toRule(){
-        AuthorityRule rule=new AuthorityRule();
-        return rule;
-    }
-}

+ 0 - 194
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/entity/ParamFlowRuleCorrectEntity.java

@@ -1,194 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.entity;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.RuleEntity;
-import com.alibaba.csp.sentinel.slots.block.Rule;
-import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowClusterConfig;
-import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowItem;
-import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule;
-
-import java.util.*;
-
-/**
- * @author zyf
- * @description 重写热点规则实体类,。查看sentinel-dashboard在自定义ParamFlowRuleNacosPublisher时候 推送的数据是ParamFlowRuleEntity。 客户端接收的ParamFlowRule类
- * @date 2022-04-13
- */
-public class ParamFlowRuleCorrectEntity implements RuleEntity {
-
-    private Long id;
-    private String app;
-    private String ip;
-    private Integer port;
-    private String limitApp;
-    private String resource;
-    private Date gmtCreate;
-
-    private int grade = 1;
-    private Integer paramIdx;
-    private double count;
-    private int controlBehavior = 0;
-    private int maxQueueingTimeMs = 0;
-    private int burstCount = 0;
-    private long durationInSec = 1L;
-    private List<ParamFlowItem> paramFlowItemList = new ArrayList();
-    private Map<Object, Integer> hotItems = new HashMap();
-    private boolean clusterMode = false;
-    private ParamFlowClusterConfig clusterConfig;
-
-    public int getGrade() {
-        return grade;
-    }
-
-    public void setGrade(int grade) {
-        this.grade = grade;
-    }
-
-    public Integer getParamIdx() {
-        return paramIdx;
-    }
-
-    public void setParamIdx(Integer paramIdx) {
-        this.paramIdx = paramIdx;
-    }
-
-    public double getCount() {
-        return count;
-    }
-
-    public void setCount(double count) {
-        this.count = count;
-    }
-
-    public int getControlBehavior() {
-        return controlBehavior;
-    }
-
-    public void setControlBehavior(int controlBehavior) {
-        this.controlBehavior = controlBehavior;
-    }
-
-    public int getMaxQueueingTimeMs() {
-        return maxQueueingTimeMs;
-    }
-
-    public void setMaxQueueingTimeMs(int maxQueueingTimeMs) {
-        this.maxQueueingTimeMs = maxQueueingTimeMs;
-    }
-
-    public int getBurstCount() {
-        return burstCount;
-    }
-
-    public void setBurstCount(int burstCount) {
-        this.burstCount = burstCount;
-    }
-
-    public long getDurationInSec() {
-        return durationInSec;
-    }
-
-    public void setDurationInSec(long durationInSec) {
-        this.durationInSec = durationInSec;
-    }
-
-    public List<ParamFlowItem> getParamFlowItemList() {
-        return paramFlowItemList;
-    }
-
-    public void setParamFlowItemList(List<ParamFlowItem> paramFlowItemList) {
-        this.paramFlowItemList = paramFlowItemList;
-    }
-
-    public Map<Object, Integer> getHotItems() {
-        return hotItems;
-    }
-
-    public void setHotItems(Map<Object, Integer> hotItems) {
-        this.hotItems = hotItems;
-    }
-
-    public boolean isClusterMode() {
-        return clusterMode;
-    }
-
-    public void setClusterMode(boolean clusterMode) {
-        this.clusterMode = clusterMode;
-    }
-
-    public ParamFlowClusterConfig getClusterConfig() {
-        return clusterConfig;
-    }
-
-    public void setClusterConfig(ParamFlowClusterConfig clusterConfig) {
-        this.clusterConfig = clusterConfig;
-    }
-
-    @Override
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    @Override
-    public Long getId() {
-        return id;
-    }
-
-    @Override
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    @Override
-    public String getApp() {
-        return app;
-    }
-
-    public void setApp(String app) {
-        this.app = app;
-    }
-
-    @Override
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    @Override
-    public Integer getPort() {
-        return port;
-    }
-
-    public void setPort(Integer port) {
-        this.port = port;
-    }
-
-    public String getLimitApp() {
-        return limitApp;
-    }
-
-    public void setLimitApp(String limitApp) {
-        this.limitApp = limitApp;
-    }
-
-    public String getResource() {
-        return resource;
-    }
-
-    public void setResource(String resource) {
-        this.resource = resource;
-    }
-
-    @Override
-    public Rule toRule() {
-        ParamFlowRule rule = new ParamFlowRule();
-        return rule;
-    }
-}
-

+ 0 - 55
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/flow/FlowRuleNacosProvider.java

@@ -1,55 +0,0 @@
-/*
- * Copyright 1999-2018 Alibaba Group Holding Ltd.
- *
- * 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.
- */
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.flow;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.FlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-
-/**
- * 流控规则拉取
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("flowRuleNacosProvider")
-public class FlowRuleNacosProvider implements DynamicRuleProvider<List<FlowRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<String, List<FlowRuleEntity>> converter;
-
-    @Override
-    public List<FlowRuleEntity> getRules(String appName) throws Exception {
-        String rules = configService.getConfig(appName + SentinelConStants.FLOW_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, 3000);
-        if (StringUtil.isEmpty(rules)) {
-            return new ArrayList<>();
-        }
-        return converter.convert(rules);
-    }
-}

+ 0 - 54
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/flow/FlowRuleNacosPublisher.java

@@ -1,54 +0,0 @@
-/*
- * Copyright 1999-2018 Alibaba Group Holding Ltd.
- *
- * 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.
- */
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.flow;
-
-import java.util.List;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.FlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.AssertUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-
-/**
- * 流控规则推送
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("flowRuleNacosPublisher")
-public class FlowRuleNacosPublisher implements DynamicRulePublisher<List<FlowRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<List<FlowRuleEntity>, String> converter;
-
-    @Override
-    public void publish(String app, List<FlowRuleEntity> rules) throws Exception {
-        AssertUtil.notEmpty(app, "app name cannot be empty");
-        if (rules == null) {
-            return;
-        }
-        configService.publishConfig(app + SentinelConStants.FLOW_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, converter.convert(rules));
-    }
-}

+ 0 - 35
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayApiNacosProvider.java

@@ -1,35 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.gateway;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.ApiDefinitionEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-/**
- * 网关API规则拉取
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("gateWayApiNacosProvider")
-public class GateWayApiNacosProvider implements DynamicRuleProvider<List<ApiDefinitionEntity>> {
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<String , List<ApiDefinitionEntity>> converter;
-    @Override
-    public List<ApiDefinitionEntity> getRules(String appName) throws Exception {
-        String rules = configService.getConfig(appName+ SentinelConStants.GETEWAY_API_DATA_ID_POSTFIX
-                , SentinelConStants.GROUP_ID,3000);
-        if(StringUtil.isEmpty(rules)){
-            return new ArrayList<>();
-        }
-        return converter.convert(rules);
-    }
-}

+ 0 - 35
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayApiNacosPublisher.java

@@ -1,35 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.gateway;
-
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.ApiDefinitionEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.AssertUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-/**
- * 网关API规则推送
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("gateWayApiNacosPublisher")
-public class GateWayApiNacosPublisher implements DynamicRulePublisher<List<ApiDefinitionEntity>> {
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<List<ApiDefinitionEntity>, String> converter;
-    @Override
-    public void publish(String app, List<ApiDefinitionEntity> rules) throws Exception {
-        AssertUtil.notEmpty(app, "app name cannot be empty");
-        if (rules == null) {
-            return;
-        }
-        configService.publishConfig(app+ SentinelConStants.GETEWAY_API_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID,converter.convert(rules));
-    }
-}

+ 0 - 40
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayFlowRulesNacosProvider.java

@@ -1,40 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.gateway;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.GatewayFlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 网关流控规则拉取
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("gateWayFlowRulesNacosProvider")
-public class GateWayFlowRulesNacosProvider implements DynamicRuleProvider<List<GatewayFlowRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<String, List<GatewayFlowRuleEntity>> converter;
-
-    @Override
-    public List<GatewayFlowRuleEntity> getRules(String appName) throws Exception {
-        String rules = configService.getConfig(appName + SentinelConStants.GETEWAY_FLOW_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, 3000);
-        if (StringUtil.isEmpty(rules)) {
-            return new ArrayList<>();
-        }
-        return converter.convert(rules);
-    }
-
-}

+ 0 - 41
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/gateway/GateWayFlowRulesNacosPublisher.java

@@ -1,41 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.gateway;
-
-
-import java.util.List;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.GatewayFlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.AssertUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-
-/**
- * 网关流控规则推送
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("gateWayFlowRulesNacosPublisher")
-public class GateWayFlowRulesNacosPublisher implements DynamicRulePublisher<List<GatewayFlowRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<List<GatewayFlowRuleEntity>, String> converter;
-
-
-    @Override
-    public void publish(String app, List<GatewayFlowRuleEntity> rules) throws Exception {
-        AssertUtil.notEmpty(app, "app name cannot be empty");
-        if (rules == null) {
-            return;
-        }
-        configService.publishConfig(app + SentinelConStants.GETEWAY_FLOW_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, converter.convert(rules));
-    }
-}

+ 0 - 52
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/paramflow/ParamFlowRuleNacosProvider.java

@@ -1,52 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.paramflow;
-
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.ParamFlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.ParamFlowRuleCorrectEntity;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- *  加载热点参数规则
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("paramFlowRuleNacosProvider")
-public class ParamFlowRuleNacosProvider implements DynamicRuleProvider<List<ParamFlowRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<String, List<ParamFlowRuleCorrectEntity>> converter;
-
-    @Override
-    public List<ParamFlowRuleEntity> getRules(String appName) throws Exception {
-        String rules = configService.getConfig(appName + SentinelConStants.PARAM_FLOW_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, 3000);
-        if (StringUtil.isEmpty(rules)) {
-            return new ArrayList<>();
-        }
-        List<ParamFlowRuleCorrectEntity> entityList = converter.convert(rules);
-        return entityList.stream().map(rule -> {
-            ParamFlowRule paramFlowRule = new ParamFlowRule();
-            BeanUtils.copyProperties(rule, paramFlowRule);
-            ParamFlowRuleEntity entity = ParamFlowRuleEntity.fromParamFlowRule(rule.getApp(), rule.getIp(), rule.getPort(), paramFlowRule);
-            entity.setId(rule.getId());
-            entity.setGmtCreate(rule.getGmtCreate());
-            return entity;
-        }).collect(Collectors.toList());
-    }
-}

+ 0 - 51
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/paramflow/ParamFlowRuleNacosPublisher.java

@@ -1,51 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.paramflow;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.ParamFlowRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.SentinelConfig;
-import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.ParamFlowRuleCorrectEntity;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.AssertUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- *  持久化热点参数规则
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("paramFlowRuleNacosPublisher")
-public class ParamFlowRuleNacosPublisher implements DynamicRulePublisher<List<ParamFlowRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<List<ParamFlowRuleCorrectEntity>, String> converter;
-
-    @Override
-    public void publish(String app, List<ParamFlowRuleEntity> rules) throws Exception {
-        AssertUtil.notEmpty(app, "app name cannot be empty");
-        if (rules == null) {
-            return;
-        }
-        rules.forEach(e -> e.setApp(app));
-
-        //  转换
-        List<ParamFlowRuleCorrectEntity> list = rules.stream().map(rule -> {
-            ParamFlowRuleCorrectEntity entity = new ParamFlowRuleCorrectEntity();
-            BeanUtils.copyProperties(rule, entity);
-            return entity;
-        }).collect(Collectors.toList());
-
-        configService.publishConfig(app + SentinelConStants.PARAM_FLOW_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, converter.convert(list));
-
-    }
-}

+ 0 - 37
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/system/SystemRuleNacosProvider.java

@@ -1,37 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.system;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.SystemRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.StringUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *  加载系统规则
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("systemRuleNacosProvider")
-public class SystemRuleNacosProvider implements DynamicRuleProvider<List<SystemRuleEntity>> {
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<String, List<SystemRuleEntity>> converter;
-
-    @Override
-    public List<SystemRuleEntity> getRules(String appName) throws Exception {
-        String rules = configService.getConfig(appName + SentinelConStants.SYSTEM_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, 3000);
-        if (StringUtil.isEmpty(rules)) {
-            return new ArrayList<>();
-        }
-        return converter.convert(rules);
-    }
-}

+ 0 - 37
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/system/SystemRuleNacosPublisher.java

@@ -1,37 +0,0 @@
-package com.alibaba.csp.sentinel.dashboard.rule.nacos.system;
-
-import com.alibaba.csp.sentinel.dashboard.constants.SentinelConStants;
-import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.SystemRuleEntity;
-import com.alibaba.csp.sentinel.dashboard.rule.DynamicRulePublisher;
-import com.alibaba.csp.sentinel.datasource.Converter;
-import com.alibaba.csp.sentinel.util.AssertUtil;
-import com.alibaba.nacos.api.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- *  持久化系统规则
- *
- * @author zyf
- * @date 2022-04-13
- */
-@Component("systemRuleNacosPublisher")
-public class SystemRuleNacosPublisher implements DynamicRulePublisher<List<SystemRuleEntity>> {
-
-    @Autowired
-    private ConfigService configService;
-    @Autowired
-    private Converter<List<SystemRuleEntity>, String> converter;
-
-    @Override
-    public void publish(String app, List<SystemRuleEntity> rules) throws Exception {
-        AssertUtil.notEmpty(app, "app name cannot be empty");
-        if (rules == null) {
-            return;
-        }
-        configService.publishConfig(app + SentinelConStants.SYSTEM_DATA_ID_POSTFIX,
-                SentinelConStants.GROUP_ID, converter.convert(rules));
-    }
-}

+ 0 - 38
jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/resources/application.yml

@@ -1,38 +0,0 @@
-server:
-  port: 9000
-  servlet:
-    session:
-      cookie:
-        name: sentinel_dashboard_cookie
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-spring:
-  mvc:
-    #Spring Boot 2.6+\u540E\u6620\u5C04\u5339\u914D\u7684\u9ED8\u8BA4\u7B56\u7565\u5DF2\u4ECEAntPathMatcher\u66F4\u6539\u4E3APathPatternParser,\u9700\u8981\u624B\u52A8\u6307\u5B9A\u4E3Aant-path-matcher
-    pathmatch:
-      matching-strategy: ant-path-matcher
-#auth settings
-auth:
-  filter:
-    exclude-url-suffixes: htm,html,js,css,map,ico,ttf,woff,png
-    exclude-urls: /,/auth/login,/auth/logout,/registry/machine,/version
-logging:
-  level:
-    org:
-      springframework:
-        web: INFO
-  pattern:
-    file: '%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n'
-  file:
-    name: ${user.home}/logs/csp/sentinel-dashboard.log
-nacos:
-  server:
-    ip: @config.server-addr@
-sentinel:
-  dashboard:
-    version: 1.8.2
-    auth:
-      username: sentinel
-      password: sentinel

+ 0 - 44
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/pom.xml

@@ -1,44 +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">
-    <parent>
-        <artifactId>jeecg-cloud-test</artifactId>
-        <groupId>org.jeecgframework.boot</groupId>
-        <version>3.7.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <description>公共测试模块</description>
-    <artifactId>jeecg-cloud-test-more</artifactId>
-
-    <dependencies>
-        <!-- 引入jeecg-boot-starter-cloud依赖 -->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-cloud</artifactId>
-            <!--system模块需要排除jeecg-system-cloud-api-->
-            <exclusions>
-                <exclusion>
-                    <groupId>org.jeecgframework.boot</groupId>
-                    <artifactId>jeecg-system-cloud-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <!--定时任务-->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-job</artifactId>
-        </dependency>
-        <!--rabbitmq消息队列-->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-rabbitmq</artifactId>
-        </dependency>
-        <!-- 分布式锁依赖 -->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-boot-starter-lock</artifactId>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 26
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/constant/CloudConstant.java

@@ -1,26 +0,0 @@
-package org.jeecg.modules.test.constant;
-
-/**
- * 微服务单元测试常量定义
- * @author: zyf
- * @date: 2022/04/21
- */
-public interface CloudConstant {
-
-    /**
-     * MQ测试队列名字
-     */
-    public final static String MQ_JEECG_PLACE_ORDER = "jeecg_place_order";
-
-    /**
-     * MQ测试消息总线
-     */
-    public final static String MQ_DEMO_BUS_EVENT = "demoBusEvent";
-
-    /**
-     * 分布式锁lock key
-     */
-    public final static String REDISSON_DEMO_LOCK_KEY1 = "demoLockKey1";
-    public final static String REDISSON_DEMO_LOCK_KEY2 = "demoLockKey2";
-
-}

+ 0 - 30
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/client/JeecgTestClient.java

@@ -1,30 +0,0 @@
-package org.jeecg.modules.test.feign.client;
-
-import org.jeecg.common.api.vo.Result;
-
-import org.jeecg.common.constant.ServiceNameConstants;
-import org.jeecg.config.FeignConfig;
-import org.jeecg.modules.test.constant.CloudConstant;
-import org.jeecg.modules.test.feign.factory.JeecgTestClientFactory;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-/**
- * 常规feign接口定义
- * @author: zyf
- * @date: 2022/04/21
- */
-@FeignClient(value = ServiceNameConstants.SERVICE_DEMO, configuration = FeignConfig.class,fallbackFactory = JeecgTestClientFactory.class)
-@Component
-public interface JeecgTestClient {
-
-    /**
-     * feign测试方法
-     * @param name
-     * @return
-     */
-    @GetMapping(value = "/test/getMessage")
-    String getMessage(@RequestParam(value = "name",required = false) String name);
-}

+ 0 - 15
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/client/JeecgTestClientDyn.java

@@ -1,15 +0,0 @@
-//package org.jeecg.modules.test.feign.client;
-//
-//import org.jeecg.common.api.vo.Result;
-//import org.springframework.web.bind.annotation.GetMapping;
-//import org.springframework.web.bind.annotation.PostMapping;
-//import org.springframework.web.bind.annotation.RequestParam;
-//
-///**
-// * 动态feign接口定义
-// */
-//public interface JeecgTestClientDyn {
-//
-//    @GetMapping(value = "/test/getMessage")
-//    Result<String> getMessage(@RequestParam(value = "name",required = false) String name);
-//}

+ 0 - 78
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/controller/JeecgTestFeignController.java

@@ -1,78 +0,0 @@
-package org.jeecg.modules.test.feign.controller;
-
-
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.modules.test.feign.client.JeecgTestClient;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import com.alibaba.csp.sentinel.annotation.SentinelResource;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * 微服务单元测试
- * @author: zyf
- * @date: 2022/04/21
- */
-@Slf4j
-@RestController
-@RequestMapping("/sys/test")
-@Api(tags = "【微服务】单元测试")
-public class JeecgTestFeignController {
-
-    @Autowired
-    private JeecgTestClient jeecgTestClient;
-
-    /**
-     * 熔断: fallbackFactory优先于 @SentinelResource
-     *
-     * @param name
-     * @return
-     */
-    @GetMapping("/getMessage")
-    @ApiOperation(value = "测试feign调用demo服务1", notes = "测试feign @SentinelResource熔断写法 | 测试熔断关闭jeecg-demo服务")
-    @SentinelResource(value = "test_more_getMessage", fallback = "getDefaultUser")
-    public Result<String> getMessage(@RequestParam(value = "name", required = false) String name) {
-        log.info("---------Feign fallbackFactory优先级高于@SentinelResource-----------------");
-        String resultMsg = jeecgTestClient.getMessage(" I am jeecg-system 服务节点,呼叫 jeecg-demo!");
-        return Result.OK(null, resultMsg);
-    }
-
-    /**
-     * 测试方法:关闭demo服务,访问请求 http://127.0.0.1:9999/sys/test/getMessage
-     *
-     * @param name
-     * @return
-     */
-    @GetMapping("/getMessage2")
-    @ApiOperation(value = "测试feign调用demo服务2", notes = "测试feign fallbackFactory熔断写法 | 测试熔断关闭jeecg-demo服务")
-    public Result<String> getMessage2(@RequestParam(value = "name", required = false) String name) {
-        log.info("---------测试 Feign fallbackFactory-----------------");
-        String resultMsg = jeecgTestClient.getMessage(" I am jeecg-system 服务节点,呼叫 jeecg-demo!");
-        return Result.OK(null, resultMsg);
-    }
-
-
-    @GetMapping("/fallback")
-    @ApiOperation(value = "测试熔断", notes = "测试熔断")
-    @SentinelResource(value = "test_more_fallback", fallback = "getDefaultUser")
-    public Result<Object> test(@RequestParam(value = "name", required = false) String name) {
-        if (StringUtils.isEmpty(name)) {
-            throw new IllegalArgumentException("name param is empty");
-        }
-        return Result.OK();
-    }
-
-    /**
-     * 熔断,默认回调函数
-     *
-     * @param name
-     * @return
-     */
-    public Result<Object> getDefaultUser(String name) {
-        log.info("熔断,默认回调函数");
-        return Result.error(null, "访问超时, 自定义 @SentinelResource Fallback");
-    }
-}

+ 0 - 23
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/factory/JeecgTestClientFactory.java

@@ -1,23 +0,0 @@
-package org.jeecg.modules.test.feign.factory;
-
-
-
-
-import org.springframework.cloud.openfeign.FallbackFactory;
-import org.jeecg.modules.test.feign.client.JeecgTestClient;
-import org.jeecg.modules.test.feign.fallback.JeecgTestFallback;
-import org.springframework.stereotype.Component;
-
-/**
- * @author qinfeng
- */
-@Component
-public class JeecgTestClientFactory implements FallbackFactory<JeecgTestClient> {
-
-    @Override
-    public JeecgTestClient create(Throwable throwable) {
-        JeecgTestFallback fallback = new JeecgTestFallback();
-        fallback.setCause(throwable);
-        return fallback;
-    }
-}

+ 0 - 25
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/feign/fallback/JeecgTestFallback.java

@@ -1,25 +0,0 @@
-package org.jeecg.modules.test.feign.fallback;
-
-import org.jeecg.common.api.vo.Result;
-
-import lombok.Setter;
-import org.jeecg.modules.test.feign.client.JeecgTestClient;
-
-
-/**
-* 接口fallback实现
-* 
-* @author: scott
-* @date: 2022/4/11 19:41
-*/
-public class JeecgTestFallback implements JeecgTestClient {
-
-    @Setter
-    private Throwable cause;
-
-
-    @Override
-    public String getMessage(String name) {
-        return "访问超时, 自定义FallbackFactory";
-    }
-}

+ 0 - 69
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/lock/DemoLockTest.java

@@ -1,69 +0,0 @@
-package org.jeecg.modules.test.lock;
-
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.boot.starter.lock.annotation.JLock;
-import org.jeecg.boot.starter.lock.client.RedissonLockClient;
-import org.jeecg.modules.test.constant.CloudConstant;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-import java.util.Map;
-
-/**
- * 分布式锁测试demo
- * @author: zyf
- * @date: 2022/04/21
- */
-@Slf4j
-@Component
-public class DemoLockTest {
-    @Autowired
-    RedissonLockClient redissonLock;
-//    @Autowired
-//    RabbitMqClient rabbitMqClient;
-
-    /**
-     * 测试方法:
-     *    @Scheduled(cron = "0/5 * * * * ?") 表示每5秒执行一次
-     *    @JLock(lockKey = CloudConstant.REDISSON_DEMO_LOCK_KEY1)分布式锁,10秒钟才释放
-     *    结果:每10秒钟输出一次 “执行 分布式锁 业务逻辑1” 就说明锁成功了
-     *
-     * 测试分布式锁【注解方式】
-     */
-    @Scheduled(cron = "0/5 * * * * ?")
-    @JLock(lockKey = CloudConstant.REDISSON_DEMO_LOCK_KEY1)
-    public void execute() throws InterruptedException {
-        log.info("执行execute任务开始,休眠十秒开始,当前系统时间戳(秒):"+ System.currentTimeMillis()/1000);
-        Thread.sleep(10000);
-        log.info("========执行 分布式锁 业务逻辑1=============");
-//        Map map = new BaseMap();
-//        map.put("orderId", "BJ0001");
-//        rabbitMqClient.sendMessage(CloudConstant.MQ_JEECG_PLACE_ORDER, map);
-//        //延迟10秒发送
-//        map.put("orderId", "NJ0002");
-//        rabbitMqClient.sendMessage(CloudConstant.MQ_JEECG_PLACE_ORDER, map, 10000);
-
-        log.info("execute任务结束,休眠十秒完成,当前系统时间戳(秒):"+ System.currentTimeMillis()/1000);
-    }
-
-
-    /**
-     * 测试分布式锁【编码方式】
-     * @Scheduled(cron = "0/5 * * * * ?")
-     */
-    public void execute2() throws InterruptedException {
-        int expireSeconds=6000;
-        if (redissonLock.tryLock(CloudConstant.REDISSON_DEMO_LOCK_KEY2, -1, expireSeconds)) {
-            log.info("执行任务execute2开始,休眠十秒");
-            Thread.sleep(10000);
-           log.info("=============业务逻辑2===================");
-            log.info("定时execute2结束,休眠十秒");
-
-            redissonLock.unlock(CloudConstant.REDISSON_DEMO_LOCK_KEY2);
-        } else {
-            log.info("execute2获取锁失败");
-        }
-    }
-
-}

+ 0 - 235
jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-more/src/main/java/org/jeecg/modules/test/xxljob/DemoJobHandler.java

@@ -1,235 +0,0 @@
-
-package org.jeecg.modules.test.xxljob;
-
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Arrays;
-
-
-/**
- * xxl-job定时任务测试
- * @author: zyf
- * @date: 2022/04/21
- */
-@Component
-@Slf4j
-public class DemoJobHandler {
-
-
-    /**
-     * 简单任务
-     *
-     * @param params
-     * @return
-     */
-    @XxlJob(value = "demoJob")
-    public ReturnT<String> demoJobHandler(String params) {
-        log.info("我是 jeecg-system 服务里的定时任务 demoJob,我执行了...............................");
-        return ReturnT.SUCCESS;
-    }
-
-    /**
-     * 2、分片广播任务
-     */
-    @XxlJob("shardingJobHandler")
-    public ReturnT<String> shardingJobHandler(String param) throws Exception {
-
-        // 分片参数
-        ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
-        log.info("分片参数:当前分片序号 = {}, 总分片数 = {}", shardingVO.getIndex(), shardingVO.getTotal());
-
-        // 业务逻辑
-        for (int i = 0; i < shardingVO.getTotal(); i++) {
-            if (i == shardingVO.getIndex()) {
-                log.info("第 {} 片, 命中分片开始处理", i);
-            } else {
-                log.info("第 {} 片, 忽略", i);
-            }
-        }
-
-        return ReturnT.SUCCESS;
-    }
-
-
-    /**
-     * 3、命令行任务
-     *
-     * 输入参数:ipconfig /all
-     */
-    @XxlJob("commandJobHandler")
-    public ReturnT<String> commandJobHandler(String param) throws Exception {
-        String command = param;
-        int exitValue = -1;
-
-        BufferedReader bufferedReader = null;
-        try {
-            // command process
-            Process process = Runtime.getRuntime().exec(command);
-            BufferedInputStream bufferedInputStream = new BufferedInputStream(process.getInputStream());
-            bufferedReader = new BufferedReader(new InputStreamReader(bufferedInputStream));
-
-            // command log
-            String line;
-            while ((line = bufferedReader.readLine()) != null) {
-                log.info(line);
-            }
-
-            // command exit
-            process.waitFor();
-            exitValue = process.exitValue();
-        } catch (Exception e) {
-            log.info(e.getMessage(),e);
-        } finally {
-            if (bufferedReader != null) {
-                bufferedReader.close();
-            }
-        }
-
-        if (exitValue == 0) {
-            return IJobHandler.SUCCESS;
-        } else {
-            return new ReturnT<String>(IJobHandler.FAIL.getCode(), "command exit value(" + exitValue + ") is failed");
-        }
-    }
-
-
-    /**
-     * 4、跨平台Http任务
-     *
-     * 输入参数:
-     * url: https://www.baidu.com
-     * method: get
-     * data: content
-     */
-    @XxlJob("httpJobHandler")
-    public ReturnT<String> httpJobHandler(String param) throws Exception {
-        String[] methodArray=new String[]{"GET","POST"};
-        int okState=200;
-        // param parse
-        if (param == null || param.trim().length() == 0) {
-            log.info("param[" + param + "] invalid.");
-            return ReturnT.FAIL;
-        }
-        String[] httpParams = param.split("\n");
-        String url = null;
-        String method = null;
-        String data = null;
-        for (String httpParam : httpParams) {
-            if (httpParam.startsWith("url:")) {
-                url = httpParam.substring(httpParam.indexOf("url:") + 4).trim();
-            }
-            if (httpParam.startsWith("method:")) {
-                method = httpParam.substring(httpParam.indexOf("method:") + 7).trim().toUpperCase();
-            }
-            if (httpParam.startsWith("data:")) {
-                data = httpParam.substring(httpParam.indexOf("data:") + 5).trim();
-            }
-        }
-
-        // param valid
-        if (url == null || url.trim().length() == 0) {
-            log.info("url[" + url + "] invalid.");
-            return ReturnT.FAIL;
-        }
-        if (method == null || !Arrays.asList(methodArray).contains(method)) {
-            log.info("method[" + method + "] invalid.");
-            return ReturnT.FAIL;
-        }
-
-        // request
-        HttpURLConnection connection = null;
-        BufferedReader bufferedReader = null;
-        try {
-            // connection
-            URL realUrl = new URL(url);
-            connection = (HttpURLConnection) realUrl.openConnection();
-
-            // connection setting
-            connection.setRequestMethod(method);
-            connection.setDoOutput(true);
-            connection.setDoInput(true);
-            connection.setUseCaches(false);
-            connection.setReadTimeout(5 * 1000);
-            connection.setConnectTimeout(3 * 1000);
-            connection.setRequestProperty("connection", "Keep-Alive");
-            connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
-            connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");
-
-            // do connection
-            connection.connect();
-
-            // data
-            if (data != null && data.trim().length() > 0) {
-                DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream());
-                dataOutputStream.write(data.getBytes("UTF-8"));
-                dataOutputStream.flush();
-                dataOutputStream.close();
-            }
-
-            // valid StatusCode
-            int statusCode = connection.getResponseCode();
-            if (statusCode != okState) {
-                throw new RuntimeException("Http Request StatusCode(" + statusCode + ") Invalid.");
-            }
-
-            // result
-            bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
-            StringBuilder result = new StringBuilder();
-            String line;
-            while ((line = bufferedReader.readLine()) != null) {
-                result.append(line);
-            }
-            String responseMsg = result.toString();
-
-            log.info(responseMsg);
-            return ReturnT.SUCCESS;
-        } catch (Exception e) {
-            log.info(e.getMessage(),e);
-            return ReturnT.FAIL;
-        } finally {
-            try {
-                if (bufferedReader != null) {
-                    bufferedReader.close();
-                }
-                if (connection != null) {
-                    connection.disconnect();
-                }
-            } catch (Exception e2) {
-                log.info(e2.getMessage(),e2);
-            }
-        }
-
-    }
-
-
-    /**
-     * 5、生命周期任务示例:任务初始化与销毁时,支持自定义相关逻辑;
-     */
-    @XxlJob(value = "demoJobHandler2", init = "init", destroy = "destroy")
-    public ReturnT<String> demoJobHandler2(String param) throws Exception {
-        log.info("XXL-JOB, Hello World.");
-        return ReturnT.SUCCESS;
-    }
-
-    public void init() {
-        log.info("init");
-    }
-
-    public void destroy() {
-        log.info("destory");
-    }
-
-}
-

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů