check whether you have multiple ContextLoader* definitions in your web.xml

check whether you have multiple ContextLoader* definitions in your web.xml!
<span style="font-size:18px;">java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml!
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:186)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)</span>

 顾名思义:

               IllegalStateException:环境没有处于请求操作所要求的适当状态下。不能初始化环境,因为已经有一个application-context存在。

 

解决法案:

检查你的web.xml文件看是否定义了多个ContextLoader。

你可能感兴趣的:(check whether you have multiple ContextLoader* definitions in your web.xml)