Skip to content

Commit cfac223

Browse files
committed
Document configtree support for Docker secrets
Closes gh-25095
1 parent 5235047 commit cfac223

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc

+12
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,18 @@ NOTE: Directories loaded using a wildcard are sorted alphabetically.
875875
If you need a different order, then you should list each location as a separate import
876876

877877

878+
Configuration trees can also be used for Docker secrets.
879+
When a Docker swarm service is granted access to a secret, the secret gets mounted into the container.
880+
For example, if a secret named `db.password` is mounted at location `/run/secrets/`, you can make `db.password` available to the Spring environment using the following:
881+
882+
[source,yaml,indent=0,configprops,configblocks]
883+
----
884+
spring:
885+
config:
886+
import: "optional:configtree:/run/secrets/"
887+
----
888+
889+
878890

879891
[[boot-features-external-config-placeholders-in-properties]]
880892
==== Property Placeholders

0 commit comments

Comments
 (0)