zoukankan      html  css  js  c++  java
  • springcloud本地启动指定profile后错误If you are using the git profile, you need to set a Git URI in your configuration.

    配置中心指定profile后启动报错

    2020-04-22 14:35:48.306 ERROR 22828 --- [  restartedMain] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.config.server.config.CompositeConfiguration': Unsatisfied dependency expressed through method 'setEnvironmentRepos' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/DefaultRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: You need to configure a uri for the git repository.
    2020-04-22 14:35:48.334  INFO 22828 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
    2020-04-22 14:35:48.347  WARN 22828 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [spring.cloud.inetutils] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
     sun.misc.Unsafe.park(Native Method)
     java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
     java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
     java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
     java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
     java.lang.Thread.run(Thread.java:748)
    2020-04-22 14:35:48.350  WARN 22828 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
    2020-04-22 14:35:48.370  INFO 22828 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 
    
    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    2020-04-22 14:35:48.373 ERROR 22828 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 
    
    ***************************
    APPLICATION FAILED TO START
    ***************************
    
    Description:
    
    Invalid config server configuration.
    
    Action:
    
    If you are using the git profile, you need to set a Git URI in your configuration.  If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.

    解决办法:

    spring:
      cloud:
        config:
          server:
            git:
              uri:你的项目git路径
  • 相关阅读:
    SharePoint 2013 配置启用搜索服务
    SharePoint 2013 安装图解
    SharePoint 2013 添加Ribbon菜单
    SharePoint 入门介绍
    SharePoint 2007 管理中心TimerJob”计时器作业定义”页面报错
    SharePoint 2007 单列表模糊查询SPD定制
    SharePoint 开发TimerJob 介绍
    SharePoint 搜索爬网第三方网站配置
    SharePoint 2013 配置开发环境,需安装VS2012插件
    SharePoint 2013 中将 HTML文件转换为母版页
  • 原文地址:https://www.cnblogs.com/zyf-yxm/p/12751963.html
Copyright © 2011-2022 走看看