2

目前我在 grails 中有一个这样的 url 映射:

"/foo/$token/external"(controller: "hello") {...}

当传入请求如下时,这很好用:

"/foo/12345/external"

但是,令牌可以包含像“/”这样的字符。我尝试对令牌值进行 urlencode,以便 '/' 变为 %2f:

123/45 --> 123%2f45

但这并没有被 grails 匹配。

有没有办法做到这一点?

4

1 回答 1

1

这不是问题的答案,但我认为您应该更改它,以便令牌不包含这些类型的字符。

于 2012-03-25T15:16:42.217 回答