You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No way to retrieve the actual target type using beanName [SPR-12704] #17301
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.
Activity
spring-projects-issues commentedon Jan 12, 2019
Bulk closing outdated, unresolved issues. Please, reopen if still relevant.