I have posted my problem here. Can someone please check. https://stackoverflow.com/questions/74646071/spring-boot-3-profile-property-values-getting-overridden-in-boostrap-yaml

Comment From: scottfrederick

Please do not cross-post between StackOverflow and GitHub issues. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. The SO post should be sufficient to get help.

Comment From: miriyalajanardhan

Reposting the complete problem here, as this looks be a bug.

Recently trying to upgrade to Spring Boot 3, but facing property issue. My bootstrap yml looks like below, When I run with profile dev, the configserver url is always getting connected to qa, basically whichever is declared last.

This is working fine in 2.7.X version of spring, but not in spring boot 3

spring:
  application:
    name: appname
  profiles:
    active: ${spring.profiles.active}
    include:
      - global-defaults
    group:
      dev:
        - config-server-dev
        - cloud-config-dev
      qa:
        - config-server-qa
        - cloud-config-qa

---

spring:
  config:
    activate:
      on-profile: config-server-dev
  cloud:
    config:
      enabled: true
      uri: http://urltoconfigserverdev
      label: master

---

spring:
  config:
    activate:
      on-profile: config-server-qa
  cloud:
    config:
      enabled: true
      uri: http://urltoconfigserverqa
      label: master

---

But the same is working fine if add the property migration pom dependency. which is not suggested for higher environments.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-properties-migrator</artifactId>
    <scope>runtime</scope>
</dependency>

I don't see any WARN in the startup logs either.

Comment From: scottfrederick

My bootstrap yml looks like below

bootstrap.yml is not enabled by default as of Spring Cloud 2020.0. Are you enabling it explicitly?

Since there are several dependencies involved here, including Spring Cloud, and likely some custom configuration, we need a complete minimal sample that reproduces the problem in order to spend more time investigating. You can share it with us by pushing it to a separate repository on GitHub or by zipping it and attaching it to this issue.

Comment From: miriyalajanardhan

Looks like the issue is gone, when I removed the spring devtools dependency.