3 Star 33 Fork 16

抓猪 / kmvvm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ServiceApi.kt 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
抓猪 提交于 2022-11-06 22:48 . 优化ksp
package com.catchpig.annotation
import com.catchpig.annotation.interfaces.SerializationConverter
import okhttp3.Interceptor
import kotlin.reflect.KClass
/**
* http的service注解
* @author catchpig
* @date 2019/10/29 00:29
*/
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS)
annotation class ServiceApi(
/**
* 域名或者IP
*/
val baseUrl: String,
/**
* 接收数据转换器(封装的有基类{@see BaseResponseBodyConverter}
* 也可以不使用基类,直接继承{@see SerializationConverter}
*/
val responseConverter: KClass<out SerializationConverter<*, *>>,
/**
* 连接超时时间(毫秒)
*/
val connectTimeout: Long = 5000,
/**
* 读取超时时间(毫秒)
*/
val readTimeout: Long = 5000,
/**
* 拦截器
*/
val interceptors: Array<KClass<out Interceptor>> = [],
/**
* debug模式的拦截器
*/
val debugInterceptors: Array<KClass<out Interceptor>> = [],
/**
* 是否使用RxJava做转换器
*/
val rxJava: Boolean = false
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Android
1
https://gitee.com/catchpig/kmvvm.git
git@gitee.com:catchpig/kmvvm.git
catchpig
kmvvm
kmvvm
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891