The order of elements in web.xml
matters and in all examples I've come across, the <load-on-startup>
comes after <init-param>
.
<servlet>
<servlet-name>spring1</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…