Grails 2.3.6 here. I went into myapp/grails-app/controllers
and manually added a new WidgetController.groovy
class:
class WidgetController {
def fizz() {
redirect(url: "http://google.com")
}
}
Then I run my Grails app locally, and when I go to http://localhost:8080/myapp/widget/fizz
I just get my custom "page does not exist" error page. No errors in the logs.
Note: I did not use the grails create-controller Widget
command; I just added a new file manually. What is going on here and what can I do to fix it?
尝试将空白的fizz.gsp页添加到视图/窗口小部件,它将起作用。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.