---
title: "grails environment"
author: "fishyych"
date: "2008-10-09T17:22:17Z"
tags: ["Grails"]
slug: "grails-environment"
draft: false
lastmod: "2008-10-09T17:22:17Z"
id: 250857
url: "https://fishyych.iteye.com/blog/250857"
---

grails提供了3种运行的环境，分别是development, test, production。比如数据库等资源可以配置以后在不同的环境中有不同的数据源和配置。

运行某环境的方法为：grails prod run-app

or:　grails -Dgrails.env=prod run-app