-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect MISSING_CONFIGURATION_ANNOTATION warning in vscode #1100
Comments
@sbreakey I'm happy you seem to find a false positive for this validation - we'll get in touch with some spring experts about this use case to correct this validation. (Likely we'd make an exclusion from the rule here) |
@BoykoAlex thanks for the tip, I will disable it for the time being, didn't even know that was possible. I've raised this over at spring cloud openfeign here too. I could be completely wrong, but my assumption is that they are "misusing" the @bean annotation in this scenario. |
@sbreakey is |
@BoykoAlex Hmm, yeah, I guess they are "lite mode" beans. As the
|
Fixed with 4093a0e. Config doesn't look like a. bean but it can have |
Describe the bug
I am getting a warning that I should annotate a particular class with
@Configuration
, as the class defines some@Bean
methods. The class in question is a Feign configuration class. I apply this class selectively to specific feign clients. If I add the annotation as suggested the class becomes "global" applying to all feign clients.Interestingly, if I remove the
@Bean
annotation theRequestInterceptor
will not be applied by Feign despite being explicitly set on the FeignClient, so I see 3 possibilities here:@Bean
and should not require that annotation when the config is explicitly applied, orTo Reproduce
Define a class like so:
This should yield a warning like:
Sample
Will provide one later, got to get on with the day job.
The text was updated successfully, but these errors were encountered: