|
|
@@ -0,0 +1,29 @@
|
|
|
+package anyi.space.memberServer.controller;
|
|
|
+
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ProjectName: distributedSystemLearn
|
|
|
+ * @FileName: SentinelTestController
|
|
|
+ * @Author: 杨逸
|
|
|
+ * @Data:2025/9/16 14:36
|
|
|
+ * @Description: 测试Sentinel流控规则的控制器
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/sentinel")
|
|
|
+public class SentinelTestController {
|
|
|
+ @GetMapping("/t1")
|
|
|
+ public String t1(){
|
|
|
+ String msg = "t1被执行";
|
|
|
+ System.out.println(msg);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+ @GetMapping("/t2")
|
|
|
+ public String t2(){
|
|
|
+ String msg = "t2被执行";
|
|
|
+ System.out.println(msg);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+}
|