Skip to content

Commit e1904fb

Browse files
committed
Merge branch '2.4.x'
Closes gh-25500
2 parents 961a34a + cfac223 commit e1904fb

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
@@ -805,6 +805,18 @@ NOTE: Directories loaded using a wildcard are sorted alphabetically.
805805
If you need a different order, then you should list each location as a separate import
806806

807807

808+
Configuration trees can also be used for Docker secrets.
809+
When a Docker swarm service is granted access to a secret, the secret gets mounted into the container.
810+
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:
811+
812+
[source,yaml,indent=0,configprops,configblocks]
813+
----
814+
spring:
815+
config:
816+
import: "optional:configtree:/run/secrets/"
817+
----
818+
819+
808820

809821
[[boot-features-external-config-placeholders-in-properties]]
810822
==== Property Placeholders

0 commit comments

Comments
 (0)