Fix typo & Code optimization (#511)

* Fix typo & Code optimization

* update changelog
pull/519/head
DerekYRC 2 years ago committed by GitHub
parent 8eca6a4ac6
commit f0035d3f69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,3 +16,4 @@
- [Bugfix: update byte-buddy scope test to compile](https://github.com/Tencent/spring-cloud-tencent/pull/497)
- [Fix the code analysis error.](https://github.com/Tencent/spring-cloud-tencent/pull/499)
- [Optimize router label resolver spi](https://github.com/Tencent/spring-cloud-tencent/pull/503)
- [Fix typo & Code optimization](https://github.com/Tencent/spring-cloud-tencent/pull/511)

@ -89,7 +89,7 @@ public class PolarisDiscoveryHandler {
* Return all service for given namespace.
* @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