Incorrect injecting of SpEL in a static field
Reports attempts to inject Spring Expression Language (SpEL) into static fields ('null' value is injected).
Example:
@Controller
public class MyController {
@Value("#{systemProperties['some.key']}") // Injection to static fields is not allowed
static String spelWithDefaultValue;
}
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SpringElStaticFieldInjectionInspection- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Spring, 243.23126 |
Last modified: 03 December 2024