Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
279 views
in Technique[技术] by (71.8m points)

Why do repositories behave differently with Spring Cloud Config Server?

I have 2 public repositories on github and when using them from Spring Cloud Config Server, if works correctly in repository A but do nothing in repository B, I don't understand the difference, they are both public.

Repo A: https://github.com/guerrerog-git/spring-cloud-config

Repo B: https://github.com/guerrerog-git/curso-spring-cloud

The project and Application.java is the same.

Application.java

@SpringBootApplication
@EnableConfigServer
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

application.properties REPO A

server.port=8888
spring.cloud.config.server.git.uri=https://github.com/guerrerog-git/spring-cloud-config

Output Repo with A http://localhost:8888/parametros/default

{
   "name":"parametros",
   "profiles":[
      "default"
   ],
   "label":null,
   "version":"ed2a054d56ea2b76381e674e53064617529e0d65",
   "state":null,
   "propertySources":[
      {
         "name":"https://github.com/guerrerog-git/spring-cloud-config/file:C:\Users\escom\AppData\Local\Temp\config-repo-9786231318511930532\parametros.properties",
         "source":{
            "parametros.url":"http://www.tecgurus.net/default"
         }
      }
   ]
}

application.properties REPO B

server.port=8888
spring.cloud.config.server.git.uri=https://github.com/guerrerog-git/curso-spring-cloud

Output with Repo B same URL http://localhost:8888/parametros/default Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

There was an unexpected error (type=Not Found, status=404).

I don't understand what could be happening, any ideas?

question from:https://stackoverflow.com/questions/65647275/why-do-repositories-behave-differently-with-spring-cloud-config-server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...