Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring mvc 使用装饰器的模式匹配_Spring Mvc_Decorator_Sitemesh - Fatal编程技术网

Spring mvc 使用装饰器的模式匹配

Spring mvc 使用装饰器的模式匹配,spring-mvc,decorator,sitemesh,Spring Mvc,Decorator,Sitemesh,我想使用Sitemesh decorators.xml定义一个特定的URL模式。我想定义一个decorator,该decorator匹配所有以“/story/\u NUMBER”结尾的URL,使其成为decorator的目标。我试过: <decorator name="customMain" page="customMain.jsp"> <pattern>/story/[0-9]+</pattern> </decorator>

我想使用Sitemesh decorators.xml定义一个特定的URL模式。我想定义一个decorator,该decorator匹配所有以
“/story/\u NUMBER”
结尾的URL,使其成为decorator的目标。我试过:

 <decorator name="customMain" page="customMain.jsp">
        <pattern>/story/[0-9]+</pattern>
 </decorator>

/故事/[0-9]+

但这是行不通的。。正则表达式在decorators.xml中工作吗?如果没有,我如何定位以上述模式结尾的URL?

我自己也遇到了这个问题。我认为根本不可能使用正则表达式。只有带*和?的通配符模式

请查看此处以了解更多详细信息