juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bognar (Jira)" <j...@apache.org>
Subject [jira] [Created] (JUNEAU-137) Juneau cannot reflect parameterized types on Spring bean methods.
Date Fri, 06 Sep 2019 00:01:25 GMT
James Bognar created JUNEAU-137:
-----------------------------------

             Summary: Juneau cannot reflect parameterized types on Spring bean methods.
                 Key: JUNEAU-137
                 URL: https://issues.apache.org/jira/browse/JUNEAU-137
             Project: Juneau
          Issue Type: Task
          Components: Code
    Affects Versions: 8.1.0
            Reporter: James Bognar
            Assignee: James Bognar
             Fix For: 8.1.1


Juneau is not able to infer the MyBean type in the following annotated method of a Spring
bean: 

@RestMethod
public void doFoo(@Body List<MyBean> beans) \{...}

This is due to Spring using CGLIB with recompiles classes at runtime and replaces them with
proxies that do not support parameterized types (it's an unsupported library from 2007).  

I found that CGLIB proxies can be detected by checking for "$$EnhancerBySpringCGLIB$$" in
the class name and then finding the "getTargetClass" on the resource object to get the underlying
proxy class.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message