TL;DR: The spring-boot-configuration-processor should check for (or fix) invalid configuration property names found in META-INF/additional-spring-configuration-metadata.json at compile time.
We currently have the following situation:
- There is an invalid property name in
META-INF/additional-spring-configuration-metadata.json of an external library.
- When the library is compiled,
spring-boot-configuration-processor copies the invalid property name over to META-INF/spring-configuration-metadata.json.
- Our application depends on both the library and
spring-boot-properties-migrator
- Our application fails to start with a
org.springframework.boot.context.properties.source.InvalidConfigurationPropertyNameException.
Since the library is an external dependency out of our control, our only option is to exclude spring-boot-properties-migrator in our application until the metadata is fixed by the author of the external library.
This problem could have been prevented, if the invalid name were already caught in Step 2.
I therefore propose that spring-boot-configuration-processor should check META-INF/additional-spring-configuration-metadata.json for invalid property names, before copying them over to META-INF/spring-configuration-metadata.json. It can then either fail the compilation or convert the properties to their correct form.
TL;DR: The
spring-boot-configuration-processorshould check for (or fix) invalid configuration property names found inMETA-INF/additional-spring-configuration-metadata.jsonat compile time.We currently have the following situation:
META-INF/additional-spring-configuration-metadata.jsonof an external library.spring-boot-configuration-processorcopies the invalid property name over toMETA-INF/spring-configuration-metadata.json.spring-boot-properties-migratororg.springframework.boot.context.properties.source.InvalidConfigurationPropertyNameException.Since the library is an external dependency out of our control, our only option is to exclude
spring-boot-properties-migratorin our application until the metadata is fixed by the author of the external library.This problem could have been prevented, if the invalid name were already caught in Step 2.
I therefore propose that
spring-boot-configuration-processorshould checkMETA-INF/additional-spring-configuration-metadata.jsonfor invalid property names, before copying them over toMETA-INF/spring-configuration-metadata.json. It can then either fail the compilation or convert the properties to their correct form.