How to change grails localhost port?

前端 未结 11 1379
情书的邮戳
情书的邮戳 2020-12-22 20:39

I\'m using grails 2.0.4. And I want to use port:8090 instead of 8080 for localhost. So need help to change the port to 8090 permanently.

相关标签:
11条回答
  • 2020-12-22 21:24

    For grails 3 you can put this in your application.yml

    server:
        port: 9999
    
    0 讨论(0)
  • 2020-12-22 21:29

    You can run grails app using the following command on the terminal. default running port is 8080.

    grails run-app -Dserver.port=9090

    This will run the app on port 9090.

    0 讨论(0)
  • 2020-12-22 21:31

    If you are using Netbeans IDE then set the following -:

    Config: -> BuildConfig.groovy: -> grails.server.port.http = 8090 and restart the server.

    Without IDE, type in the command prompt -:

    grails -Dserver.port 8090 run-app
    

    or

    grails -Dserver.port=8090 run-app
    
    0 讨论(0)
  • 2020-12-22 21:36

    Type following in the command line:

    grails -Dserver.port=8090 run-app
    
    0 讨论(0)
  • 2020-12-22 21:42

    Run the command (Ctrl+Alt+g)

    1. Up to grails version 2.x : run-app -Dserver.port=8090
    2. For grails version 3.x : run-app --port=8090
    0 讨论(0)
提交回复
热议问题