Grails Project The default port number is 8080, how to modify it, search on the internet a lot is about using command line parameters, more trouble, each time you start to enter. Finally, we can use the following method to modify it, assuming the new port number is 9000:
1. Runtime changes
Each time you start a grails application, you can use the-dserver.port parameter to modify the default port number, and the command line service-initiated parameter changes to:
grails-dserver.port=9000 Run-app
2. Modify the project configuration file
First find the root directory of the application project, below the grails-app/conf directory, find the Buildconfig.groovy configuration file (no new one), add a new line inside
grails.server.port.http=9000
The other benefit of using the new port number every time you start the project is to use a different line parameter, and if you have several grails projects at the same time, you can assign them to separate port numbers and run them at the same time.