答案来自于订购问题。
我在config.xml文件中设置了另一个UrlHandlerMapping:
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref bean="openPersistenceManagerInView"/>
</list>
</property>
<property name="mappings">
<value>
**/AccountManagement/login.do=flowController
**/AccountManagement/createAccount.do=flowController
**/AccountManagement/manageAccount.do=flowController
</value>
</property>
<property name="alwaysUseFullPath" value="true"/>
</bean>
ResteasyHandlerMapping处理RESTEasy资源的映射,它位于JBoss包含的sprincmvc-RESTEasy.xml文件中。此映射也没有“order”属性。
这导致两个映射具有相同的排序优先级,并且由于RESTEasy映射在XML中是第一个,所以它尝试处理所有请求。
解决方案:
将此属性添加到默认url映射器:
<property name="order" value="0"/>