-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning processAn outdated, unresolved issue that's closed in bulk as part of a cleaning process
Description
Stéphane Nicoll opened SPR-12704 and commented
ApplicationContext#getType(String beanName) returns the Class<?> of the bean exposed with the specified name.
When the bean is wrapped in a proxy, it returns the class of the proxy which does not help much. The way to workaround that for the moment is to get the bean instance (getBean(beanName) and use AopUtils.getTargetClass() with the result. Unfortunately the whole point of calling getType is to use the meta-data of the bean factory and not early initialize the bean instance.
It would be nice if the target type would be exposed as well.
Issue Links:
- @Order should get detected in case of proxyTargetClass=false as well [SPR-12636] #17237
@Ordershould get detected in case of proxyTargetClass=false as well ("is depended on by")
1 votes, 3 watchers
Metadata
Metadata
Assignees
Labels
status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning processAn outdated, unresolved issue that's closed in bulk as part of a cleaning process