run-war
目的 Purpose
Packages the current Grails application into a Web Application Archive (WAR) file and runs the application in a Tomcat container on port 8080
(by default).使用例 Examples
grails run-war grails run-war -https // with HTTPS grails run-war -restart // restarts without rebuilding the war grails prod run-war grails -Dserver.port=8090 run-war
詳細 Description
使用方法: Usage:
grails [env]* run-war
Unlike the引数:war
command,run-war
default to the development environment (like most commands). To build and run a WAR file for a different environment just specify the environment name, e.g.grails prod run-war
.
Arguments:
https
- Start an HTTPS server (on port 8443 by default) alongside the main server. Just to be clear, the application will be accessible via HTTPS and HTTP.restart
- Does not rebuild an already existing WAR.
grails.server.port.http
/server.port
- Specifies the HTTP port to run the server on (defaults to 8080)grails.server.port.https
- Specifies the HTTPS port to run the server on (defaults to 8443)grails.server.host
/server.host
- Specifies the host name to run the server on (defaults to localhost)grails.tomcat.jvmArgs
- A list of JVM arguments to be used for the forked JVM, e.g.["-Xms128m", "-Xmx512m"]
(defaults to["-Xmx512m"]
)
Fired Events:
StatusFinal
- When the container has been startedStatusUpdate
- When the container is reloading