Spring cloud config with github










0















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!










share|improve this question
























  • 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















0















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!










share|improve this question
























  • 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













0












0








0








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!










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












1 Answer
1






active

oldest

votes


















0














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: ######





share|improve this answer























  • 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










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
);



);













draft saved

draft discarded


















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









0














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: ######





share|improve this answer























  • 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















0














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: ######





share|improve this answer























  • 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













0












0








0







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: ######





share|improve this answer













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: ######






share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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



















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế