Skip to content

quick fix to add class to client configs #1802

Closed

Description

@martinlippert

In Spring Cloud OpenFeign and Spring Cloud LoadBalancer, we have the situation that there are config classes with @Bean methods that are not annotated with @Configuration. Instead, they are listed via @LoadBalanderClient(configuration = <config-class> (for example, the OpenFeign case looks similar).

There is already a validation that checks whether there is a class with @Bean methods but without @Configuration on it that takes into account the situation where the class doesn't have a @Configuration annotation, but is instead listed as configuration using a @LoadBalancerClient annotation.

We could introduce quick fixes for this which adds the class with the @Bean method to an existing @LoadBalanderConfig annotation config attribute on another class (same for OpenFeign).

It would be smart if the quick fix would guess if the @Bean method maybe belongs to a load balancer config (or open feign config), so that the quick fix shows up for those cases only.

Metadata

Metadata

Labels

for: eclipsefor: vscodetheme: validationtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions