目前我在 grails 中有一个这样的 url 映射:
"/foo/$token/external"(controller: "hello") {...}
当传入请求如下时,这很好用:
"/foo/12345/external"
但是,令牌可以包含像“/”这样的字符。我尝试对令牌值进行 urlencode,以便 '/' 变为 %2f:
123/45 --> 123%2f45
但这并没有被 grails 匹配。
有没有办法做到这一点?
目前我在 grails 中有一个这样的 url 映射:
"/foo/$token/external"(controller: "hello") {...}
当传入请求如下时,这很好用:
"/foo/12345/external"
但是,令牌可以包含像“/”这样的字符。我尝试对令牌值进行 urlencode,以便 '/' 变为 %2f:
123/45 --> 123%2f45
但这并没有被 grails 匹配。
有没有办法做到这一点?