One way to add custom ApplicationContextInitializer to spring web application is to add it in the web.xml file as shown below.
<context-param>
<param-name>contextInitializerClasses</param-name>
<param-value>somepackage.CustomApplicationContextInitializer</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
But since I am using spring boot, is there any way I don't have to create web.xml just to add CustomApplicationContextInitializer?