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 https://github.com/spring-projects/spring-framework/issues/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.

Comment From: wilkinsona

I think we could do this in 3.0.x.