Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring云配置服务器未连接到Github_Spring_Github_Port_Spring Cloud Config_Spring Cloud Config Server - Fatal编程技术网

Spring云配置服务器未连接到Github

Spring云配置服务器未连接到Github,spring,github,port,spring-cloud-config,spring-cloud-config-server,Spring,Github,Port,Spring Cloud Config,Spring Cloud Config Server,Spring云配置服务器未从Github读取。我已经做了好几天了。我正在尝试为Microservices应用程序设置一个集中式配置系统。从那以后它一直在失败。我使用的是Spring boot 2.4.5 这是云配置服务器属性 server.port=8888 spring.cloud.config.server.git.uri=https://github.com/username/environment-variable-repo.git spring.cloud.config.server.

Spring云配置服务器未从Github读取。我已经做了好几天了。我正在尝试为Microservices应用程序设置一个集中式配置系统。从那以后它一直在失败。我使用的是Spring boot 2.4.5

这是云配置服务器属性

server.port=8888
spring.cloud.config.server.git.uri=https://github.com/username/environment-variable-repo.git
spring.cloud.config.server.git.uri.force-pull=true
spring.cloud.config.server.git.uri.skip-ssl-validation=true
spring.cloud.config.server.git.uri.timeout=4
spring.cloud.config.server.git.uri.username=username
spring.cloud.config.server.git.uri.password=password
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.default-label=main
spring.cloud.config.server.enabled=true
health.config.enabled=false
spring.application.name=christdoes-spring-cloud-config-server
spring.application.name=christdoes-cloud-client-config
spring.config.import=optional:configserver:http://localhost:8888/
这是调用服务器的云客户端 bootstrap.properties

server.port=8888
spring.cloud.config.server.git.uri=https://github.com/username/environment-variable-repo.git
spring.cloud.config.server.git.uri.force-pull=true
spring.cloud.config.server.git.uri.skip-ssl-validation=true
spring.cloud.config.server.git.uri.timeout=4
spring.cloud.config.server.git.uri.username=username
spring.cloud.config.server.git.uri.password=password
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.default-label=main
spring.cloud.config.server.enabled=true
health.config.enabled=false
spring.application.name=christdoes-spring-cloud-config-server
spring.application.name=christdoes-cloud-client-config
spring.config.import=optional:configserver:http://localhost:8888/
这是配置客户端的application.properties

server.port=8100
management.endpoints.web.exposure.include=*
配置客户端上有2个错误:1。它在启动时使用端口8080,而配置的端口是8100。它不会从服务器中提取GitHub配置,尽管它主动连接到它。我确信这是因为服务器没有从GitHub中提取记录。当我使用postman查询服务器上的记录时,它显示它没有拉GitHub记录

使用邮递员调用url配置服务器响应

http://localhost:8888/christdoes-spring-cloud-config-server/default
{
    "name": "christdoes-spring-cloud-config-server",
    "profiles": [
        "default"
    ],
    "label": null,
    "version": "767df57a6b7d852e773fe13d417cb5ae08995b12",
    "state": null,
    "propertySources": []
}
这是客户端的日志,显示它没有看到GitHub的属性

2021-04-18 16:59:25.077  INFO 2254 --- [  restartedMain] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2021-04-18 16:59:25.867  INFO 2254 --- [  restartedMain] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=application, profiles=[default], label=null, version=767df57a6b7d852e773fe13d417cb5ae08995b12, state=null
2021-04-18 16:59:25.867  INFO 2254 --- [  restartedMain] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}]
2021-04-18 16:59:25.874  INFO 2254 --- [  restartedMain] c.ChristdoesCloudClientConfigApplication : No active profile set, falling back to default profiles: default
2021-04-18 16:59:26.472  INFO 2254 --- [  restartedMain] o.s.cloud.context.scope.GenericScope     : BeanFactory id=87146a27-1e3d-3ffb-a882-da3f9f232877
2021-04-18 16:59:26.897  INFO 2254 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-04-18 16:59:26.915  INFO 2254 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-04-18 16:59:26.915  INFO 2254 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.45]
2021-04-18 16:59:26.997  INFO 2254 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-04-18 16:59:26.997  INFO 2254 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1103 ms
2021-04-18 16:59:27.175  INFO 2254 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-04-18 16:59:27.334  INFO 2254 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2021-04-18 16:59:27.408  INFO 2254 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-04-18 16:59:27.423  INFO 2254 --- [  restartedMain] c.ChristdoesCloudClientConfigApplication : Started ChristdoesCloudClientConfigApplication in 3.421 seconds (JVM running for 4.149)
从该记录中,它显示另一个名为
application
的服务器的记录,而不是使用配置服务器名称。我不知道这个配置是从哪里来的。 请帮忙。这是我第六天讨论这个问题。太令人沮丧了