AOP and use of redirect view can lead to unbounded caching in AbstractAutoProxyCreator [SPR-17045] #21583
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Andy Wilkinson opened SPR-17045 and commented
Please see the referenced Spring Boot issue for details. I have attached a minimal Boot app that reproduces the problem.
In short, the problem is that
InternalResourceViewResolver
callsAutowireCapableBeanFactory.initializeBean(Object existingBean, String beanName)
using the complete URL as thebeanName
. The bean name is then used byAbstractAutoProxyCreator.wrapIfNecessary(Object, String, Object)
as the key when it caches the fact that no advice applies to it. When the possible redirect URLs are unbounded this leads to an unbounded number of entries being added to the cache.Affects: 4.3.18
Reference URL: spring-projects/spring-boot#13771
Attachments:
Issue Links:
Referenced from: commits b8d2a16, ae1d500, 19e944b
Backported to: 4.3.19
1 votes, 4 watchers
The text was updated successfully, but these errors were encountered: