Skip to content

@MockBean annotation does not find existing bean created through @FeignClient #38348

@trcoelho

Description

@trcoelho

Using Spring Boot 3.1.5 version @MockBean annotation works charming, however after trying Spring Boot 3.2.0-SNAPSHOT - without any code change, looks like it stopped working as it not mocking @Autowired objects anymore.

It looks like it affects FeignClients classes (annotated by @FeignClient).

Is this a known issue?

Let me know if you have any question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fixstatus: invalidAn issue that we don't feel is valid

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions