0
因此,首先我有使用服務的項目,並使用配置服務向其他服務提供配置。如果我提供虛擬機參數:使用springboot native.search-locations進行服務配置:file:/// yaml
-Dspring.cloud.config.server.native.search-locations=file:///"D:\work projects\...\src\config\config-repo\local"
然後服務可以訪問配置。 我的問題是,我想使用文件applciation-local.yml內輪廓springboot配置(配置文件被激活)提供的配置:
spring.cloud.config.server.native.search-locations: file:///config/config-repo/local
服務配置返回空配置像 「{}」
file:///路徑有問題嗎?
你用'classpath:'而不是'file:///'試過了嗎? – alfcope