如何在新的 Grails 3.0application.yml
文件中配置连字符 URL?
以下配置似乎没有坚持:
grails-app/config/application.yml
grails:
web:
url:
converter: "hyphenated"
我的测试控制器是:
grails-app/controllers/BookAuthorsController.groovy
class BookAuthorsController {
def index() {
}
}
视图位于:
grails-app/views/bookAuthors/index.gsp
此页面(带有不受欢迎的驼峰式 URL)显示 OK:
http://localhost:8080/bookAuthors
此页面应显示,但会导致页面未找到 (404)错误:
http://localhost:8080/book-authors