Java
Incorrect injecting of SpEL in a static field
Warning
Security
New
Last modified: 03 December 2024Reports 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;
}
- 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
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Spring, 243.23126 |
Thanks for your feedback!
Was this page helpful?