当前位置: 首页 > 知识库问答 >
问题:

Spring Cloud Config客户端不使用Spring boot 2.5.1

穆宏胜
2023-03-14

Spring cloud config client不使用Spring Boot2.5.1,而是使用2.5.0。

application-dev.yml

spring:
  config:
    import: configserver:http://localhost:8270/
  cloud:
    config:
      enabled: true

***************************
APPLICATION FAILED TO START
***************************

Description:

Config data location 'configserver:http://localhost:8270/' does not exist

Action:

Check that the value 'configserver:http://localhost:8270/' at class path resource [application-dev.yml] - 3:13 is correct, or prefix it with 'optional:'


...
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
...
...
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
...

共有1个答案

澹台志诚
2023-03-14

这是由于Spring Boot2.4.7和2.5.1中的回归。回归意味着当导入在特定于配置文件的文件中声明时,它将不起作用。在修复之前,您可以使用早期版本的引导,或者暂时将导入移到application.yml

 类似资料:
  • 我配置了一个由本地Git回购支持的Spring Cloud配置服务器,并创建了一个Spring Boot应用程序来使用来自SCC的配置。Git中的配置文件有两个纯文本属性和一个加密属性,: 解密是在客户端完成:在SCC服务器上有和我的Spring Boot应用程序包含: 密钥库。p12包含用于加密值。我使用keytool生成了密钥: Spring在上面的设置中解密客户端的值时是否使用混合RSA加密

  • 1. 创建 Maven 工程 服务端部署完毕后,我们可以新建一个 Maven 工程使用 SOFARegistry 提供的服务。首先新建一个 Maven 工程,然后引入如下依赖: <dependency> <groupId>com.alipay.sofa</groupId> <artifactId>registry-client-all</artifactId> <versi

  • 发起请求 让我们从导入aiohttp模块开始: import aiohttp 好啦,我们来尝试获取一个web页面。比如我们来获取下GitHub的时间轴。 async with aiohttp.ClientSession() as session: async with session.get('https://api.github.com/events') as resp:

  • 安装命令行工具 使用命令行工具 使用Python SDK 使用Web控制台

  • 使用 ActiveMQ 客户端进行连接的朴素尝试失败。[0] 阅读起来,推荐的方法似乎是使用可以从WebLogic服务器获得的客户端jar。[1] JMS不应该是一个标准吗,这样我就可以使用任何标准的JMS客户机进行连接了? [0]:当我尝试使用 ActiveMQ 客户端进行连接时,它失败,并显示“JMSException:连线格式协商超时:对等方未发送其连线格式”。 [1] 例如https://

  • 现代 Web 应用程序, 除了呈现并发送到浏览器的静态 HTML 页面外, 还包含 JavaScript, 用于通过操纵现有元素或通过 AJAX 加载新内容来修改浏览器中的页面。 本节介绍 Yii 提供的用于向网站添加 JavaScript 和 CSS 以及动态调整它们的方法。 注册脚本 使用 yii\web\View 对象时,可以动态注册前端脚本。 这里有两个专门的方法: registerJs(

  • 简介 TensorFlow Serving官方提供Inception模型的C++ gRPC client,可以参考 https://github.com/tensorflow/serving/blob/master/tensorflow_serving/example/inception_client.cc 。

  • 简介 Golang客户端要访问TensorFlow serving服务,需要实现gRPC客户端。 准备编译环境 go get -u github.com/golang/protobuf/{proto,protoc-gen-go} go get -u google.golang.org/grpc 完整例子 这里有一个导出模型使用Golang来访问模型的例子 https://github.com/t