Deprecate AutowireCapableBeanFactory.createBean(Class, int, boolean)

Includes consistent usage of createBean(Class) in SpringBeanJobFactory and SpringBeanContainer.

Closes gh-30345
See gh-29855
See gh-30041
This commit is contained in:
Juergen Hoeller
2023-04-30 23:07:29 +02:00
parent 4d15b58ca4
commit d39e44c209
6 changed files with 10 additions and 14 deletions

View File

@@ -915,12 +915,12 @@ public class DispatcherServlet extends FrameworkServlet {
/**
* Create a default strategy.
* <p>The default implementation uses
* {@link org.springframework.beans.factory.config.AutowireCapableBeanFactory#createBean}.
* {@link org.springframework.beans.factory.config.AutowireCapableBeanFactory#createBean(Class)}.
* @param context the current WebApplicationContext
* @param clazz the strategy implementation class to instantiate
* @return the fully configured strategy instance
* @see org.springframework.context.ApplicationContext#getAutowireCapableBeanFactory()
* @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#createBean
* @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#createBean(Class)
*/
protected Object createDefaultStrategy(ApplicationContext context, Class<?> clazz) {
return context.getAutowireCapableBeanFactory().createBean(clazz);