Inspectopedia Help

Incorrect Spring component autowiring or injection on a static class member

Reports autowired and injected static methods/fields of Spring components.

Example:

@Component public class MyComponent { @Autowired static FooInterface foo; // reports "Don't autowire static members" }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Spring, 233.SNAPSHOT

Last modified: 13 July 2023