Description
Currently it is possible to define on a Map<String,String> config used in BUILD_AND_RUNTIME_FIXED a value on an undefined key.
When it is done on a know property a message is displayed enlightening the fact that it is not possible.
Sample reproducer:
- git clone https://github.com/dcdh/code-with-quarkus-config.git
- ./build.sh
- ./run.sh
You will see this message at application startup
sample-1 | 2026-03-14 21:14:25,935 WARN [io.quarkus.runtime.configuration.ConfigRecorder] (main) Build time property cannot be changed at runtime:
sample-1 | - config.properties.inside is set to 'redefined' but it is build time fixed to 'inside'. Did you change the property config.properties.inside after building the application?
sample-1 | - config.property is set to 'redefined' but it is build time fixed to 'inside'. Did you change the property config.property after building the application?
sample-1 | 2026-03-14 21:14:25,935 INFO [org.acme.MyConfigService] (main) inside
sample-1 | 2026-03-14 21:14:25,935 INFO [org.acme.MyConfigService] (main) inside=inside
sample-1 | 2026-03-14 21:14:25,935 INFO [org.acme.MyConfigService] (main) other=redefined
The config is defined this way
@ConfigMapping(prefix = "config")
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
public interface MyConfig {
/**
* property
*/
String property();
/**
* properties
*/
Map<String, String> properties();
}
The docker-compose used to launch the application is defined this way to overload the values
services:
sample:
image: sample/code-with-quarkus-config-sample:1.0.0-SNAPSHOT
environment:
- CONFIG_PROPERTY=redefined
- CONFIG_PROPERTIES_INSIDE=redefined
- CONFIG_PROPERTIES_OTHER=redefined
other which is an undefined key in application.properties is defined. Other are not overloaded.
Implementation ideas
It should impact the io.quarkus.runtime.configuration.ConfigRecorder
Description
Currently it is possible to define on a Map<String,String> config used in BUILD_AND_RUNTIME_FIXED a value on an undefined key.
When it is done on a know property a message is displayed enlightening the fact that it is not possible.
Sample reproducer:
You will see this message at application startup
The config is defined this way
The docker-compose used to launch the application is defined this way to overload the values
otherwhich is an undefined key in application.properties is defined. Other are not overloaded.Implementation ideas
It should impact the
io.quarkus.runtime.configuration.ConfigRecorder