File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -97,32 +97,10 @@ property names together.
9797
9898[source,properties]
9999----
100- # value cannot be left empty
101- quarkus.datasource."datasource-name".jdbc.url=value
100+ # value can be left empty but must be supplied by another source at runtime (or be an optional)
101+ quarkus.datasource."datasource-name".jdbc.url=
102102----
103103
104- If the value is not known until runtime, the key name can still be provided using the `io.smallrye.config.WithKeys` annotation.
105-
106- [source,java]
107- ----
108- @ConfigMapping(prefix = "com.example")
109- public interface ExampleConfig {
110-
111- @WithKeys(KeySupplier.class)
112- Map<String, String> deployments();
113-
114-
115- class KeySupplier implements Supplier<Iterable<String>> {
116- @Override
117- public Iterable<String> get() {
118- return List.of("fake-deployment-name-2", "fake-deployment-name-1");
119- }
120- }
121- }
122- ----
123-
124- However, a values for these keys **must** then be provided at runtime. Configuration key disambiguation is not supported for optional properties.
125-
126104[source,bash]
127105----
128106EXPORT QUARKUS_DATASOURCE__DATASOURCE_NAME__JDBC_URL=jdbc:postgresql://localhost:5432/database
You can’t perform that action at this time.
0 commit comments