Spring 配置服务器正在重新加载本机属性

Spring Config Server reloading native properties

本机属性应该动态重新加载吗?例如。如果我有:

spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=classpath:/config-native

还有一个名为 sample.properties 的文件:

example-property="Hello from config server"

然后我将 example-属性 值更改为其他值,并在不重新启动配置服务器的情况下对配置服务器执行另一个 GET,我仍然看到显示的旧值。

这是预期的行为吗?如果我对非本地 (git) 设置执行相同操作,我可以看到更新的 属性 值。

我怀疑它与 classpath:/ 有关。如果它是 file:/,它将始终有效。使用类路径,东西可能会被类加载器缓存。