Fix typo & Code optimization (#507)

pull/518/head
DerekYRC 2 years ago committed by GitHub
parent 3f672a8213
commit 940bfa0f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,3 +8,4 @@
- [Bugfix: update byte-buddy scope test to compile](https://github.com/Tencent/spring-cloud-tencent/pull/495)
- [feature:add @ConditionalOnConfigReflectEnabled annotation](https://github.com/Tencent/spring-cloud-tencent/pull/496)
- [Feature: zuul supports polaris router](https://github.com/Tencent/spring-cloud-tencent/pull/502)
- [Fix typo & Code optimization](https://github.com/Tencent/spring-cloud-tencent/pull/507)

@ -92,7 +92,7 @@ public class PolarisDiscoveryHandler {
*
* @return service list
*/
public ServicesResponse GetServices() {
public ServicesResponse getServices() {
String namespace = polarisDiscoveryProperties.getNamespace();
GetServicesRequest request = new GetServicesRequest();
request.setNamespace(namespace);

@ -67,10 +67,10 @@ public class PolarisServiceDiscovery {
* @throws PolarisException polarisException
*/
public List<String> getServices() throws PolarisException {
if (CollectionUtils.isEmpty(polarisDiscoveryHandler.GetServices().getServices())) {
if (CollectionUtils.isEmpty(polarisDiscoveryHandler.getServices().getServices())) {
return Collections.emptyList();
}
return polarisDiscoveryHandler.GetServices().getServices().stream()
return polarisDiscoveryHandler.getServices().getServices().stream()
.map(ServiceInfo::getService).collect(Collectors.toList());
}
}

@ -20,9 +20,9 @@ package com.tencent.cloud.polaris.ratelimit.config;
import com.tencent.cloud.polaris.context.ConditionalOnPolarisEnabled;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
/**
* Properties auto configuration of rate limit.
@ -31,7 +31,7 @@ import org.springframework.context.annotation.Import;
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnPolarisEnabled
@Import({PolarisRateLimitProperties.class})
@EnableConfigurationProperties(PolarisRateLimitProperties.class)
public class PolarisRateLimitPropertiesAutoConfiguration {
@Bean

@ -35,7 +35,7 @@ public final class RateLimitConstant {
/**
* Info of rate limit.
*/
public static String QUOTA_LIMITED_INFO = "The request is deny by rate limit because the throttling threshold is reached";
public static String QUOTA_LIMITED_INFO = "The request is denied by rate limit because the throttling threshold is reached";
/**
* The build in label method.

Loading…
Cancel
Save