Spring cloud Spring云服务器始终为客户端返回null
我一直在尝试配置SpringCloud客户端服务器访问,但一直失败。我不知道还能做什么。我在客户端日志中注意到它没有绑定到GitHub服务器,而是。仅尝试访问客户端上的属性,并且始终为null 这是调用此端点时邮递员的输出-Spring cloud Spring云服务器始终为客户端返回null,spring-cloud,spring-cloud-config,Spring Cloud,Spring Cloud Config,我一直在尝试配置SpringCloud客户端服务器访问,但一直失败。我不知道还能做什么。我在客户端日志中注意到它没有绑定到GitHub服务器,而是。仅尝试访问客户端上的属性,并且始终为null 这是调用此端点时邮递员的输出- http://localhost:8110/access/propertyaccess 输出 { "name": null, "description": null } spring云服务器配置-applicati
http://localhost:8110/access/propertyaccess
输出
{
"name": null,
"description": null
}
spring云服务器配置-application.yml
spring:
application:
name: christdoes-spring-cloud-config-server
cloud:
config:
enabled: false
server:
bootstrap: true
git:
default-label: main
uri: https://github.com/ken4ward/environment-variable-repo.git
force-pull: true
skip-ssl-validation: true
timeout: 4
username: ken4ward
password: g201115@...Adei
clone-on-start: true
management:
security:
enanled: false
server:
port: ${port:8888}
spring:
application:
name: christdoes-spring-cloud-config-client
cloud:
config:
url: http://localhost:8888
server:
port: ${port:8110}
spring云客户端配置-application.yml
spring:
application:
name: christdoes-spring-cloud-config-server
cloud:
config:
enabled: false
server:
bootstrap: true
git:
default-label: main
uri: https://github.com/ken4ward/environment-variable-repo.git
force-pull: true
skip-ssl-validation: true
timeout: 4
username: ken4ward
password: g201115@...Adei
clone-on-start: true
management:
security:
enanled: false
server:
port: ${port:8888}
spring:
application:
name: christdoes-spring-cloud-config-client
cloud:
config:
url: http://localhost:8888
server:
port: ${port:8110}
客户端的客户端输出
2021-04-15 18:01:52.997 INFO 7502 --- [ restartedMain] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2021-04-15 18:01:54.123 INFO 7502 --- [ restartedMain] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=christdoes-spring-cloud-config-client, profiles=[default], label=null, version=767df57a6b7d852e773fe13d417cb5ae08995b12, state=null
2021-04-15 18:01:54.124 INFO 7502 --- [ restartedMain] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}]
2021-04-15 18:01:54.136 INFO 7502 --- [ restartedMain] stdoesSpringCloudConfigClientApplication : No active profile set, falling back to default profiles: default
2021-04-15 18:01:54.919 INFO 7502 --- [ restartedMain] o.s.cloud.context.scope.GenericScope : BeanFactory id=0adbfc3a-0343-3b40-8cc5-c17484b9ae11
2021-04-15 18:01:55.363 INFO 7502 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8110 (http)
2021-04-15 18:01:55.376 INFO 7502 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-04-15 18:01:55.377 INFO 7502 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.45]
2021-04-15 18:01:55.443 INFO 7502 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-04-15 18:01:55.443 INFO 7502 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1288 ms
2021-04-15 18:01:55.649 INFO 7502 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-04-15 18:01:55.821 WARN 7502 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : Unable to start LiveReload server
2021-04-15 18:01:55.913 INFO 7502 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8110 (http) with context path ''
2021-04-15 18:01:55.925 INFO 7502 --- [ restartedMain] stdoesSpringCloudConfigClientApplication : Started ChristdoesSpringCloudConfigClientApplication in 3.974 seconds (JVM running for 4.693)
2021-04-15 18:02:07.004 INFO 7502 --- [nio-8110-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-04-15 18:02:07.004 INFO 7502 --- [nio-8110-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-04-15 18:02:07.009 INFO 7502 --- [nio-8110-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 5 ms