Grails多环境基本概念

阅读更多
大多数g命令都是默认dev参数的
grails run-app 默认环境为 dev
grails war 默认环境为 prod

There are 3 preset environments known to Grails: dev, prod, and test for development, production and test.
源代码
public enum Environment {

    /** The development environment */
    DEVELOPMENT,

    /** The production environment */
    PRODUCTION,

    /** The test environment */
    TEST,

    private static final String PRODUCTION_ENV_SHORT_NAME = "prod";
    private static final String DEVELOPMENT_ENVIRONMENT_SHORT_NAME = "dev";
    private static final String TEST_ENVIRONMENT_SHORT_NAME = "test";


有趣的是,在g:if里不能用大写和缩写

   

你可能感兴趣的:(Grails)