diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java index bb107dd7bd..26b3c67b3c 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java @@ -518,6 +518,9 @@ class AnnotationConfigApplicationContextTests { .withMemberCategories(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS)) .accepts(runtimeHints); + assertThat(RuntimeHintsPredicates.reflection().onType(CglibConfiguration.class) + .withMemberCategories(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_DECLARED_METHODS)) + .accepts(runtimeHints); } @Test diff --git a/spring-core/src/main/java/org/springframework/aot/hint/support/ClassHintUtils.java b/spring-core/src/main/java/org/springframework/aot/hint/support/ClassHintUtils.java index e38fdaaa97..ffe6c247c8 100644 --- a/spring-core/src/main/java/org/springframework/aot/hint/support/ClassHintUtils.java +++ b/spring-core/src/main/java/org/springframework/aot/hint/support/ClassHintUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ import org.springframework.util.ClassUtils; * on the JDK and CGLIB proxy facilities and their core conventions. * * @author Juergen Hoeller + * @author Sebastien Deleuze * @since 6.0.3 * @see org.springframework.aot.hint.ProxyHints * @see org.springframework.aot.hint.ReflectionHints @@ -46,7 +47,8 @@ public abstract class ClassHintUtils { MemberCategory.DECLARED_FIELDS); private static final Consumer asProxiedUserClass = hint -> - hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS); + hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, + MemberCategory.INVOKE_DECLARED_METHODS); /**