0

您好我正在将现有的 Grails 2.4.5 升级到 Grails 3.3.2。我关注了 https://docs.grails.org/3.0.x/guide/upgrading.html。Grails 应用程序在 localhost:8080 运行,但我希望服务器 URL 为http://localhost:8080/projectName。我尝试将以下内容添加到 application.yml:

environments:
   development:
     grails:
       serverURL: http://localhost:8080/projectName

URLMappings.groovy 如下所示:

"/"(view:"/index")
"500"(view:'/error')
"404"(view:'/notFound')

我究竟做错了什么?

4

1 回答 1

0

添加server.contextPath

environments:
  development:
    server:
      contextPath: /projectName
于 2018-02-21T13:03:01.897 回答