com.ijson.rest.proxy.RestServiceProxyFactoryBean Maven / Gradle / Ivy
package com.ijson.rest.proxy;
import lombok.Data;
import org.springframework.beans.factory.FactoryBean;
/**
* Created by cuiyongxu on 26/12/2016.
*/
@Data
public class RestServiceProxyFactoryBean implements FactoryBean {
private RestServiceProxyFactory factory;
private Class type;
@Override
public T getObject() throws Exception {
return factory.newRestServiceProxy(type);
}
@Override
public Class getObjectType() {
return type;
}
@Override
public boolean isSingleton() {
return true;
}
}