2015-09-25 54 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) –