0
的Grails 1.3.5Grails的URL映射映射到错误的URL
当映射在我的应用程序中的新的控制器:
"/order/$action/$id?" {
controller = "customerOrder"
}
为 “/顺序/显示/ 13” 请求解析为“/ ()/()?/(*)?“这里看到的日志中:
17:53:02 DEBUG UrlMappingsFilter - Matched URI [/order/show/13] to URL mapping [/(*)/(*)?/(*)?], forwarding to [/grails/home/page.dispatch] with response [class org.codehaus.groovy.grails.web.sitemesh.GrailsContentBufferingResponse]
如果我添加的映射:
"/order/show/13"{
controller = "customerOrder"
action = "show"
id = 13
}
它仍然解析为 “/?()/()/(*)?”。我编辑的映射:
"/customerOrder/show/13"{
controller = "customerOrder"
action = "show"
id = 13
}
和日志报告:
18:50:08 DEBUG DefaultUrlMappingsHolder - Matched URI [/customerOrder/show/13] with pattern [/customerOrder/show/13], adding to posibilities
后来也报道:
18:50:08 DEBUG DefaultUrlMappingsHolder - Matched URI [/customerOrder/show/13] with pattern [/(*)/(*)?/(*)?], adding to posibilities
我完全莫名其妙就这一个。无论哪种方式,它解决相同的问题。想法任何人?