DEV Community

Manish
Manish

Posted on

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?

Top comments (0)