guyanqing 1 سال پیش
والد
کامیت
da3bab28a1

+ 1 - 0
springcloudalibabaVIP23/.idea/compiler.xml

@@ -11,6 +11,7 @@
         <module name="cloudalibaba-provider-order83" />
         <module name="cloudalibaba-provider-payment9002" />
         <module name="cloudalibaba-provider-payment9001" />
+        <module name="cloudalibaba-sentinel-service8401" />
         <module name="cloud-api-commons" />
       </profile>
     </annotationProcessing>

+ 2 - 0
springcloudalibabaVIP23/.idea/encodings.xml

@@ -11,6 +11,8 @@
     <file url="file://$PROJECT_DIR$/cloudalibaba-provider-payment9001/src/main/resources" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/cloudalibaba-provider-payment9002/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/cloudalibaba-provider-payment9002/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cloudalibaba-sentinel-service8401/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cloudalibaba-sentinel-service8401/src/main/resources" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
     <file url="PROJECT" charset="UTF-8" />

+ 34 - 11
springcloudalibabaVIP23/.idea/workspace.xml

@@ -5,19 +5,18 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="0bad6c28-ea68-4d3a-b40f-655b0d82b08f" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-config-nacos-client3377/pom.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-config-nacos-client3377/src/main/java/com/sf/NacosConfigClientMain3377.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-config-nacos-client3377/src/main/java/com/sf/controller/ConfigclientController.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-config-nacos-client3377/src/main/resources/application.yml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-config-nacos-client3377/src/main/resources/bootstrap.yml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-config-nacos-client3377/src/test/java/com/sf/AppTest.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-provider-order83/src/main/java/com/sf/config/AppliactionContextConfig.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/cloudalibaba-provider-order83/src/main/java/com/sf/controller/OrderNacosController.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/cloudalibaba-sentinel-service8401/pom.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/cloudalibaba-sentinel-service8401/src/main/java/com/sf/MainApp8401.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/cloudalibaba-sentinel-service8401/src/main/java/com/sf/controller/FlowLimitController.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/cloudalibaba-sentinel-service8401/src/main/resources/application.yml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/cloudalibaba-sentinel-service8401/src/test/java/com/sf/AppTest.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cloudalibaba-provider-order83/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cloudalibaba-provider-order83/src/main/resources/application.yml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../vip23-rabbitmq2/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../vip23-rabbitmq2/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../vip23-rabbitmq2/src/main/java/com/sf/Random.java" beforeDir="false" afterPath="$PROJECT_DIR$/../vip23-rabbitmq2/src/main/java/com/sf/Random.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../vip23-rabbitmq2/target/classes/com/sf/Random.class" beforeDir="false" afterPath="$PROJECT_DIR$/../vip23-rabbitmq2/target/classes/com/sf/Random.class" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -64,6 +63,7 @@
     "project.structure.proportion": "0.15",
     "project.structure.side.proportion": "0.35402298",
     "settings.editor.selected.configurable": "MavenSettings",
+    "spring.configuration.checksum": "bee202e8f1b17103d2327e2db124ba51",
     "vue.rearranger.settings.migration": "true"
   }
 }]]></component>
@@ -75,7 +75,27 @@
       <recent name="D:\Program Files\IntelliJ IDEA 2019.3.3\VIP23\springcloudalibabaVIP23\cloudalibaba-provider-payment9002\src\main\java\com\sf" />
     </key>
   </component>
-  <component name="RunManager" selected="Spring Boot.NacosConfigClientMain3377">
+  <component name="RunDashboard">
+    <option name="configurationTypes">
+      <set>
+        <option value="SpringBootApplicationConfigurationType" />
+      </set>
+    </option>
+  </component>
+  <component name="RunManager" selected="Spring Boot.MainApp8401">
+    <configuration name="MainApp8401" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
+      <module name="cloudalibaba-sentinel-service8401" />
+      <option name="SPRING_BOOT_MAIN_CLASS" value="com.sf.MainApp8401" />
+      <extension name="coverage">
+        <pattern>
+          <option name="PATTERN" value="com.sf.*" />
+          <option name="ENABLED" value="true" />
+        </pattern>
+      </extension>
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration name="NacosConfigClientMain3377" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
       <module name="cloudalibaba-config-nacos-client3377" />
       <option name="SPRING_BOOT_MAIN_CLASS" value="com.sf.NacosConfigClientMain3377" />
@@ -130,6 +150,7 @@
     </configuration>
     <recent_temporary>
       <list>
+        <item itemvalue="Spring Boot.MainApp8401" />
         <item itemvalue="Spring Boot.NacosConfigClientMain3377" />
         <item itemvalue="Spring Boot.OrderNacosMain83" />
         <item itemvalue="Spring Boot.PaymentMain9001" />
@@ -145,7 +166,9 @@
       <option name="number" value="Default" />
       <option name="presentableId" value="Default" />
       <updated>1697249044579</updated>
-      <workItem from="1697249045982" duration="26954000" />
+      <workItem from="1697249045982" duration="28402000" />
+      <workItem from="1697709648073" duration="4195000" />
+      <workItem from="1697845863714" duration="6857000" />
     </task>
     <servers />
   </component>

+ 169 - 0
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/pom.xml

@@ -0,0 +1,169 @@
+<?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>springcloudalibabaVIP23</artifactId>
+        <groupId>com.sf</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cloudalibaba-sentinel-service8401</artifactId>
+
+    <name>cloudalibaba-sentinel-service8401</name>
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.12</version>
+            <scope>test</scope>
+        </dependency>
+
+
+        <!--springcloud ailibaba nacos -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+
+        <!--Springcloud ailibaba sentinel-datasource-nacos后续做特久化用-->
+        <dependency>
+            <groupId>com.alibaba.csp</groupId>
+            <artifactId>sentinel-datasource-nacos</artifactId>
+        </dependency>
+
+        <!--    sentinel核心库    -->
+        <dependency>
+            <groupId>com.alibaba.csp</groupId>
+            <artifactId>sentinel-core</artifactId>
+            <version>1.8.1</version>
+        </dependency>
+        <!--    如果要使用@SentinelResource必须添加此依赖    -->
+        <dependency>
+            <groupId>com.alibaba.csp</groupId>
+            <artifactId>sentinel-annotation-aspectj</artifactId>
+            <version>1.8.1</version>
+        </dependency>
+        <!--    整合sentinel控制台    -->
+        <dependency>
+            <groupId>com.alibaba.csp</groupId>
+            <artifactId>sentinel-transport-simple-http</artifactId>
+            <version>1.8.1</version>
+        </dependency>
+
+
+        <!--Springcloud ailibaba sentinel -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
+        </dependency>
+        <!--openfeign  马上会用到接口调用-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sf</groupId>
+            <artifactId>cloud-api-commons</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.16</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+            <plugins>
+                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>

+ 12 - 0
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/src/main/java/com/sf/MainApp8401.java

@@ -0,0 +1,12 @@
+package com.sf;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+    @SpringBootApplication
+    @EnableDiscoveryClient
+    public class MainApp8401 {
+        public static void main(String[] args) {
+            SpringApplication.run(MainApp8401.class,args);
+        }
+    }

+ 84 - 0
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/src/main/java/com/sf/controller/FlowLimitController.java

@@ -0,0 +1,84 @@
+package com.sf.controller;
+
+import com.alibaba.csp.sentinel.annotation.SentinelResource;
+import com.alibaba.csp.sentinel.slots.block.BlockException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.concurrent.TimeUnit;
+
+@RestController
+@Slf4j
+public class FlowLimitController {
+    @GetMapping("/testA")
+    public String testA(){
+//        try {
+//            TimeUnit.MILLISECONDS.sleep(8000);
+//        } catch (InterruptedException e) {
+//            e.printStackTrace();
+//        }
+        return "-----testA";
+    }
+
+
+    @GetMapping("/testB")
+    public String testB(){
+        return "-----testB";
+    }
+
+
+    //测试testD  --演示熔断降级
+    @GetMapping("/testD")
+    public String testD(){
+//        暂停1秒
+        try {
+            TimeUnit.SECONDS.sleep(1);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        log.info("测试testD--熔断降级");
+        return "-----testD";
+    }
+
+    //sentinel的熔断和降级  -- 异常比例
+    @GetMapping("/testE")
+    public String testE(){
+        log.info("testD测试 - 异常比例");
+//        int age = 10/0;
+        return "--------testE";
+    }
+    //sentinel的熔断和降级  -- 异常数
+    @GetMapping("/testF")
+    public String testF(){
+        log.info("testF测试 - 异常数");
+//        int age = 10/0;
+        return "--------testF";
+    }
+
+    /**
+     * 设置p1为热点参数key
+     * @param p1
+     * @param p2
+     * @return
+     */
+    @GetMapping("/testHotKey")
+    @SentinelResource(value = "testHotKey",blockHandler = "deal_testHotKey")   //为了确定唯一的资源名称   如果触犯规则就会走兜底方法
+    public String testHotKey(@RequestParam(value = "p1",required = false) String p1,
+                             @RequestParam(value = "p2",required = false) String p2){
+        return "-----testtHotKey";
+    }
+
+    /**
+     * 处理热点key兜底的方法
+     * @param p1
+     * @param p2
+     * @param exception
+     * @return
+     */
+    public String deal_testHotKey(String p1, String p2, BlockException exception){
+        return "系统繁忙,请稍后再试";  //sentinel系统默认的提示:Blocked by Sentinel (flow limitingz)
+    }
+}
+

+ 22 - 0
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/src/main/resources/application.yml

@@ -0,0 +1,22 @@
+server:
+  port: 8401
+spring:
+  application:
+    name: cloudalibaba-sentinel-service
+  cloud:
+    nacos:
+      discovery:
+        #Nacos服务注册中心地址
+        server-addr: localhost:8848
+    sentinel:
+      transport:
+        #配置Sentinel dashboard.地址
+        dashboard: localhost:8080
+        #默认8719端口,假如被占用会自动从8719开始依次+1扫描,直至找到未被占用的端口
+        port: 8719
+
+    management:
+      endpoints:
+        web:
+          exposure:
+            include: '*'

+ 20 - 0
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/src/test/java/com/sf/AppTest.java

@@ -0,0 +1,20 @@
+package com.sf;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest 
+{
+    /**
+     * Rigorous Test :-)
+     */
+    @Test
+    public void shouldAnswerWithTrue()
+    {
+        assertTrue( true );
+    }
+}

+ 22 - 0
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/target/classes/application.yml

@@ -0,0 +1,22 @@
+server:
+  port: 8401
+spring:
+  application:
+    name: cloudalibaba-sentinel-service
+  cloud:
+    nacos:
+      discovery:
+        #Nacos服务注册中心地址
+        server-addr: localhost:8848
+    sentinel:
+      transport:
+        #配置Sentinel dashboard.地址
+        dashboard: localhost:8080
+        #默认8719端口,假如被占用会自动从8719开始依次+1扫描,直至找到未被占用的端口
+        port: 8719
+
+    management:
+      endpoints:
+        web:
+          exposure:
+            include: '*'

BIN
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/target/classes/com/sf/MainApp8401.class


BIN
springcloudalibabaVIP23/cloudalibaba-sentinel-service8401/target/classes/com/sf/controller/FlowLimitController.class


+ 1 - 0
springcloudalibabaVIP23/pom.xml

@@ -13,6 +13,7 @@
     <module>cloudalibaba-provider-payment9002</module>
       <module>cloudalibaba-provider-order83</module>
       <module>cloudalibaba-config-nacos-client3377</module>
+    <module>cloudalibaba-sentinel-service8401</module>
   </modules>
   <packaging>pom</packaging>
 

+ 24 - 21
vip23-rabbitmq2/.idea/workspace.xml

@@ -5,7 +5,9 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="336408f8-f508-43fa-862f-2a486d9e0671" name="Changes" comment="">
+      <change beforePath="$PROJECT_DIR$/../springcloudalibabaVIP23/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../springcloudalibabaVIP23/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/sf/Random.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/sf/Random.java" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -35,24 +37,24 @@
   <component name="ProjectViewState">
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent">{
-  &quot;keyToString&quot;: {
-    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
-    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
-    &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
-    &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
-    &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
-    &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
-    &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
-    &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
-    &quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
-    &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
-    &quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
-    &quot;settings.editor.selected.configurable&quot;: &quot;editor.preferences.fonts.default&quot;,
-    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "RunOnceActivity.OpenProjectViewOnStart": "true",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+    "WebServerToolWindowFactoryState": "false",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "project.structure.last.edited": "Modules",
+    "project.structure.proportion": "0.0",
+    "project.structure.side.proportion": "0.0",
+    "settings.editor.selected.configurable": "editor.preferences.fonts.default",
+    "vue.rearranger.settings.migration": "true"
   }
-}</component>
-  <component name="RunManager" selected="Application.PublishMessageLog">
+}]]></component>
+  <component name="RunManager" selected="Application.Random">
     <configuration name="PublishMessageLog" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
       <option name="MAIN_CLASS_NAME" value="com.sf.topic.PublishMessageLog" />
       <module name="vip23-rabbitmq2" />
@@ -66,12 +68,12 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="SubscribeMessageLog2" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.sf.route.SubscribeMessageLog2" />
+    <configuration name="Random" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
+      <option name="MAIN_CLASS_NAME" value="com.sf.Random" />
       <module name="vip23-rabbitmq2" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.sf.route.*" />
+          <option name="PATTERN" value="com.sf.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -120,11 +122,11 @@
     </configuration>
     <recent_temporary>
       <list>
+        <item itemvalue="Application.Random" />
         <item itemvalue="Application.PublishMessageLog" />
         <item itemvalue="Application.com.sf.topic.SubscribeMessageLog1" />
         <item itemvalue="Application.com.sf.topic.SubscribeMessageLog2" />
         <item itemvalue="Application.com.sf.route.PublishMessageLog" />
-        <item itemvalue="Application.SubscribeMessageLog2" />
       </list>
     </recent_temporary>
   </component>
@@ -139,6 +141,7 @@
       <workItem from="1694314978194" duration="11029000" />
       <workItem from="1694764083472" duration="1898000" />
       <workItem from="1694824511520" duration="16469000" />
+      <workItem from="1697709688869" duration="2591000" />
     </task>
     <servers />
   </component>

+ 3 - 2
vip23-rabbitmq2/src/main/java/com/sf/Random.java

@@ -11,8 +11,9 @@ public class Random {
                 "LYT","HKY","LYP","LXY","BJQ",
                 "NSH","HTK","LTZ","KWB","ZSJ",
                 "LMP","SBR","LYL","FB","SH",
-                "HCB","WTY","HQQ","TZT","AZT",
-                "LSY","CZY","SJH"
+                "HCB","WTY","TZT","AZT","TY",
+                "LSY","CZY","SJH","CD","ZZY",
+                "YK"
         };
         String[] ti = {"1","2","3","4","5","6","7","8"};
         System.out.println("幸运神===>"+student[(int)(Math.random()*student.length)]);

BIN
vip23-rabbitmq2/target/classes/com/sf/Random.class