Sprinboot profiles not working as expected

mghildiy

Manish

Posted on July 13, 2024

Sprinboot profiles not working as expected

I have a question on profiles in springboot.

I have defined few profiles in my springboot app. One of them is 'localtest'. All profiles contain some common properties.

I run app as:

mvn spring-boot:run -Dspring.profiles.active=localtest

My expectation is that common properties have values picked up from profile 'localtest'. But I observe thats not the case.

For eg. port in 'localtest' is 8081, but application is instead available on port 8089 which is defined in some other profile.

What am I missing in my understanding of profiles?

💖 💪 🙅 🚩
mghildiy
Manish

Posted on July 13, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related