How to add custom ApplicationContextInitializer to a spring boot application? : <p>One way to add custom ApplicationContextInitializer to spring web application is to add it in the web.xml file as shown below.</p>

<pre><code>&lt;context-param&gt;
    &lt;param-name&gt;contextInitializerClasses&lt;/param-name&gt;
    &lt;param-value&gt;somepackage.CustomApplicationContextInitializer&lt;/param-value&gt;
&lt;/context-param&gt;
&lt;listener&gt;
    &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
&lt;/listener&gt;
</code></pre>

<p>But since I am using spring boot, is there any way I don't have to create web.xml just to add CustomApplicationContextInitializer?</p>
