在我用过的 Struts 中
<constant name="struts.action.excludePattern" value="/servlet-action"/>
执行上述操作,Struts 避免查找/servlet-action
并struts.xml
转到web.xml
.
如何在 Spring MVC 中实现这一点?
还是可以@RequestMapping
为 servlet 做?
在我用过的 Struts 中
<constant name="struts.action.excludePattern" value="/servlet-action"/>
执行上述操作,Struts 避免查找/servlet-action
并struts.xml
转到web.xml
.
如何在 Spring MVC 中实现这一点?
还是可以@RequestMapping
为 servlet 做?
You can achieve this if you map Spring MVC servlet to either than a default servlet. Then it could be handled by the servlet container.
To exclude some patterns from the mapping you can use url rewrite filter. You can read more about this in my answer to How can URL rewriting in Struts2.x.