These are chat archives for spring-cloud/spring-cloud

1st
Apr 2017
LIN
@magixsource
Apr 01 2017 02:57
Hi,I know get yml value from config-server by http://config-server:port/application-profile.yml, but i can't get properties value by http://config-server:port/application/profiles, Could somebody point me ?

This is application.yml in config-server:

spring:
  cloud:
    config:
      server:
        git:
          uri: http://192.168.14.46:10080/linpeng/apple-config-repo.git
          searchPaths: '{application}'

and apple-config-repo.git like this:
```
├─config
|--config-server.yml
├─gateway
|--gateway-server.yml
├─police
|--db.properties
|--hibernate.properties
|-- ....
└─registry
|--registry-server.yml

LIN
@magixsource
Apr 01 2017 03:03
├─config
       |--config-server.yml
├─gateway
       |--gateway-server.yml
├─police
       |--db.properties
       |--hibernate.properties
       |-- ....
└─registry
       |--registry-server.yml
i want to get values of /police/db.properties,thanks
LIN
@magixsource
Apr 01 2017 03:14
i have try http://localhost:8888/police/hibernate to get values, but response has no properties value
{"name":"police","profiles":["hibernate"],"label":"master","version":"130311c78055eb4545ffcef6fdbbfda2f5694d04","state":null,"propertySources":[{"name":"http://192.168.14.46:10080/linpeng/apple-config-repo.git/application.yml","source":{"eureka.client.serviceUrl.defaultZone":"http://localhost:8761/eureka/"}}]}
ok, i rename hibernate.properties to police-hibernate.properties, and request /police/hibernate and i got values.
LIN
@magixsource
Apr 01 2017 03:20
should i not rename all properties and i can get values ?
Dave Syer
@dsyer
Apr 01 2017 09:09
It depends what you want the properties for
http://localhost:8888/police/default/master/hibernate.properties will serve up the properties file (see the section in the user guide about plain text files).