Skip to content

Releases: LianjiaTech/retrofit-spring-boot-starter

release 4.2.1

Choose a tag to compare

@chentianming11 chentianming11 released this 08 Aug 06:41

default built-in ScalarsConverterFactory for String/primitive types

release 4.2.0

Choose a tag to compare

@chentianming11 chentianming11 released this 05 Jun 15:52

feat: add @timeout annotation and CallFactoryConfigurer SPI, remove @RetrofitClient timeout attributes

  • @timeout annotation supports METHOD and TYPE targets for class-level and method-level timeout configuration
  • Priority chain: method @timeout → class @timeout → GlobalTimeoutProperty
  • CallFactoryConfigurer SPI allows users to customize Call.Factory per @RetrofitClient interface
  • Remove connectTimeoutMs/readTimeoutMs/writeTimeoutMs/callTimeoutMs from @RetrofitClient (breaking change)
  • Class-level @timeout processed at OkHttpClient creation time (zero runtime overhead)
  • Method-level @timeout handled by TimeoutCallFactory with pre-created per-method OkHttpClient clones
  • TimeoutCallFactory only wraps when method-level @timeout exists (conditional, no extra layer otherwise)
  • Register @timeout reflection hint in RetrofitAotProcessor for GraalVM native image support
  • Update Actuator endpoint to resolve timeout from @timeout annotation instead of @RetrofitClient
  • Migrate all test interfaces from @RetrofitClient(timeoutMs=X) to @timeout(timeoutMs=X)
  • Add integration tests for CallFactoryConfigurer and method-level @timeout

release 2.6.0

Choose a tag to compare

@chentianming11 chentianming11 released this 05 Jun 15:52

feat: add @timeout annotation and CallFactoryConfigurer SPI, remove @RetrofitClient timeout attributes

  • @timeout annotation supports METHOD and TYPE targets for class-level and method-level timeout configuration
  • Priority chain: method @timeout → class @timeout → GlobalTimeoutProperty
  • CallFactoryConfigurer SPI allows users to customize Call.Factory per @RetrofitClient interface
  • Remove connectTimeoutMs/readTimeoutMs/writeTimeoutMs/callTimeoutMs from @RetrofitClient (breaking change)
  • Class-level @timeout processed at OkHttpClient creation time (zero runtime overhead)
  • Method-level @timeout handled by TimeoutCallFactory with pre-created per-method OkHttpClient clones
  • TimeoutCallFactory only wraps when method-level @timeout exists (conditional, no extra layer otherwise)
  • Migrate all test interfaces from @RetrofitClient(timeoutMs=X) to @timeout(timeoutMs=X)
  • Add integration tests for CallFactoryConfigurer and method-level @timeout

release 4.1.0

Choose a tag to compare

@chentianming11 chentianming11 released this 31 May 06:34

chore: release 4.1.0
Bump version from 4.0.8 to 4.1.0. This release adds four features:

  • Micrometer metrics integration (opt-in by default to avoid
    autoconfig ordering pitfalls).
  • Actuator endpoint exposing @RetrofitClient metadata.
  • Retry enhancements: exponential backoff, jitter and conditional
    retry triggering.
  • Spring AOT support for GraalVM native image out-of-the-box.

release 2.5.9

Choose a tag to compare

@chentianming11 chentianming11 released this 31 May 06:32

chore: bump to 2.5.9

  • feat: add exponential backoff, jitter and conditional retry triggering
    BackoffStrategy enum (FIXED/EXPONENTIAL); EXPONENTIAL uses base*2^attempt capped at maxIntervalMs;
    jitter factor [0,1] to avoid thundering herd;
    retryStatusCodes / retryExceptionClasses to narrow trigger conditions on top of RetryRule;

release 4.0.8

Choose a tag to compare

@chentianming11 chentianming11 released this 23 May 09:22

chore: harden global logging defaults and bump to 4.0.8

  • GlobalLogProperty: enable=false, logStrategy=BASIC, redactHeaders defaults to common credential headers (Authorization/Proxy-Authorization/Cookie/Set-Cookie). Avoids the prior enable=true + NONE no-op combo and prevents accidental credential leakage at HEADERS/BODY levels.
  • README/README_EN: sync default-config samples and document the override semantics of redact-headers.
  • pom: 4.0.7 -> 4.0.8.

BREAKING: projects relying on the previous enable=true default will need to set retrofit.global-log.enable=true explicitly to keep emitting HTTP logs.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

release 4.0.7

Choose a tag to compare

@chentianming11 chentianming11 released this 23 May 07:05

refactor: address design issues from review
主要变更:

  • RetrofitFactoryBean: setApplicationContext 不再 eager 解析 RetrofitConfigBean,
    改为 volatile + 单检懒解析,解除与用户自定义 RetrofitConfigBean 的初始化顺序耦合
  • AppContextUtils.getBeanOrNew: 反射 fallback 路径由 DEBUG 提升为 WARN,
    明确提示用户 @Autowired / @PostConstruct / https://github.com/value 不会生效
  • SourceOkHttpClientRegistry: HashMap → ConcurrentHashMap,
    避免 register/get 并发使用时的未定义行为
  • PathMatchInterceptorBdfProcessor: Class.forName(name) → ClassUtils.resolveClassName,
    仅做类型匹配不再触发候选类的
  • ClassPathRetrofitClientScanner: 优化加载失败日志,给出具体接口名 + 缺失依赖
    • 可操作建议;区分 ClassNotFoundException / LinkageError / 其它异常

新增集成测试覆盖:

  • AppContextUtilsWarnTest 验证反射 fallback 的 WARN 日志输出
  • BdfProcessorClassInitTest 验证 BdfProcessor 不触发 interceptor 类的

mvn test: 72/72 通过。

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

release 2.5.8

Choose a tag to compare

@chentianming11 chentianming11 released this 23 May 09:19

chore: harden global logging defaults and bump to 2.5.8

  • GlobalLogProperty: enable=false, logStrategy=BASIC, redactHeaders defaults to common credential headers (Authorization/Proxy-Authorization/Cookie/Set-Cookie). Avoids the prior enable=true + NONE no-op combo and prevents accidental credential leakage at HEADERS/BODY levels.
  • README/README_EN: sync default-config samples and document the override semantics of redact-headers.

BREAKING: projects relying on the previous enable=true default will need to set retrofit.global-log.enable=true explicitly to keep emitting HTTP logs.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

release 2.5.7

Choose a tag to compare

@chentianming11 chentianming11 released this 23 May 07:04

refactor: address design issues from review
主要变更:

  • RetrofitFactoryBean: setApplicationContext 不再 eager 解析 RetrofitConfigBean,
    改为 volatile + 单检懒解析,解除与用户自定义 RetrofitConfigBean 的初始化顺序耦合
  • AppContextUtils.getBeanOrNew: 反射 fallback 路径由 DEBUG 提升为 WARN,
    明确提示用户 @Autowired / @PostConstruct / https://github.com/value 不会生效
  • SourceOkHttpClientRegistry: HashMap → ConcurrentHashMap,
    避免 register/get 并发使用时的未定义行为
  • PathMatchInterceptorBdfProcessor: Class.forName(name) → ClassUtils.resolveClassName,
    仅做类型匹配不再触发候选类的
  • ClassPathRetrofitClientScanner: 优化加载失败日志,给出具体接口名 + 缺失依赖
    • 可操作建议;区分 ClassNotFoundException / LinkageError / 其它异常

新增集成测试覆盖:

  • AppContextUtilsWarnTest 验证反射 fallback 的 WARN 日志输出
  • BdfProcessorClassInitTest 验证 BdfProcessor 不触发 interceptor 类的

mvn test: 72/72 通过。

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

release 4.0.6

Choose a tag to compare

@chentianming11 chentianming11 released this 17 May 15:48

chore: release 4.0.6
主要变更:

  • 默认 logStrategy 由 BASIC 改为 NONE,对齐 OkHttp HttpLoggingInterceptor 默认行为
  • 全局共享 OkHttpClient:新增 retrofitBaseOkHttpClient Bean,所有 @RetrofitClient
    通过 newBuilder() 派生,复用 connectionPool 与 dispatcher;新增 DisposableBean
    钩子在 ApplicationContext 关闭时 shutdown dispatcher、evict 连接池、关闭 cache
  • BASE_URL_MAP 与 resourceNameCache 由 static 字段下沉为 RetrofitConfigBean /
    Degrade Bean 实例字段,避免多 ClassLoader / 多 ApplicationContext 场景下的
    Class 强引用泄漏
  • AppContextUtils.getBeanOrNew 仅捕获 NoSuchBeanDefinitionException,其他容器
    异常向上抛,避免 Bean 构造失败被静默降级为非托管实例
  • BeanExtendUtils.setProperty 反射写失败改为 warn 日志,不再静默吞
  • RetrofitUtils.readResponseBody 增加 8KB 上限,避免大响应体撑爆堆内存或污染日志
  • RetryInterceptor 资源管理重构,避免重复 close 与 body() 判空 anti-pattern
  • RetrofitException 异常 message 在 cause.getMessage() 为 null 时回退到类型名