package resttutorial
class UrlMappings {
static mappings = {
group("/api") {
delete "/$controller/$id(.$format)?"(action:"delete")
get "/$controller(.$format)?"(action:"index")
get "/$controller/$id(.$format)?"(action:"show")
post "/$controller(.$format)?"(action:"save")
put "/$controller/$id(.$format)?"(action:"update")
patch "/$controller/$id(.$format)?"(action:"patch")
}
...
}
}
grails3 URLMapping加前缀(如:/api/)
猜你喜欢
转载自blog.csdn.net/qq_16165281/article/details/92839571
今日推荐
周排行