grails run-app on localhost:8080 instead of :8080/appName?

后端 未结 3 1533
我在风中等你
我在风中等你 2020-12-29 12:32

Is there a way to get grails run-app to launch on localhost:8080/ instead of localhost:8080/${appName}?

In Config.groovy,, set

相关标签:
3条回答
  • 2020-12-29 12:38

    If you are running Grails 3.1.1 you can add the following line to your
    grails-app/conf/application.yml file to bring back the http://localhost:8080/appName functionality:

    server:
        'contextPath': '/appName'
    

    Replace appName with your application's actual name (i.e. the folder name that the grails-app folder is in).

    0 讨论(0)
  • 2020-12-29 12:51

    With recent versions of Grails this can also be set in application.properties:

    app.context=/

    0 讨论(0)
  • 2020-12-29 12:54

    How about

    grails.app.context = "/"
    

    in Config.groovy, as per this jira discussion?

    0 讨论(0)
提交回复
热议问题