首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当使用Open 11时,Spring云配置服务器应用程序启动失败

当使用Open 11时,Spring云配置服务器应用程序启动失败
EN

Stack Overflow用户
提问于 2019-01-02 12:31:52
回答 3查看 2.7K关注 0票数 3

我正在尝试在我的项目中使用服务器。我正在使用openJdk 11。

我不使用git URI。我使用了几个yml文件,它们位于资源配置文件夹下。

我的错误越来越少

代码语言:javascript
复制
***************************
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.


Process finished with exit code 1
EN

回答 3

Stack Overflow用户

发布于 2019-01-03 15:23:15

如果您正在使用特性,则需要为启动服务提供适当的配置。默认配置文件是git,您需要向包含配置的存储库提供URI。

参考文件:

Spring从git存储库(必须提供)中提取远程客户端的配置,如下面的示例所示:

代码语言:javascript
复制
spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/spring-cloud-samples/config-repo

请参阅更多信息:start

票数 0
EN

Stack Overflow用户

发布于 2021-04-22 23:30:38

在配置服务器的application.property文件下面尝试

代码语言:javascript
复制
server.port = 8888

spring.cloud.config.server.native.search-locations=file:///C:/configprop/

spring.profiles.active=native
票数 0
EN

Stack Overflow用户

发布于 2022-08-11 09:31:37

您需要按照以下方式配置applicarion.yml:

代码语言:javascript
复制
server:
  port: 8888
spring:
  cloud:
    config:
      server:
        composite:
          - type: native
            search-locations: classpath:/shared
  security:
    user:
      password: 'your-any-password'
eureka:
  client:
    service-url:
      defaultZone: http://localhost:8761/eureka

而你对其他应用程序的信任则存在于资源/共享文件夹中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54006463

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档