4

Spring Boot 2.1.6 バージョンで組み込み構成サーバーを作成しようとしています。スタートアップは次のように言って失敗します:


***************************
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.

私のbootstrap.ymlは次のようになりますが、春がネイティブプロファイルとは何かを明確に文書化するかどうかはわかりません。

---
spring:
  application:
    name : <name>
  datasource:
    url: <url>
    driver-class-name: oracle.jdbc.OracleDriver
    username: <username>
    password: <password>
    hikari:
      maximum-pool-size: 1
      connection-timeout: 5000
  cloud:
    config:
      server:
        bootstrap: true
        default-label: latest
        jdbc:
          sql: <sql>
          order: 0
  jpa:
    database: Oracle
    show-sql: true
    properties:
      hibernate:
        dialect: org.hibernate.dialect.Oracle10gDialect
  profiles:
    active:
    - jdbc
    - sit

アクティブなプロファイルのリストに「ネイティブ」を追加すると、エラーはなくなります。
しかし、git 以外の構成サーバーはデフォルトで「ネイティブ」であると書かれている Spring のドキュメントが見つかりません。
1.5.10 バージョンからアップグレードしただけでシステムが壊れたため、この春の 2.xx リリースでの追加はありますか。

したがって、私の質問は次のとおり
です。このネイティブ プロファイルは、Spring 2.xx リリースから必須であり、下位互換性がありません。または、アクティブなプロファイルのリストにこのネイティブ プロファイルを追加することをスキップできる回避策があります。
参考:
https ://cloud.spring.io/spring-cloud-config/2.1.x/multi/multi_spring-cloud-config.html

4

2 に答える 2