Struts2排除模式的正则表达式问题

问题描述:

我有一个要求,如果URL包含路径中的spring,那么应该排除struts,并且应该处理spring调度程序servlet。Struts2排除模式的正则表达式问题

我曾尝试下面的模式 常量名= “struts.action.excludePattern” 值= “.spring。”/>

URLS的忽略:http://localhost:8080/spring/getAllUsers http://localhost:8080/spring/getUserByName

,但我从struts获取错误,如无动作映射。请建议使用

+0

[Jersey with Struts2]的可能重复(https://*.com/questions/17293115/jersey-with-struts2) –

+0

'没有行为映射'意味着struts无法处理请求url的动作映射。更多关于这个错误[这里](https://*.com/a/40658006/573032)。 –

使用.*表示零个或多个字符,如:

<constant name="struts.action.excludePattern" value=".*spring.*" /> 
+0

我现在应该使用什么... –

+0

@Abirami,尝试'' –

+0

@yaser我认为我尝试相同的模式,如果是没有错 –