2015-09-25 56 views

回答

1

也许你可以尝试在约束部分使用自定义验证器。请注意,下面的代码未经测试。

"/$path" { 
     controller ="user" 
     action = "show" 
     id = "f274b72e1309467e70" 
     constraints { 
     path((validator: { return it.equalsIgnoreCase("Some-Name") }) 
     } 
    } 
+0

什么是约束路径? – confile

+0

路径是从映射'/ $路径'变量,你可以看到[类似的用例在这里](http://stackoverflow.com/questions/5356916/adding-urlmapping-constraints-to-a-verb-mapped-url) –