Explicit target ClassLoader for interface-based proxies in MvcUriComponentsBuilder #29913
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
In the course of addressing #29256, we identified a further case of
ProxyFactory
usage without an explicit targetClassLoader
inMvcUriComponentsBuilder
, as well as code inspired by the latter in ourResolvableMethod
test utilities. Not only do those proxies have to be created in the same ClassLoader as the given user interface type, they also should be created through directjava.lang.reflect.Proxy
usage instead of going through the AOPProxyFactory
(aligning with the direct use of CGLIB for non-interface proxies inMvcUriComponentsBuilder
, minimizing the invocation overhead and other AOP side effects).The text was updated successfully, but these errors were encountered: