Skip to content

Commit c5a4776

Browse files
committed
Implement feedback
1 parent 7b90084 commit c5a4776

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

docs/src/main/asciidoc/config-reference.adoc

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff 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
----
128106
EXPORT QUARKUS_DATASOURCE__DATASOURCE_NAME__JDBC_URL=jdbc:postgresql://localhost:5432/database

0 commit comments

Comments
 (0)