【发布时间】:2014-07-23 17:10:15
【问题描述】:
我正在尝试外部化 grails 应用程序的配置。
我已经成功外部化,配置文件在用户主目录中,如下所示。
grails.config.locations = ["file:${userHome}/.conf/${appName}-config.properties"]
但是,我需要将配置文件外部化,以便配置文件位于 tomcat/conf 目录中。
在其他非 grails 应用程序中,我曾经通过将配置位置指定为 ${CATALINA_HOME}/conf 来实现这一点。
如何将配置外部化到 grails 中的 tomcat/conf 目录?
【问题讨论】:
-
你试过了吗:grails.config.locations = ["file:${System.env.CATALINA_HOME}/conf/myconfig.properties"]