grails - How to render or include files/data in bootstrap.groovy? -


I want to use parts of the code in different areas of bootstrap.groovy. How do I "get involved" in these parts and reuse it?

def init = {environments {production {include ("bla.groovy)" ("blaFoo.groovy)}} {BlaFoo.groovy} {development (" bla.groovy ") ("Bla1.groovy)" ("blaFoo.groovy)}}}}

You simply import the files and call the function or instantiate the classes defined in it

  import bla import blaFoo import bla1 def init = {environment {production {// this function Is defined in bla.groovy blaFunc ()} test {// This class is defined in blaFoo.groovy new BlaFoo ()} development Shall have been {// (this is defined in the closing bla1.groovy bla1.call)}}}  

Comments