ため
感謝をaswell
call "app/apple/eat" -> "app/admin/apple/eat"
あなたはgrails-app/conf/UrlMappings.groovyでこれを実行できます以下の構成(アプリケーション全体の場合よりも動作します)は、i番目:
http://localhost:8080/apple/admin/apple/eat/1
etc.
または:この構成で
class UrlMappings {
static mappings = {
"/admin/$controller/$action?/$id?(.$format)?"{
constraints {
// apply constraints here
}
}
"/"(view:"/index")
"500"(view:'/error')
}
}
、あなたのコントローラが経由して到達可能です!
あなたが唯一の管理者の接頭辞の下にリンゴを持っているでしょう場合は、よりあなたはGrailsのアプリでは、次の/ confに/ UrlMappings.groovyを行うことができます:
class UrlMappings {
static mappings = {
"/admin/apple/$action?/$id?"(controller : "apple")
"/$controller/$action?/$id?(.$format)?"{
constraints {
// apply constraints here
}
}
"/"(view:"/index")
"500"(view:'/error')
}
}
をか!あなたはより多くのリダイレクトを使用している場合
は、あなたがグループにそれらを一緒にできます - 第二の「か!」
static mappings = {
group("/admin") {
"/apple/$action?/$id?(.${format})?"(controller: 'apple')
"/peach/$action?/$id?(.${format})?"(controller: 'peach')
}
...
おおありがとう私のために働いた:) – pebbles