Ensure Spring AOP generates JDK dynamic proxies for lambdas
Prior to this commit, if AOP proxy generation was configured with proxyTargetClass=true (which is the default behavior in recent versions of Spring Boot), beans implemented as lambda expressions or method references could not be proxied with CGLIB on Java 16 or higher without specifying `--add-opens java.base/java.lang=ALL-UNNAMED`. This commit addresses this shortcoming by ensuring that beans implemented as lambda expressions or method references are always proxied using a JDK dynamic proxy even if proxyTargetClass=true. Closes gh-27971
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
|
||||
<!-- Type Names -->
|
||||
<module name="TypeName">
|
||||
<property name="format" value="^[A-Z][a-zA-Z0-9_]*(?<!Test)$" />
|
||||
<property name="format" value="^[A-Z][a-zA-Z0-9_$]*(?<!Test)$" />
|
||||
<property name="tokens" value="CLASS_DEF" />
|
||||
<message key="name.invalidPattern"
|
||||
value="Class name ''{0}'' must not end with ''Test'' (checked pattern ''{1}'')." />
|
||||
|
||||
Reference in New Issue
Block a user