You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (Jira)" <ji...@apache.org> on 2019/09/06 00:01:25 UTC
[jira] [Created] (JUNEAU-136) Juneau cannot reflect parameterized
types on Spring bean methods.
James Bognar created JUNEAU-136:
-----------------------------------
Summary: Juneau cannot reflect parameterized types on Spring bean methods.
Key: JUNEAU-136
URL: https://issues.apache.org/jira/browse/JUNEAU-136
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)