In the course of addressing #29256, we identified a further case of ProxyFactory
usage without an explicit target ClassLoader
in MvcUriComponentsBuilder
, as well as code inspired by the latter in our ResolvableMethod
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 direct java.lang.reflect.Proxy
usage instead of going through the AOP ProxyFactory
(aligning with the direct use of CGLIB for non-interface proxies in MvcUriComponentsBuilder
, minimizing the invocation overhead and other AOP side effects).