Skip to content

Broken OpenFeign with Kotlin 2.2 and default interface method #1274

@rouazana

Description

@rouazana

Describe the bug

While migrating to Kotlin 2.2, our OpenFeign calls stopped working. They were calling the default interface method instead of the OpenFeign proxy.
It happens with the following versions:

  • Spring Boot: 3.5.7
  • Spring Cloud: 2025.0.0
  • Kotlin: 2.2.0 (broken) / 1.9.25 (working)
  • Java: 21
  • Build Tool: Gradle 8.x with Kotlin DSL

Sample

I was able to write a complete reproducer (see commit history and README for full explanations):
https://codeberg.org/Malt/reproducer-feign-jvm-default-kotlin-2-2

Workaround

As explained in the README, the -Xjvm-default=disable compiler option restores the correct behaviour.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions