简体   繁体   中英

Grails/Groovy: Harms of run-app compared to using .war

Can someone enumerate everything to which I am exposing myself (and my site) by running/deploying my Grails App with "grails run-app" rather than doing it "correctly" with a.war file?

Grails.org saysL

Grails should never be deployed using the grails run-app command as this sets Grails up in "development" mode which has additional overheads.

Is it only performance, or is there a security issue there too?

Performance is the big difference. If you must use run-app be sure to run 'grails prod run-app' so at least some of the optimizations are in place. run-app is designed to be devloper-friendly, with lots of reloading, and the corresponding file system scans that are necessary to support that.

When running in a war, GSPs are precompiled, which saves permgen significantly and results in much faster performance. There's nearly no caching in run-app since as a developer you don't want to have to restart, but in production you usually only need to make changes for a redeployment, so caching is much more aggressive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM