2.9 运行应用 - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith
Version: null
2.9 运行应用
Grails applications can be run with the built in Tomcat server using the run-app command which will load a server on port 8080 by default:You can specify a different port by using the Note that it is better to start up the application in interactive mode since a container restart is much quicker:More information on the run-app command can be found in the reference guide.
run-app命令使用内置的端口为8080的Tomcat容器来运行Grails应用,比如:grails run-app
server.port argument:grails -Dserver.port=8090 run-app
$ grails grails> run-app | Server running. Browse to http://localhost:8080/helloworld | Application loaded in interactive mode. Type 'exit' to shutdown. | Downloading: plugins-list.xml grails> exit | Stopping Grails server grails> run-app | Server running. Browse to http://localhost:8080/helloworld | Application loaded in interactive mode. Type 'exit' to shutdown. | Downloading: plugins-list.xml
grails run-app
server.port 参数来指定不同的端口,比如:grails -Dserver.port=8090 run-app
$ grails grails> run-app | Server running. Browse to http://localhost:8080/helloworld | Application loaded in interactive mode. Type 'exit' to shutdown. | Downloading: plugins-list.xml grails> exit | Stopping Grails server grails> run-app | Server running. Browse to http://localhost:8080/helloworld | Application loaded in interactive mode. Type 'exit' to shutdown. | Downloading: plugins-list.xml

