mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
When CglibAopProxy validates the target class, it logs a WARN-level message for each public final method that implements an interface, suggesting to use interface-based JDK proxies instead. For final methods inherited from Spring's configuration callback interfaces (InitializingBean, DisposableBean, Aware sub-interfaces, Closeable, AutoCloseable) that recommendation is misleading: those methods are container-driven, are not advised by typical application pointcuts, and the user usually cannot make them non-final. The validation now only emits the WARN-level message when at least one user-defined interface declares the method. Methods inherited exclusively from configuration callback interfaces fall back to the existing DEBUG diagnostic. In addition, the isConfigurationCallbackInterface() method has been extracted from ProxyProcessorSupport into a static package-private method in AopProxyUtils with the same signature, and ProxyProcessorSupport and CglibAopProxy now delegate to the new shared static utility in AopProxyUtils. See gh-35365 Closes gh-36935 Signed-off-by: seonwoo_jung <laborlawseon@kap.kr> Signed-off-by: seonwooj0810 <seonwooj0810@gmail.com>