因为有流量之后控制台才能看到限流的情况,所以用官方给的限流测试代码修改一下,放到Springboot启动类中,触发限流规则的初始化。SpringBootApplicationpublicclassDemoApplication{publicstaticvoidmain(String[]args){SpringApplication.run(DemoApplication.class,args);newFlowQpsDemo();}}测试限流代码:publicclassFlowQpsDemo{privatestaticfinalStringKEY"testres";privatestaticAtomicIntegerpassnewAtomicInteger();...