GRKumar
GRKumar

Reputation: 21

Property spring.profiles.include not loading local profile in spring boot 3.2.4

As part of spring boot version upgrade from 2.2.x to 3.2.4, I have updated the spring.profiles with spring.config.activate.on-profile and using spring.profiles.include in application.yml (multi-document yaml file) to add some active profiles according to a given profile as below,

application.yml

enter image description here

On clean build, I am not getting any compilation errors but local profile is not picking up. ./gradlew clean build --refresh-dependencies

Logs: 2025-01-10 20:23:13.379 INFO [APP_NAME_IS_UNDEFINED,,,,,,Admin-NO,dApp-Code-NO] 23196 --- [ Test worker] com.epam.auth.impl.DscAuthAppTest
: The following 12 profiles are active: "feign", "jackson", "logging", "redis", "oauth2", "cognito", "test"

Can we use spring.profiles.include property in spring boot 3.2.4?. If not, what should be the alternative.

For info, I am using "org.springframework.cloud:spring-cloud-dependencies:2023.0.3" in build.gradle.kts.

**

** Expected: 12:42:26.154 [Test worker] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true, server.port=0} 2025-01-13 12:42:30.531 INFO [dsc-auth-service,,,,,,Admin-NO,dApp-Code-NO] 4164 --- [ Test worker] com.epam.auth.impl.DscAuthAppTest : The following profiles are active: feign,jackson,logging,redis,gse,oauth2,cognito,seapi,bfo,db,appcode-clientId-mapping**,local,**test

But, as part of clean build, local is not picking up. Getting the below,

2025-01-10 23:26:45.659 INFO [APP_NAME_IS_UNDEFINED,,,,,,Admin-NO,dApp-Code-NO] 8216 --- [ Test worker] com.epam.auth.impl.DscAuthAppTest
: The following 12 profiles are active: "feign", "jackson", "logging", "redis", "gse", "oauth2", "cognito", "seapi", "bfo", "db", "appcode-clientId-map ping", "test"

Upvotes: 0

Views: 39

Answers (0)

Related Questions