Skip to content

Clarify profile support when using AOT #35262

@mhalbritter

Description

@mhalbritter

We state here that "The Spring @Profile annotation and profile-specific configuration is not supported" when using AOT.

That's not quite right. Setting profiles which affect beans take no effect when running the AOT processed application. However, users can set a profile while building the application, which affects the AOT generated code. Profiles which only affect configuration properties (e.g. application-profile1.properties) are supported at runtime. @sdeleuze has demoed and documented something here.

There's also spring-projects/spring-framework#29844 which aims to improve the experience.

We should reword our documentation to correctly document the state of things and what's possible and what's not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions