springcloud-community / springcloud-comment

0 stars 0 forks source link

forum/ #20

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Forum - Spring Cloud

Spring Cloud Forum

https://www.springcloud.io/forum/

GorbunovIvan commented 10 months ago

My config-server cannot connect to the local Git repository to read properties from it. application.properties of config-server looks like:

spring.cloud.config.server.git.uri=file:///D:/<path>/config-repo
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.default-label=main
spring.cloud.config.server.git.search-paths={application}

spring.profiles.active=native.

But when I run my app and go to "http://localhost:8888/eserver/default" the properties are just empty so it can't read them from the git repository "D://config-repo".

The "config-repo" folder has one folder named "eserver" which has "application.properties" with some properties.

I can't understand what i do wrong.

P.S. If I use remote GitHub (with the same content of config-repo) everything works fine.

GorbunovIvan commented 10 months ago

I left only spring.cloud.config.server.git.uri=file:///D://config-repo

And it worked