diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java index d6513792d21b..0e938bf30c12 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java @@ -237,8 +237,8 @@ private void selfInitialize(ServletContext servletContext) throws ServletExcepti prepareWebApplicationContext(servletContext); registerApplicationScope(servletContext); WebApplicationContextUtils.registerEnvironmentBeans(getBeanFactory(), servletContext); - for (ServletContextInitializer beans : getServletContextInitializerBeans()) { - beans.onStartup(servletContext); + for (ServletContextInitializer initializerBean : getServletContextInitializerBeans()) { + initializerBean.onStartup(servletContext); } }