Skip to content

AOP and use of redirect view can lead to unbounded caching in AbstractAutoProxyCreator [SPR-17045] #21583

Closed
@spring-projects-issues

Description

@spring-projects-issues

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 calls AutowireCapableBeanFactory.initializeBean(Object existingBean, String beanName) using the complete URL as the beanName. The bean name is then used by AbstractAutoProxyCreator.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

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions