How can Grails load configuration external to WAR via HTTP?

I saw questions and answers on how to specify external .groovy and .properties files for the Grails configuration that are outside the WAR file using grails.config.locations, but we need an external configuration that is not located on the server the container is running on (Tomcat). (It has a local FS, but it is not permanent and is identical for all deployment environments - therefore, you must redefine it with respect to WAR, container, and server).

So, can I use http: urls for grails.config.locations?

+3
source share
2 answers

Yes. The following works:

Config.groovy PARAM1, -D, JVM, URL .

grails.config.locations = ["url:" + System.properties["PARAM1"]]
+4

, URL- grails.config. , , :

  • URL-, d/l Congif.groovy, WAR
  • Config.groovy script, , (. this article)
  • grails.config.locations, , Config.groovy.

, , .

+1

Source: https://habr.com/ru/post/1791282/


All Articles