-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Oliver Drotbohm opened SPR-12079 and commented
To resolve a view, BeanNameViewResolver
checks for the presence of a bean with the view name and then looks it up using context.getBean(name, View.class)
.
This throws an exception if the view name is the name of an arbitrary Spring bean by accident, which is not a View
. I suggest to look up the bean instance without the type constraint and only return it if it really implements View
. Alternatively, the BeanNotOfRequiredTypeException
could be caught and handled by returning null
.
Affects: 3.2.10, 4.0.6, 4.1 RC1
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement