Incorrectly referenced bean in @Lookup annotation of Spring component
Reports incorrect bean references in the value
parameter of the @Lookup annotation.
Example:
@Component public class FooBean {...}
@Component public class OtherBean {...}
@Component public class MyComponent {
@Lookup("fooBean")
public FooBean fooBean() {...}
@Lookup("fooBean") // reports "Bean must be of 'OtherBean' type"
public OtherBean otherBean() {...}
@Lookup("unknown") // reports "Cannot resolve bean 'unknown'"
public OtherBean fooBean() {...}
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Spring, 233.SNAPSHOT |
Last modified: 13 July 2023