From 2f45dd096189d5c926cff5503120eeee38168285 Mon Sep 17 00:00:00 2001 From: Haotian Zhang <928016560@qq.com> Date: Thu, 7 Jul 2022 13:24:46 +0800 Subject: [PATCH] release:release 1.6.0-2020.0.5. (#408) --- pom.xml | 2 +- spring-cloud-tencent-dependencies/pom.xml | 4 ++-- .../service/callee/BusinessController.java | 15 ++++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index ff568384d..811c83c24 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ - 1.6.0-2020.0.5-SNAPSHOT + 1.6.0-2020.0.5 2020.0.5 diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index af9b3c69c..077707ba7 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -70,10 +70,10 @@ - 1.6.0-2020.0.5-SNAPSHOT + 1.6.0-2020.0.5 - 1.7.0-SNAPSHOT + 1.7.0 1.2.11 4.5.1 1.12.10 diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java b/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java index 17b14efa9..258f76454 100644 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java +++ b/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java @@ -46,24 +46,28 @@ public class BusinessController { private static final Logger LOG = LoggerFactory.getLogger(BusinessController.class); private final AtomicInteger index = new AtomicInteger(0); - + private final AtomicLong lastTimestamp = new AtomicLong(0); @Autowired private RestTemplate restTemplate; - @Value("${spring.application.name}") private String appName; - private AtomicLong lastTimestamp = new AtomicLong(0); - /** * Get information. + * * @return information */ - @RequestMapping("/info") + @GetMapping("/info") public String info() { return "hello world for ratelimit service " + index.incrementAndGet(); } + /** + * Get information 30 times per 1 second. + * + * @return result of 30 calls. + * @throws InterruptedException exception + */ @GetMapping("/invoke") public String invokeInfo() throws InterruptedException { StringBuffer builder = new StringBuffer(); @@ -92,6 +96,7 @@ public class BusinessController { /** * Get information with unirate. + * * @return information */ @GetMapping("/unirate")