From 16ec08aec882e47b0e8285e647705866d7406f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= <141109+sdeleuze@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:47:25 +0100 Subject: [PATCH] Provide a more actionable CGLIB error message with native Closes gh-34370 --- .../org/springframework/cglib/core/AbstractClassGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java b/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java index e0be6d38cbd..0301591b2b6 100644 --- a/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java +++ b/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java @@ -360,7 +360,7 @@ abstract public class AbstractClassGenerator implements ClassGenerator { // SPRING PATCH BEGIN if (inNativeImage) { throw new UnsupportedOperationException("CGLIB runtime enhancement not supported on native image. " + - "Make sure to include a pre-generated class on the classpath instead: " + getClassName()); + "Make sure to enable Spring AOT processing in order to pre-generate this class: " + getClassName()); } // SPRING PATCH END byte[] b = strategy.generate(this);