spring-projects/spring-hateoas — pull request #206 by Vulcannis (2014-06-25 21:17:43+00:00)
Title: Set classloader for dummy method proxies.

The Enhancer used to create the proxy instances wasn't explicitly
setting the classloader to use, which meant by default the proxied
class's classloader was chosen. This is fine for controller classes, but
in some containers the return types for the controller may have a
classloader that doesn't have access to Spring, resulting in
ClassNotFoundExceptions. For example, returning a JAX-RS class JBoss.
Using the controller's classloader when proxying the return type solves
this. Fixes #136.