Skip to content

If I use bootstrap.yml, I don't understand why it adopts properties that are mapped to the last defined value 'spring.config.activate.on-profile'. #1416

Closed
@kworkbee

Description

@kworkbee

Describe the bug
Boot 3.X / Cloud 2022.0.4 (or 2023.0.X) ~

If I use bootstrap.yml, I don't understand why it adopts properties that are mapped to the last defined value 'spring.config.activate.on-profile'.

When running the application, it doesn't seem to care what the 'spring.profiles.active' value has.

spring:
  cloud:
    config:
      fail-fast: true
  profiles:
    active: local
  application:
    name: test
---
spring:
  config.activate.on-profile: prd
  cloud:
    config:
      uri: ***
      profile: prd,${hostname:hostname},prd-${hostname:hostname},tomcat,tomcat-prd,tomcat-prd-${hostname:hostname}
---
spring:
  config.activate.on-profile: prd,type1
  cloud:
    config:
      uri: ***
      profile: prd,${hostname:hostname},prd-${hostname:hostname},tomcat,tomcat-prd-type1,tomcat-prd-type1-${hostname:hostname}
---
spring:
  config.activate.on-profile: prd,type2
  cloud:
    config:
      uri: ***
      profile: prd,${hostname:hostname},prd-${hostname:hostname},tomcat,tomcat-prd-type2,tomcat-prd-type2-${hostname:hostname}
---
spring:
  config.activate.on-profile: prd,type3
  cloud:
    config:
      uri: ***
      profile: prd,${hostname:hostname},prd-${hostname:hostname},tomcat,tomcat-prd-type3,tomcat-prd-type3-${hostname:hostname}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions