BeanNameViewResolver optionally configured with application context
With the XmlViewResolver you could have 2 instances of it and provide and XML application context to configure the views. This comes in handy when allowing 1 controller to render 2 different things like an Excel or a PDF depending on the requested Content-Type. Those are now deprecated and there is no real replacement for this.
Prior to this commit the BeanNameViewResolver would always resolve the views from the configuration it was defined in. Passing in a pre-configured application context would result in an error at runtime. Now it is possible to pass in an application context through the constructor which will be used to resolve the views from. Making it possible to have multiple instances and have the functionality as with multiple XmlViewResolver with a ContentNegotiatingViewResolver.
Closes: #29383