From 94fc24b6fbb3cf24098f52c73ca1baad0b9a4510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Thu, 19 Jan 2023 14:58:46 +0100 Subject: [PATCH] Document that bean instance suppliers are not supported with AOT/native Closes gh-29835 --- framework-docs/src/docs/asciidoc/core/core-aot.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/framework-docs/src/docs/asciidoc/core/core-aot.adoc b/framework-docs/src/docs/asciidoc/core/core-aot.adoc index bd6519ad9c9..f2a5f6a1061 100644 --- a/framework-docs/src/docs/asciidoc/core/core-aot.adoc +++ b/framework-docs/src/docs/asciidoc/core/core-aot.adoc @@ -17,6 +17,7 @@ Applying such optimizations early implies the following restrictions: * The beans defined in your application cannot change at runtime, meaning: ** `@Profile`, in particular profile-specific configuration needs to be chosen at build time. ** Environment properties that impact the presence of a bean (`@Conditional`) are only considered at build time. +* Bean definitions with instance suppliers (lambdas or method references) can't be transformed Ahead of Time (see https://github.com/spring-projects/spring-framework/issues/29555[spring-framework#29555] related issue) When these restrictions are in place, it becomes possible to perform ahead-of-time processing at build time and generate additional assets. A Spring AOT processed application typically generates: