2015-04-28 54 views
0

我使用的示例項目 https://github.com/spring-cloud-samples/configserver使用春雲配置我看不到屬性/值和Git

我運行該項目,當我指出我的瀏覽器 http://localhost:8888/foo/development/

我得到以下值

{ 
 
"name": "foo", 
 
"profiles": [ 
 
"development" 
 
], 
 
"label": "master", 
 
"propertySources": [ 
 
{ 
 
"name": "overrides", 
 
"source": { 
 
"eureka.instance.nonSecurePort": "${CF_INSTANCE_PORT:${PORT:${server.port:8080}}}", 
 
"eureka.instance.hostname": "${CF_INSTANCE_IP:localhost}", 
 
"eureka.client.serviceUrl.defaultZone": "http://localhost:8761/eureka/" 
 
} 
 
} 
 
] 
 
}

但我沒有得到文件foo-development.properties中的值 https://github.com/spring-cloud-samples/config-repo

我是spring-cloud config的新手。有人可以指出屬性文件的值的正確方向嗎?

謝謝

回答

0

我在Ubuntu跑了配置服務器和一切工作有預期。這隻能在Windows中出現問題。我在Ubuntu獲得的輸出如下:

{ 
"name": "foo", 
"profiles": [ 
"development" 
], 
"label": "master", 
"propertySources": [ 
{ 
"name": "overrides", 
"source": { 
"eureka.instance.nonSecurePort": "${CF_INSTANCE_PORT:${PORT:${server.port:8080}}}", 
"eureka.instance.hostname": "${CF_INSTANCE_IP:localhost}", 
"eureka.client.serviceUrl.defaultZone": "http://localhost:8761/eureka/" 
} 
}, 
{ 
"name": "https://github.com/spring-cloud-samples/config-repo/foo-development.properties", 
"source": { 
"bar": "spam" 
} 
}, 
{ 
"name": "https://github.com/spring-cloud-samples/config-repo/foo.properties", 
"source": { 
"foo": "bar" 
} 
}, 
{ 
"name": "https://github.com/spring-cloud-samples/config-repo/application.yml", 
"source": { 
"info.description": "Spring Cloud Samples", 
"info.url": "https://github.com/spring-cloud-samples", 
"eureka.client.serviceUrl.defaultZone": "http://user:${eureka.password:}@localhost:8761/eureka/", 
"invalid.eureka.password": "<n/a>" 
} 
} 
] 
}