【发布时间】:2011-01-22 09:42:11
【问题描述】:
在 grails 中创建 URL 的标准方法是:
<a href="${createLink(controller:'news', action: 'show', params: [id: news.id])}">${news.title}</a>
生成url:/news/show/102
我想要更多 SEO 友好的 URL,例如:
/news/102/this-is-the-hottest-news-today
在 Grails 中最简洁的方法是什么?我可以使用 grails URLMapping 将/news/show/102 映射到/news/102,但是如何创建像上面这样的完整 URL?
【问题讨论】:
标签: url grails seo url-mapping