Spring cloud config with github
I just got a problem when using spring cloud config with github.I'm not really good at English,I hope I could explained this problem clearly.And thinks
you guys for reading this.
The problem is about Spring Cloud Config with github.And it happened when I added some more folds and config files to the repository where hold all my cloud config files.
First,I set uri,searchPaths,username,password under the cloud.config.server.git in the application.yml file belonged to config server.
Then,I push all my config files to the github.I called the parent repository ConfigRepo,and in this repo,I got two folders named A and B.
The construction is just look like this.
-ConfigRepo
-A
-A.yml
-B
-B.yml
Finally,I set the other applications' application name in their bootstrap.yml which means A and B.
After I've done that,I started my applications.All the client servers could find the config server and got the correct config yml file by the url.For example, the client A get its configs from
github.com/user/ConfigRepo/A/A.yml
But cause I needed to add a new application C,so I created a new folder C to hold and save the Application C's config file and push it to the github.
I finished the config work of application C just like above and start the it.But I found the url represent config file has changed.I mean,it suppose to be
github.com/user/ConfigRepo/C/C.yml
But in fact,the url of github has changed to
github.com/user/ConfigRepo/tree/master/C/C.yml
The worse thing is,not only the url represents C's config file has changed,all the url represents config file in the ConfigRepo has changed.
And no matter how i change the uri or searchPaths under cloud.config.server.git,the client server's log shows me that the name of located property source's mapPropertySource always is
github.com/user/ConfigRepo/C/C.yml
As a result,i cant get any configs except null so all the applications cant be started even include the A and B which could started before i pushed the new config file to the github.
So,what should I do?Is a way to make github get rid of /tree/master in the url?Or how to config my config server to support my project?
Thanks Again!
github spring-cloud spring-cloud-config
add a comment |
I just got a problem when using spring cloud config with github.I'm not really good at English,I hope I could explained this problem clearly.And thinks
you guys for reading this.
The problem is about Spring Cloud Config with github.And it happened when I added some more folds and config files to the repository where hold all my cloud config files.
First,I set uri,searchPaths,username,password under the cloud.config.server.git in the application.yml file belonged to config server.
Then,I push all my config files to the github.I called the parent repository ConfigRepo,and in this repo,I got two folders named A and B.
The construction is just look like this.
-ConfigRepo
-A
-A.yml
-B
-B.yml
Finally,I set the other applications' application name in their bootstrap.yml which means A and B.
After I've done that,I started my applications.All the client servers could find the config server and got the correct config yml file by the url.For example, the client A get its configs from
github.com/user/ConfigRepo/A/A.yml
But cause I needed to add a new application C,so I created a new folder C to hold and save the Application C's config file and push it to the github.
I finished the config work of application C just like above and start the it.But I found the url represent config file has changed.I mean,it suppose to be
github.com/user/ConfigRepo/C/C.yml
But in fact,the url of github has changed to
github.com/user/ConfigRepo/tree/master/C/C.yml
The worse thing is,not only the url represents C's config file has changed,all the url represents config file in the ConfigRepo has changed.
And no matter how i change the uri or searchPaths under cloud.config.server.git,the client server's log shows me that the name of located property source's mapPropertySource always is
github.com/user/ConfigRepo/C/C.yml
As a result,i cant get any configs except null so all the applications cant be started even include the A and B which could started before i pushed the new config file to the github.
So,what should I do?Is a way to make github get rid of /tree/master in the url?Or how to config my config server to support my project?
Thanks Again!
github spring-cloud spring-cloud-config
Sorry,it was my fault. Spring Cloud Config has done its work well,there was something spelling mistake in my yml file.Spring Cloud Config could retrieve informations from github no matter if the url contains the "tree/master" part and there is no need for it to log that part.Thanks again!
– AokoQin
Nov 13 '18 at 2:09
add a comment |
I just got a problem when using spring cloud config with github.I'm not really good at English,I hope I could explained this problem clearly.And thinks
you guys for reading this.
The problem is about Spring Cloud Config with github.And it happened when I added some more folds and config files to the repository where hold all my cloud config files.
First,I set uri,searchPaths,username,password under the cloud.config.server.git in the application.yml file belonged to config server.
Then,I push all my config files to the github.I called the parent repository ConfigRepo,and in this repo,I got two folders named A and B.
The construction is just look like this.
-ConfigRepo
-A
-A.yml
-B
-B.yml
Finally,I set the other applications' application name in their bootstrap.yml which means A and B.
After I've done that,I started my applications.All the client servers could find the config server and got the correct config yml file by the url.For example, the client A get its configs from
github.com/user/ConfigRepo/A/A.yml
But cause I needed to add a new application C,so I created a new folder C to hold and save the Application C's config file and push it to the github.
I finished the config work of application C just like above and start the it.But I found the url represent config file has changed.I mean,it suppose to be
github.com/user/ConfigRepo/C/C.yml
But in fact,the url of github has changed to
github.com/user/ConfigRepo/tree/master/C/C.yml
The worse thing is,not only the url represents C's config file has changed,all the url represents config file in the ConfigRepo has changed.
And no matter how i change the uri or searchPaths under cloud.config.server.git,the client server's log shows me that the name of located property source's mapPropertySource always is
github.com/user/ConfigRepo/C/C.yml
As a result,i cant get any configs except null so all the applications cant be started even include the A and B which could started before i pushed the new config file to the github.
So,what should I do?Is a way to make github get rid of /tree/master in the url?Or how to config my config server to support my project?
Thanks Again!
github spring-cloud spring-cloud-config
I just got a problem when using spring cloud config with github.I'm not really good at English,I hope I could explained this problem clearly.And thinks
you guys for reading this.
The problem is about Spring Cloud Config with github.And it happened when I added some more folds and config files to the repository where hold all my cloud config files.
First,I set uri,searchPaths,username,password under the cloud.config.server.git in the application.yml file belonged to config server.
Then,I push all my config files to the github.I called the parent repository ConfigRepo,and in this repo,I got two folders named A and B.
The construction is just look like this.
-ConfigRepo
-A
-A.yml
-B
-B.yml
Finally,I set the other applications' application name in their bootstrap.yml which means A and B.
After I've done that,I started my applications.All the client servers could find the config server and got the correct config yml file by the url.For example, the client A get its configs from
github.com/user/ConfigRepo/A/A.yml
But cause I needed to add a new application C,so I created a new folder C to hold and save the Application C's config file and push it to the github.
I finished the config work of application C just like above and start the it.But I found the url represent config file has changed.I mean,it suppose to be
github.com/user/ConfigRepo/C/C.yml
But in fact,the url of github has changed to
github.com/user/ConfigRepo/tree/master/C/C.yml
The worse thing is,not only the url represents C's config file has changed,all the url represents config file in the ConfigRepo has changed.
And no matter how i change the uri or searchPaths under cloud.config.server.git,the client server's log shows me that the name of located property source's mapPropertySource always is
github.com/user/ConfigRepo/C/C.yml
As a result,i cant get any configs except null so all the applications cant be started even include the A and B which could started before i pushed the new config file to the github.
So,what should I do?Is a way to make github get rid of /tree/master in the url?Or how to config my config server to support my project?
Thanks Again!
github spring-cloud spring-cloud-config
github spring-cloud spring-cloud-config
edited Nov 12 '18 at 7:33
AokoQin
asked Nov 12 '18 at 7:26
AokoQinAokoQin
794
794
Sorry,it was my fault. Spring Cloud Config has done its work well,there was something spelling mistake in my yml file.Spring Cloud Config could retrieve informations from github no matter if the url contains the "tree/master" part and there is no need for it to log that part.Thanks again!
– AokoQin
Nov 13 '18 at 2:09
add a comment |
Sorry,it was my fault. Spring Cloud Config has done its work well,there was something spelling mistake in my yml file.Spring Cloud Config could retrieve informations from github no matter if the url contains the "tree/master" part and there is no need for it to log that part.Thanks again!
– AokoQin
Nov 13 '18 at 2:09
Sorry,it was my fault. Spring Cloud Config has done its work well,there was something spelling mistake in my yml file.Spring Cloud Config could retrieve informations from github no matter if the url contains the "tree/master" part and there is no need for it to log that part.Thanks again!
– AokoQin
Nov 13 '18 at 2:09
Sorry,it was my fault. Spring Cloud Config has done its work well,there was something spelling mistake in my yml file.Spring Cloud Config could retrieve informations from github no matter if the url contains the "tree/master" part and there is no need for it to log that part.Thanks again!
– AokoQin
Nov 13 '18 at 2:09
add a comment |
1 Answer
1
active
oldest
votes
We are doing micro service project and used below configuration for retrieve configuration from GitHub. you need to add label as master to retrieve configuration.
spring:
application:
name: ####
profiles:
active: ####
cloud:
enable: true
config:
uri: $CONFIG_SERVER_URL
failFast: true
retry:
maxAttempts: 20
label: master
profile: ######
Hi,bro,thanks for answering. I thought the label "master" is provided by Spring defaultly so I didn't add it to my client server config.But after i changed it just like you said,it still cant work.Seems like it still try to send request to "github.com/user/ConfigRepo/C/C.yml",but this url is not exist actually.For some reason,after I add some more files to that repository of my github,the url has changed to "github.com/user/ConfigRepo/tree/master/C/C.yml". In other words,before I add those file to the repository,the url didnt contain the "tree/master" part and all the application work well....
– AokoQin
Nov 12 '18 at 10:02
Checked my code again,it's was my fault.There was a spelling mistake in my yml file but all my attention was caught by the log of url.Thanks again bro.
– AokoQin
Nov 13 '18 at 2:12
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257534%2fspring-cloud-config-with-github%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
We are doing micro service project and used below configuration for retrieve configuration from GitHub. you need to add label as master to retrieve configuration.
spring:
application:
name: ####
profiles:
active: ####
cloud:
enable: true
config:
uri: $CONFIG_SERVER_URL
failFast: true
retry:
maxAttempts: 20
label: master
profile: ######
Hi,bro,thanks for answering. I thought the label "master" is provided by Spring defaultly so I didn't add it to my client server config.But after i changed it just like you said,it still cant work.Seems like it still try to send request to "github.com/user/ConfigRepo/C/C.yml",but this url is not exist actually.For some reason,after I add some more files to that repository of my github,the url has changed to "github.com/user/ConfigRepo/tree/master/C/C.yml". In other words,before I add those file to the repository,the url didnt contain the "tree/master" part and all the application work well....
– AokoQin
Nov 12 '18 at 10:02
Checked my code again,it's was my fault.There was a spelling mistake in my yml file but all my attention was caught by the log of url.Thanks again bro.
– AokoQin
Nov 13 '18 at 2:12
add a comment |
We are doing micro service project and used below configuration for retrieve configuration from GitHub. you need to add label as master to retrieve configuration.
spring:
application:
name: ####
profiles:
active: ####
cloud:
enable: true
config:
uri: $CONFIG_SERVER_URL
failFast: true
retry:
maxAttempts: 20
label: master
profile: ######
Hi,bro,thanks for answering. I thought the label "master" is provided by Spring defaultly so I didn't add it to my client server config.But after i changed it just like you said,it still cant work.Seems like it still try to send request to "github.com/user/ConfigRepo/C/C.yml",but this url is not exist actually.For some reason,after I add some more files to that repository of my github,the url has changed to "github.com/user/ConfigRepo/tree/master/C/C.yml". In other words,before I add those file to the repository,the url didnt contain the "tree/master" part and all the application work well....
– AokoQin
Nov 12 '18 at 10:02
Checked my code again,it's was my fault.There was a spelling mistake in my yml file but all my attention was caught by the log of url.Thanks again bro.
– AokoQin
Nov 13 '18 at 2:12
add a comment |
We are doing micro service project and used below configuration for retrieve configuration from GitHub. you need to add label as master to retrieve configuration.
spring:
application:
name: ####
profiles:
active: ####
cloud:
enable: true
config:
uri: $CONFIG_SERVER_URL
failFast: true
retry:
maxAttempts: 20
label: master
profile: ######
We are doing micro service project and used below configuration for retrieve configuration from GitHub. you need to add label as master to retrieve configuration.
spring:
application:
name: ####
profiles:
active: ####
cloud:
enable: true
config:
uri: $CONFIG_SERVER_URL
failFast: true
retry:
maxAttempts: 20
label: master
profile: ######
answered Nov 12 '18 at 8:57
WGSSAMINTHAWGSSAMINTHA
10210
10210
Hi,bro,thanks for answering. I thought the label "master" is provided by Spring defaultly so I didn't add it to my client server config.But after i changed it just like you said,it still cant work.Seems like it still try to send request to "github.com/user/ConfigRepo/C/C.yml",but this url is not exist actually.For some reason,after I add some more files to that repository of my github,the url has changed to "github.com/user/ConfigRepo/tree/master/C/C.yml". In other words,before I add those file to the repository,the url didnt contain the "tree/master" part and all the application work well....
– AokoQin
Nov 12 '18 at 10:02
Checked my code again,it's was my fault.There was a spelling mistake in my yml file but all my attention was caught by the log of url.Thanks again bro.
– AokoQin
Nov 13 '18 at 2:12
add a comment |
Hi,bro,thanks for answering. I thought the label "master" is provided by Spring defaultly so I didn't add it to my client server config.But after i changed it just like you said,it still cant work.Seems like it still try to send request to "github.com/user/ConfigRepo/C/C.yml",but this url is not exist actually.For some reason,after I add some more files to that repository of my github,the url has changed to "github.com/user/ConfigRepo/tree/master/C/C.yml". In other words,before I add those file to the repository,the url didnt contain the "tree/master" part and all the application work well....
– AokoQin
Nov 12 '18 at 10:02
Checked my code again,it's was my fault.There was a spelling mistake in my yml file but all my attention was caught by the log of url.Thanks again bro.
– AokoQin
Nov 13 '18 at 2:12
Hi,bro,thanks for answering. I thought the label "master" is provided by Spring defaultly so I didn't add it to my client server config.But after i changed it just like you said,it still cant work.Seems like it still try to send request to "github.com/user/ConfigRepo/C/C.yml",but this url is not exist actually.For some reason,after I add some more files to that repository of my github,the url has changed to "github.com/user/ConfigRepo/tree/master/C/C.yml". In other words,before I add those file to the repository,the url didnt contain the "tree/master" part and all the application work well....
– AokoQin
Nov 12 '18 at 10:02
Hi,bro,thanks for answering. I thought the label "master" is provided by Spring defaultly so I didn't add it to my client server config.But after i changed it just like you said,it still cant work.Seems like it still try to send request to "github.com/user/ConfigRepo/C/C.yml",but this url is not exist actually.For some reason,after I add some more files to that repository of my github,the url has changed to "github.com/user/ConfigRepo/tree/master/C/C.yml". In other words,before I add those file to the repository,the url didnt contain the "tree/master" part and all the application work well....
– AokoQin
Nov 12 '18 at 10:02
Checked my code again,it's was my fault.There was a spelling mistake in my yml file but all my attention was caught by the log of url.Thanks again bro.
– AokoQin
Nov 13 '18 at 2:12
Checked my code again,it's was my fault.There was a spelling mistake in my yml file but all my attention was caught by the log of url.Thanks again bro.
– AokoQin
Nov 13 '18 at 2:12
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257534%2fspring-cloud-config-with-github%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Sorry,it was my fault. Spring Cloud Config has done its work well,there was something spelling mistake in my yml file.Spring Cloud Config could retrieve informations from github no matter if the url contains the "tree/master" part and there is no need for it to log that part.Thanks again!
– AokoQin
Nov 13 '18 at 2:09