Skip to content

SimpleReactiveDiscoveryClientAutoConfiguration specifies proxyBeanMethods=false but includes direct bean method invocations #850

@aclement

Description

@aclement

To support GraalVM we do require configuration classes support a proxyBeanMethods=false setup so that we don't need a CGLIB proxy for the config. We're recently added a mechanism that checks whether there are direct invocations of bean methods inside configurations that may behave cause different behaviour when there is no proxy (when the proxy exists the context enforces singleton patterns, without the proxy nothing is preventing multiple instances).

Today we got:

Caused by: java.lang.IllegalStateException: ERROR: in 'org.springframework.cloud.client.discovery.simple.reactive.SimpleReactiveDiscoveryClientAutoConfiguration' these methods
 are directly invoking methods marked @Bean: [simpleReactiveDiscoveryClient] - due to the enforced
 proxyBeanMethods=false for components in a native-image, please consider refactoring to use instance injection.

The simpleReactiveDiscoveryClient method is directly calling simpleReactiveDiscoveryProperties() when it should probably be getting it via parameter injection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions