mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-26 08:59:09 +00:00
It is by design not possible to generate code that handles bean definitions with user-provided instance suppliers because the JVM does not allow to get a stable reference reusable at runtime on the lambda or method reference in the code generated AOT. Before this commit, such instance supplier was ignored. After this commit, an IllegalArgumentException is thrown, allowing projects to be aware this is not supported and enforce related refactorings. The related issue gh-29555 describes how this limitation could be relaxed in the future. Closes gh-29556