Skip to content

release 4.2.0

Latest

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