Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kworkbee opened this issue Nov 4, 2024 · 0 comments

Comments

@kworkbee
Copy link

kworkbee commented Nov 4, 2024

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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants