Invalid properties configuration
Reports unresolved and deprecated configuration keys and invalid values in Spring Boot application .properties
configuration files, which can lead to runtime errors.
Example:
If a deprecated configuration key has a replacement key, you can apply the 'Use replacement key' quick-fix.
Example:
After the quick-fix is applied:
If a configuration key is not defined in spring-configuration-metadata.json
, you can apply the 'Define configuration key' quick-fix that creates the META-INF/spring-additional-configuration-metadata.json
file and defines the necessary key.
Example:
After the quick-fix is applied, the following is added to META-INF/spring-additional-configuration-metadata.json
:
The inspection also highlights index notation errors in list and map configuration keys.
Example:
Use the Replacement tokens option to define tokens used for value placeholders in configuration files. These tokens are specified in the form beginToken*endToken
. Without the *
, the token is assumed to be the same for start and end.
For example, the default is @
for both start and end token, which enables you to define placeholders, such as some.property=@another.property@
.
Values inside the replacement token (@property.key@
) will not be highlighted.
Inspection options
Option | Type | Default |
---|---|---|
Replacement tokens | StringList | [@] |
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Spring Boot, 233.SNAPSHOT |