mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
format code and change apache log to slf4j
This commit is contained in:
parent
ac382c9e3f
commit
ee4d67a6fa
@ -18,8 +18,8 @@ package org.springframework.cloud.alicloud.ans.endpoint;
|
||||
|
||||
import com.alibaba.ans.core.NamingService;
|
||||
import com.alibaba.ans.shaded.com.taobao.vipserver.client.core.Host;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
|
||||
import org.springframework.cloud.alicloud.context.ans.AnsProperties;
|
||||
|
||||
@ -34,7 +34,7 @@ import java.util.Set;
|
||||
*/
|
||||
public class AnsEndpoint extends AbstractEndpoint<Map<String, Object>> {
|
||||
|
||||
private static final Log log = LogFactory.getLog(AnsEndpoint.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(AnsEndpoint.class);
|
||||
|
||||
private AnsProperties ansProperties;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.springframework.cloud.alicloud.ans.migrate;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
|
||||
|
||||
import java.util.Map;
|
||||
@ -13,7 +13,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
public class MigrateEndpoint
|
||||
extends AbstractEndpoint<Map<String, ConcurrentMap<String, ServerWrapper>>> {
|
||||
|
||||
private static final Log log = LogFactory.getLog(MigrateEndpoint.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(MigrateEndpoint.class);
|
||||
|
||||
public MigrateEndpoint() {
|
||||
super("migrate");
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.springframework.cloud.alicloud.ans.migrate;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.ConditionContext;
|
||||
import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
|
||||
@ -10,7 +10,8 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
*/
|
||||
public class MigrateOnConditionClass extends MigrateOnCondition {
|
||||
|
||||
protected static final Log log = LogFactory.getLog(MigrateOnConditionClass.class);
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(MigrateOnConditionClass.class);
|
||||
|
||||
@Override
|
||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.springframework.cloud.alicloud.ans.migrate;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.ConditionContext;
|
||||
import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
|
||||
@ -9,8 +9,8 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
* @author pbting
|
||||
*/
|
||||
public class MigrateOnConditionMissingClass extends MigrateOnConditionClass {
|
||||
protected static final Log log = LogFactory
|
||||
.getLog(MigrateOnConditionMissingClass.class);
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(MigrateOnConditionMissingClass.class);
|
||||
|
||||
@Override
|
||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||
|
@ -7,8 +7,8 @@ import com.netflix.loadbalancer.ServerList;
|
||||
import org.aopalliance.aop.Advice;
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.aop.framework.ProxyFactory;
|
||||
|
||||
import java.util.*;
|
||||
@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
*/
|
||||
final class MigrateProxyManager {
|
||||
|
||||
private final static Log log = LogFactory.getLog(MigrateProxyManager.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(MigrateProxyManager.class);
|
||||
|
||||
private final static AtomicBoolean IS_PROXY = new AtomicBoolean(true);
|
||||
|
||||
|
@ -7,8 +7,8 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.context.named.NamedContextFactory;
|
||||
import org.springframework.cloud.endpoint.event.RefreshEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
@ -22,7 +22,8 @@ import com.netflix.loadbalancer.ILoadBalancer;
|
||||
*/
|
||||
@Component
|
||||
public class MigrateRefreshEventListener implements ApplicationListener<RefreshEvent> {
|
||||
private final static Log log = LogFactory.getLog(MigrateRefreshEventListener.class);
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(MigrateRefreshEventListener.class);
|
||||
|
||||
private final static int CHECK_INTERVAL = 1;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.springframework.cloud.alicloud.ans.migrate;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
@ -16,7 +16,7 @@ import com.netflix.loadbalancer.ServerList;
|
||||
public class MigrateRibbonBeanPostProcessor
|
||||
implements BeanPostProcessor, BeanClassLoaderAware {
|
||||
|
||||
protected static final Log log = LogFactory.getLog(MigrateOnCondition.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(MigrateOnCondition.class);
|
||||
|
||||
private ClassLoader classLoader;
|
||||
private IClientConfig clientConfig;
|
||||
|
@ -2,8 +2,8 @@ package org.springframework.cloud.alicloud.ans.migrate;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.cloud.alicloud.ans.registry.AnsRegistration;
|
||||
import org.springframework.cloud.alicloud.ans.registry.AnsServiceRegistry;
|
||||
@ -19,7 +19,8 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class MigrateServiceRegistry {
|
||||
|
||||
private static final Log log = LogFactory.getLog(MigrateServiceRegistry.class);
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(MigrateServiceRegistry.class);
|
||||
|
||||
private AtomicBoolean running = new AtomicBoolean(false);
|
||||
|
||||
|
@ -4,8 +4,8 @@ import com.netflix.client.config.IClientConfig;
|
||||
import com.netflix.loadbalancer.Server;
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.alicloud.ans.ribbon.AnsServer;
|
||||
import org.springframework.cloud.alicloud.ans.ribbon.AnsServerList;
|
||||
|
||||
@ -21,7 +21,8 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
*/
|
||||
class ServerListInvocationHandler implements MethodInterceptor {
|
||||
|
||||
private final static Log log = LogFactory.getLog(ServerListInvocationHandler.class);
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(ServerListInvocationHandler.class);
|
||||
|
||||
private final static ConcurrentMap<String, AnsServerList> SERVER_LIST_CONCURRENT_MAP = new ConcurrentHashMap<>();
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
package org.springframework.cloud.alicloud.ans.registry;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent;
|
||||
import org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration;
|
||||
import org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties;
|
||||
@ -35,7 +35,8 @@ import org.springframework.util.StringUtils;
|
||||
public class AnsAutoServiceRegistration
|
||||
extends AbstractAutoServiceRegistration<AnsRegistration> {
|
||||
|
||||
private static final Log log = LogFactory.getLog(AnsAutoServiceRegistration.class);
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(AnsAutoServiceRegistration.class);
|
||||
|
||||
private AnsRegistration registration;
|
||||
|
||||
|
@ -19,8 +19,8 @@ package org.springframework.cloud.alicloud.ans.registry;
|
||||
import com.alibaba.ans.core.NamingService;
|
||||
import com.alibaba.ans.shaded.com.taobao.vipserver.client.ipms.NodeReactor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.client.serviceregistry.ServiceRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -32,7 +32,7 @@ import java.util.Map;
|
||||
*/
|
||||
public class AnsServiceRegistry implements ServiceRegistry<AnsRegistration> {
|
||||
|
||||
private static Log log = LogFactory.getLog(AnsServiceRegistry.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(AnsServiceRegistry.class);
|
||||
|
||||
private static final String SEPARATOR = ",";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user