当时在applicationContext.xml中的设置如下:
<dwr:annotation-config />
<dwr:annotation-scan scanRemoteProxy="true" scanDataTransferObject="true" base-package="com.test.*"/>
由于红色标记的设置没写ID导致:
org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Configuration problem: Id is required for element 'annotation-config' when used as a top-level tag
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]
解决:只要加上ID即可,如下:
<dwr:annotation-config id="dwrid"/>
<dwr:annotation-scan scanRemoteProxy="true" scanDataTransferObject="true" base-package="com.test.*"/>