是否可以將Grails配置爲在子目錄中運行?默認情況下,在發展它運行在:如何在子目錄中運行Grails?
http://localhost:8080/appname/$controller/$action
我想將其配置在運行:
http://localhost:8080/appname/subdirectory/$controller/$action
是否可以將Grails配置爲在子目錄中運行?默認情況下,在發展它運行在:如何在子目錄中運行Grails?
http://localhost:8080/appname/$controller/$action
我想將其配置在運行:
http://localhost:8080/appname/subdirectory/$controller/$action
如果只是關於「子目錄」的URL,只是提高你的URLMappings:
"/subdirectory/$controller/$action?/$id?" {
constraints {
// apply constraints here
}
}
謝謝,湯姆。這是否也會在子目錄中提供資源? – Armand
不幸的是,但您也可以在UM中編寫新的資源規則。或者你將項目結構中的資源移動到「子目錄」;-)骯髒,但快速的解決方案;-) –
你在說什麼子目錄?也許你的意思是網址? –
也許?我想我的例子表達了我想要做的事情;如果你可以建議更好的措辭,將不勝感激。 – Armand