配置服务器配置:
spring:
application:
name: configserver
cloud:
config:
server:
git:
uri: https://gitee.com/will_gss/ConfigTest-Config
server:
port: 7001
客户端配置:
server:
port: 2100
spring:
application:
name: ConfigTest
cloud:
config:
profile: test
label: master
uri: http://localhost:7001/
所有的配置都在bootstrap.yml中。
Git上的目录结构见上图。
问题, 启动客户程序通过@Value注入属性失败,但是通过postman直接访问下面链接没问题:http://localhost:7001/ConfigTest/test。
可能是什么原因?谢谢!