Skip to content

Different profile precedence introduced in Spring Boot 2.0.2 - include profile now comes after active. #13151

@davidmelia

Description

@davidmelia

Hi,

Spring Boot 2.0.2 has introduced a different profile precedence when compared to previous versions.

It's very easy to reproduce.

  1. In STS create a Spring boot starter web project
  2. In the application.properties add spring.profiles.include=include
  3. Build and run the project with java -jar ./target/somename-0.0.1-SNAPSHOT.jar --spring.profiles.active=active
  4. You will see The following profiles are active: active,include which is incorrect

Downgrade the pom to Spring boot 2.0.1 and run again and you will see
The following profiles are active: include,active
which is correct

Spring boot 1.5.13 also gives The following profiles are active: include,active

I'm using Java 8 & MacOS High Sierra.

Thanks

Metadata

Metadata

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions