Closed
Description
Andy Wilkinson opened SPR-16568 and commented
CachedIntrospectionResults
currently caches the results for the Class
passed to forClass(Class)
, but not for the Class
passed to getBeanInfo(Class, boolean)
. If multiple classes passed to forClass(Class)
implement the same interface, multiple BeanInfo
instances will be created for that interface. For example, in a small Spring Boot sample application 27 BeanInfo
instances are created for org.springframework.core.Ordered
.
This doesn't appear to have too much impact in a small application, but as an application grows and there are more classes implementing the same interfaces, I wonder if caching would become increasingly beneficial?
Affects: 5.0.4
Issue Links:
- CachedIntrospectionResults should use BeanInfoFactory when introspecting implemented interfaces [SPR-16322] #20869 CachedIntrospectionResults should use BeanInfoFactory when introspecting implemented interfaces
- CachedIntrospectionResults should build complete descriptor for setter/getter across interface hierarchy [SPR-16978] #21516 CachedIntrospectionResults should build complete descriptor for setter/getter across interface hierarchy
Referenced from: commits a02aafe