// Path: autoconfigure/src/main/java/info/developerblog/spring/thrift/client/pool/ThriftClientKey.java
// @Builder
// @EqualsAndHashCode
// public class ThriftClientKey {
//     private Class<? extends TServiceClient> clazz;
//     private String serviceName;
//     private String path;
// 
//     public String getServiceName() {
//         if (StringUtils.isEmpty(serviceName))
//             return WordUtils.uncapitalize(clazz.getEnclosingClass().getSimpleName());
//         return serviceName;
//     }
// 
//     public Class<? extends TServiceClient> getClazz() {
//         return clazz;
//     }
// 
//     public String getPath() {
//         return path;
//     }
// }


import info.developerblog.spring.thrift.annotation.ThriftClient;
import info.developerblog.spring.thrift.client.pool.ThriftClientKey;
import java.lang.reflect.Field;
import java.lang.reflect.Parameter;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.function.Consumer;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.pool2.KeyedObjectPool;
import org.apache.thrift.TException;
import org.apache.thrift.TServiceClient;
import org.apache.thrift.protocol.TProtocol;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.util.ReflectionUtils;
package info.developerblog.spring.thrift.client;


@Component
@Configuration
@AutoConfigureAfter(PoolConfiguration.class)
public class ThriftClientBeanPostProcessorService {

    @Autowired
    private DefaultListableBeanFactory beanFactory;

    @Autowired
// Path: autoconfigure/src/main/java/info/developerblog/spring/thrift/client/pool/ThriftClientKey.java
// @Builder
// @EqualsAndHashCode
// public class ThriftClientKey {
//     private Class<? extends TServiceClient> clazz;
//     private String serviceName;
//     private String path;
// 
//     public String getServiceName() {
//         if (StringUtils.isEmpty(serviceName))
//             return WordUtils.uncapitalize(clazz.getEnclosingClass().getSimpleName());
//         return serviceName;
//     }
// 
//     public Class<? extends TServiceClient> getClazz() {
//         return clazz;
//     }
// 
//     public String getPath() {
//         return path;
//     }
// }


// Path: autoconfigure/src/main/java/info/developerblog/spring/thrift/client/ThriftClientBeanPostProcessorService.java
import info.developerblog.spring.thrift.annotation.ThriftClient;
import info.developerblog.spring.thrift.client.pool.ThriftClientKey;
import java.lang.reflect.Field;
import java.lang.reflect.Parameter;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.function.Consumer;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.pool2.KeyedObjectPool;
import org.apache.thrift.TException;
import org.apache.thrift.TServiceClient;
import org.apache.thrift.protocol.TProtocol;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.util.ReflectionUtils;

package info.developerblog.spring.thrift.client;


@Component
@Configuration
@AutoConfigureAfter(PoolConfiguration.class)
public class ThriftClientBeanPostProcessorService {

    @Autowired
    private DefaultListableBeanFactory beanFactory;

    @Autowired
    private KeyedObjectPool<ThriftClientKey, TServiceClient> thriftClientsPool;