fix typo 'curcuit';remove unused variable. (#9901)
This commit is contained in:
parent
8c90f892b4
commit
98d3da4a48
@ -17,7 +17,7 @@
|
|||||||
package com.alibaba.nacos.config.server.configuration;
|
package com.alibaba.nacos.config.server.configuration;
|
||||||
|
|
||||||
import com.alibaba.nacos.config.server.filter.NacosWebFilter;
|
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.boot.web.servlet.FilterRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
@ -50,7 +50,7 @@ public class NacosConfigConfiguration {
|
|||||||
@Conditional(ConditionDistributedEmbedStorage.class)
|
@Conditional(ConditionDistributedEmbedStorage.class)
|
||||||
@Bean
|
@Bean
|
||||||
public FilterRegistrationBean transferToLeaderRegistration() {
|
public FilterRegistrationBean transferToLeaderRegistration() {
|
||||||
FilterRegistrationBean<CurcuitFilter> registration = new FilterRegistrationBean<>();
|
FilterRegistrationBean<CircuitFilter> registration = new FilterRegistrationBean<>();
|
||||||
registration.setFilter(transferToLeader());
|
registration.setFilter(transferToLeader());
|
||||||
registration.addUrlPatterns("/v1/cs/*");
|
registration.addUrlPatterns("/v1/cs/*");
|
||||||
registration.setName("curcuitFilter");
|
registration.setName("curcuitFilter");
|
||||||
@ -60,8 +60,8 @@ public class NacosConfigConfiguration {
|
|||||||
|
|
||||||
@Conditional(ConditionDistributedEmbedStorage.class)
|
@Conditional(ConditionDistributedEmbedStorage.class)
|
||||||
@Bean
|
@Bean
|
||||||
public CurcuitFilter transferToLeader() {
|
public CircuitFilter transferToLeader() {
|
||||||
return new CurcuitFilter();
|
return new CircuitFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import com.alibaba.nacos.consistency.cp.MetadataKey;
|
|||||||
import com.alibaba.nacos.core.cluster.Member;
|
import com.alibaba.nacos.core.cluster.Member;
|
||||||
import com.alibaba.nacos.core.cluster.MemberMetaDataConstants;
|
import com.alibaba.nacos.core.cluster.MemberMetaDataConstants;
|
||||||
import com.alibaba.nacos.core.cluster.ServerMemberManager;
|
import com.alibaba.nacos.core.cluster.ServerMemberManager;
|
||||||
import com.alibaba.nacos.core.code.ControllerMethodsCache;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
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>
|
* @author <a href="mailto:liaochuntao@live.com">liaochuntao</a>
|
||||||
*/
|
*/
|
||||||
public class CurcuitFilter implements Filter {
|
public class CircuitFilter implements Filter {
|
||||||
|
|
||||||
private volatile boolean isDowngrading = false;
|
private volatile boolean isDowngrading = false;
|
||||||
|
|
||||||
@ -66,9 +65,6 @@ public class CurcuitFilter implements Filter {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CPProtocol protocol;
|
private CPProtocol protocol;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ControllerMethodsCache controllerMethodsCache;
|
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
protected void init() {
|
protected void init() {
|
||||||
listenerSelfInCluster();
|
listenerSelfInCluster();
|
Loading…
Reference in New Issue
Block a user