Skip to content

Profiles retained during AOT processing are not configured in a native image #48408

@snicoll

Description

@snicoll

As found while debugging the sample in #48399, we're setting active profiles too late for the environment to take effect.

This results in application-specific files not to be considered unless the profile is explicitly provided on the command line. This goes in the way of what we did in framework to retain profiles that are enabled during AOT processing (see spring-projects/spring-framework#30421).

Because the activation of the profile is in framework, there's not much we can do as the environment is prepared before we initialize the context. We'll either have to document that as a limitation or provide a contribution of our own. An EnvironmentProcessor registered in spring.factories is probably the best we can do.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions