public class RetrofitFactoryBean<T> extends Object implements org.springframework.beans.factory.FactoryBean<T>, org.springframework.context.EnvironmentAware, org.springframework.context.ApplicationContextAware
| 限定符和类型 | 字段和说明 |
|---|---|
private org.springframework.context.ApplicationContext |
applicationContext |
private org.springframework.core.env.Environment |
environment |
private RetrofitConfigBean |
retrofitConfigBean |
private Class<T> |
retrofitInterface |
| 构造器和说明 |
|---|
RetrofitFactoryBean(Class<T> retrofitInterface) |
| 限定符和类型 | 方法和说明 |
|---|---|
private void |
addReactiveCallAdapterFactory(retrofit2.Retrofit.Builder retrofitBuilder) |
private okhttp3.OkHttpClient |
createOkHttpClient() |
private retrofit2.Retrofit |
createRetrofit() |
private List<okhttp3.Interceptor> |
findInterceptorByAnnotation() |
T |
getObject() |
Class<T> |
getObjectType() |
boolean |
isEnableDegrade(Class<?> retrofitInterface) |
boolean |
isSingleton() |
private boolean |
reactor3ClassExist() |
private boolean |
rxjava2ClassExist() |
private boolean |
rxjava3ClassExist() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
private org.springframework.core.env.Environment environment
private RetrofitConfigBean retrofitConfigBean
private org.springframework.context.ApplicationContext applicationContext
public boolean isEnableDegrade(Class<?> retrofitInterface)
public Class<T> getObjectType()
getObjectType 在接口中 org.springframework.beans.factory.FactoryBean<T>public boolean isSingleton()
isSingleton 在接口中 org.springframework.beans.factory.FactoryBean<T>private okhttp3.OkHttpClient createOkHttpClient()
private List<okhttp3.Interceptor> findInterceptorByAnnotation()
private retrofit2.Retrofit createRetrofit()
private void addReactiveCallAdapterFactory(retrofit2.Retrofit.Builder retrofitBuilder)
private boolean rxjava3ClassExist()
private boolean rxjava2ClassExist()
private boolean reactor3ClassExist()
public void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2024. All rights reserved.