-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The referenced property 'quarkus.uuid' has no default value. #1247
Comments
the default value is injected at runtime: https://github.com/quarkusio/quarkus/blob/e6423a404758f30e121506a311ec9a445cc27dc9/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigUtils.java#L67 @angelozerr how can we fix it?
|
If you do that, you will have 2
I think it is because there are 2 properties
We could improve the json descriptor with "merge" behavior instead of adding a new property to set a default value.
I think it is not a good idea if property from JAR is required to assign it (but I have not some usecase). |
Perhaps the proper fix is to use the ConfigPhase. package io.quarkus.runtime;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithName;
import java.net.URI;
import java.util.List;
import java.util.Optional;
@ConfigMapping(
prefix = "quarkus"
)
@ConfigRoot(
phase = ConfigPhase.RUN_TIME
)
public interface ConfigConfig {
...
Optional<String> uuid();
} If ConfigPhase == RUN_TIME, we should not validate the default value? |
In application.properties,
foo=${quarkus.uuid}
generates an error:But it's perfectly valid as per:
https://quarkus.io/guides/config-reference#accessing-a-generating-uuid
The text was updated successfully, but these errors were encountered: