Version Control Backend Filesystem Use

对于基于 VCS 的后端(git、svn),文件被签出或克隆到本地文件系统。默认情况下,它们会被放入系统临时目录中,并带有 config-repo- 前缀。例如,在 linux 中,它可能是 /tmp/config-repo-<randomid>。某些操作系统会 routinely clean out 临时目录。这可能会导致意外行为,例如丢失属性。为了避免这个问题,请通过将 spring.cloud.config.server.git.basedirspring.cloud.config.server.svn.basedir 设置为不在系统 temp 结构中驻留的目录来更改 Config Server 使用的目录。

With VCS-based backends (git, svn), files are checked out or cloned to the local filesystem. By default, they are put in the system temporary directory with a prefix of config-repo-. On linux, for example, it could be /tmp/config-repo-<randomid>. Some operating systems routinely clean out temporary directories. This can lead to unexpected behavior, such as missing properties. To avoid this problem, change the directory that Config Server uses by setting spring.cloud.config.server.git.basedir or spring.cloud.config.server.svn.basedir to a directory that does not reside in the system temp structure.