From 5caf714ff47ed8a1c4c8a061071801ac7972de87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Fri, 22 Dec 2023 12:39:35 +0100 Subject: [PATCH] Document CGLIB restriction with methods that are effectively private Closes gh-28973 --- framework-docs/modules/ROOT/pages/core/aop-api/pfb.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework-docs/modules/ROOT/pages/core/aop-api/pfb.adoc b/framework-docs/modules/ROOT/pages/core/aop-api/pfb.adoc index 6927d154273..8d79b35bbb0 100644 --- a/framework-docs/modules/ROOT/pages/core/aop-api/pfb.adoc +++ b/framework-docs/modules/ROOT/pages/core/aop-api/pfb.adoc @@ -291,6 +291,8 @@ to consider: * `final` classes cannot be proxied, because they cannot be extended. * `final` methods cannot be advised, because they cannot be overridden. * `private` methods cannot be advised, because they cannot be overridden. +* Methods that are not visible, typically package private methods in a parent class +from a different package, cannot be advised because they are effectively private. NOTE: There is no need to add CGLIB to your classpath. CGLIB is repackaged and included in the `spring-core` JAR. In other words, CGLIB-based AOP works "out of the box", as do