【问题标题】:grails 3 url and grails no controller findgrails 3 url和grails找不到控制器
【发布时间】:2015-07-11 18:51:09
【问题描述】:

当我使用 grails2 时,Url 会是

http://localhost:8080/myApp/controllerName

当我使用 grails 3 时。

网址是http://localhost:8080/controllerName

没有 myapp 了。是设计好的?

问题 2:我在 grails 中使用 Restful 域生成所有内容后,它总是说

描述资源路径位置类型 由于“RequestEnvironmentController [in [Working copy] RequestEnvironment.groovy [in test.environment.manager [in grails-app/domain [in test-environment-manager]]]] 不存在”,该项目未构建。修复问题,然后尝试刷新此项目并构建它,因为它可能不一致

它只能编译 83%。

【问题讨论】:

    标签: grails


    【解决方案1】:

    没有 myapp 了。是设计好的?

    是的。默认情况下,根上下文现在是'/'。如果你想覆盖它,你可以通过在grails-app/conf/application.yml 中设置上下文路径。

    server:
        'context-path': '/myApp'
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-08
    • 1970-01-01
    • 2015-07-06
    • 2015-07-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多