无法使用cloud config server从git存储库读取application.properties

xyhw6mcr  于 2021-07-26  发布在  Java
关注(0)|答案(0)|浏览(186)

一;我试图使用springbootcloudconfig服务器从git存储库中获取contents application.properties,我在那里保存了eureka服务器的url。我使用SpringBoot2.3.4版本和云依赖版本-hoxton.sr5。
配置服务器中的application.properties:

spring.application.name=config-server-git

spring.config.name=sb-employee-cloud-config-server-git

server.port=8888

spring.cloud.config.server.git.uri=https://github.com/Venkatesh-8203/sb-employee-cloud-config-server-git.git

# spring.cloud.config.server.git.clone-on-start=true

# spring.cloud.config.server.git.skip-ssl-validation=true

配置服务器启动:
2021-04-26 20:48:44.711信息14260---[main]m.employeecloudconfigserversbapplication:未设置活动配置文件,返回默认配置文件:默认
2021-04-26 20:48:45.486信息14260---[main]o.s.cloud.context.scope.genericscope:beanfactory id=53849fa2-bc07-3ec6-b44c-0fe3da5e9e6a
2021-04-26 20:48:45.933信息14260---[main]o.s.b.w.embedded.tomcat.tomcatwebserver:tomcat初始化端口:8888(http)
2021-04-26 20:48:45.943信息14260---[main]o.apache.catalina.core.standardservice:启动服务[tomcat]
2021-04-26 20:48:45.943 info 14260---[main]org.apache.catalina.core.standardengine:启动servlet引擎:[apache tomcat/9.0.38]
2021-04-26 20:48:46.072信息14260---[main]o.a.c.c.c.[tomcat].[localhost].[/]:初始化spring嵌入式webapplicationcontext
2021-04-26 20:48:46.072信息14260---[main]w.s.c.servletwebserverapplicationcontext:根webapplicationcontext:初始化在1345毫秒内完成
2021-04-26 20:48:46.427信息14260---[main]o.s.s.concurrent.threadpooltaskexecutor:初始化executorservice'applicationtaskexecutor'
2021-04-26 20:48:49.936信息14260---[main]o.s.b.a.e.web.endpointlinksresolver:在基本路径“/actuator”下暴露2个端点
2021-04-26 20:48:49.986信息14260---[main]o.s.b.w.embedded.tomcat.tomcatwebserver:tomcat在端口8888(http)上启动,上下文路径为“”
2021-04-26 20:48:50.199信息14260---[main]m.employeecloudconfigserversbapplication:在6.533秒内启动employeecloudconfigserversbapplication(jvm运行6.87秒)
2021-04-26 20:48:59.226信息14260---[nio-8888-exec-1]o.a.c.c.c.[tomcat].[localhost].[/]:初始化spring dispatcherservlet'dispatcherservlet'
2021-04-26 20:48:59.226信息14260---[nio-8888-exec-1]o.s.web.servlet.dispatcherservlet:初始化servlet'dispatcherservlet'
2021-04-26 20:48:59.234信息14260---[nio-8888-exec-1]o.s.web.servlet.dispatcherservlet:在8毫秒内完成初始化
当我点击网址时-http://localhost:8888/config server git/默认值

http://localhost:8888/sb employee cloud config server git/default,我得到“whitelabel error page”屏幕。
我的生产者服务中的application.properties:

spring.application.name=employee-producer

server.port=8080

# eureka.client.serviceUrl.defaultZone=http://localhost:8090/eureka

eureka.client.registerWithEureka=true

eureka.client.fetchRegistry=true

spring.cloud.config.uri=http://localhost:8888

spring.cloud.config.name=sb-employee-cloud-config-server-git

你能就如何克服这个问题提出建议吗。我正在尝试测试应用程序,因为我的官方应用程序中也有同样的问题。
谢谢,文卡泰什

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题