fix typo 'curcuit';remove unused variable. (#9901)

This commit is contained in:
云野 2023-02-07 10:24:14 +08:00 committed by GitHub
parent 8c90f892b4
commit 98d3da4a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View File

@ -17,7 +17,7 @@
package com.alibaba.nacos.config.server.configuration;
import com.alibaba.nacos.config.server.filter.NacosWebFilter;
import com.alibaba.nacos.config.server.filter.CurcuitFilter;
import com.alibaba.nacos.config.server.filter.CircuitFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
@ -50,7 +50,7 @@ public class NacosConfigConfiguration {
@Conditional(ConditionDistributedEmbedStorage.class)
@Bean
public FilterRegistrationBean transferToLeaderRegistration() {
FilterRegistrationBean<CurcuitFilter> registration = new FilterRegistrationBean<>();
FilterRegistrationBean<CircuitFilter> registration = new FilterRegistrationBean<>();
registration.setFilter(transferToLeader());
registration.addUrlPatterns("/v1/cs/*");
registration.setName("curcuitFilter");
@ -60,8 +60,8 @@ public class NacosConfigConfiguration {
@Conditional(ConditionDistributedEmbedStorage.class)
@Bean
public CurcuitFilter transferToLeader() {
return new CurcuitFilter();
public CircuitFilter transferToLeader() {
return new CircuitFilter();
}
}

View File

@ -30,7 +30,6 @@ import com.alibaba.nacos.consistency.cp.MetadataKey;
import com.alibaba.nacos.core.cluster.Member;
import com.alibaba.nacos.core.cluster.MemberMetaDataConstants;
import com.alibaba.nacos.core.cluster.ServerMemberManager;
import com.alibaba.nacos.core.code.ControllerMethodsCache;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.PostConstruct;
@ -54,7 +53,7 @@ import static com.alibaba.nacos.config.server.utils.LogUtil.DEFAULT_LOG;
*
* @author <a href="mailto:liaochuntao@live.com">liaochuntao</a>
*/
public class CurcuitFilter implements Filter {
public class CircuitFilter implements Filter {
private volatile boolean isDowngrading = false;
@ -66,9 +65,6 @@ public class CurcuitFilter implements Filter {
@Autowired
private CPProtocol protocol;
@Autowired
private ControllerMethodsCache controllerMethodsCache;
@PostConstruct
protected void init() {
listenerSelfInCluster();