2015-10-20 83 views
0

我在尝试使用外部配置来部署一场战争。在linux上设置外部配置文件

这是config.groovy我的外部文件位置的配置:

grails.config.locations = 
[ 
       "classpath:external-config.groovy" 
] 

我读这post,但我还是不明白这一点:

  1. 我在哪里必须把文件我的Linux服务器上的“external-config.groovy”?

  2. 我的服务器如何知道“classpath”?

  3. 我必须使用绝对路径吗?

+3

http://stackoverflow.com/questions/33235740/how-to-set-classpath-in-linux-to-let-grails-find-external-configuration这是否有帮助 – Vahid

回答

1

你可以把这个文件放在你的tomcat的lib目录下。我通常会在外部配置中加入一些消息,以确保它已加载。