For instance:
Config.groovy:
// ... grails.variable1 = "a" grails.varibale2 = "${grails.variable1}bc" //...
UPDATE 1
The method of working with grails shown above 2.2.3. For older versions of grails, use the proposed @tim_yates solution
You need to declare a variable:
def rootVar = 'a' grails.variable1 = rootVar grails.varibale2 = "${rootVar}bc"
Or you could do it through closure (not tested):
grails.variable1 = 'a' grails.varibale2 = { -> "${grails.variable1}bc" }()
Source: https://habr.com/ru/post/1499757/More articles:Weird 3 minutes delay for TSQLConnection.Connect with InterBase 7.5 - delphiCasting a supertype in generics (getting a universal supertype of a general type) - javaWhat is the meaning of True == True! = False in Python and how to find out? - pythonHow can I apply a Moose method modifier to a method based on a method attribute? - perlImproving the user interface in Windows Forms Client with low Internet speed and using the WCF web service located far away - multithreadingOutOfMemoryError and GC upper limit in maven but not eclipse - javaDetecting fullscreen from Android service - javaTrying to avoid the "spaghetti code", why is the meaningful if-else bad? - coding-styleEclipseLink JPA primary key with user default value - jpaFind the specific text until it is found - phpAll Articles