How to get Grails application name within Config.groovy?

前端 未结 2 895
抹茶落季
抹茶落季 2021-02-04 11:33

I want to include the Grails application name in some of my configuration settings in grails-app/Config.groovy. I\'ve tried many ways without success. For example

2条回答
  •  隐瞒了意图╮
    2021-02-04 12:35

    To get the appName in a config file that you're including with grails.config.locations you can use:

    appName = grails.util.Metadata.current.'app.name'
    

提交回复
热议问题