How to create a custom environment in Grails?

前端 未结 3 1309
失恋的感觉
失恋的感觉 2020-12-16 16:15

grails.util.Environment, defines a number of preconfigured environments

  • DEVELOPMENT
  • PRODUCTION
  • TEST
  • CUSTOM

When runni

3条回答
  •  我在风中等你
    2020-12-16 16:56

    If you create a custom environment, you can use it anywhere that the environments {} block is used. For example, in addition to Bootstrap.groovy and Config.groovy, you can also use it in DataSource.groovy and even other Config files like Searchable.groovy.

    Also, I believe

    Environment.currentEnvironment.name will return 'pre_production' in your case.

提交回复
热议问题