7 Configuring The Default Dynamic Property Name - Reference Documentation
Authors:
Version: 2.0.0.RC2
7 Configuring The Default Dynamic Property Name
By default the name of the dynamic property that is added to all Grails artefacts for accessing Clojure functions is calledclj
.// grails-app/controllers/demo/DemoController.groovypackage democlass DemoController { def add(int x, int y) { // this will invoke the add_numbers clojure function… def sum = clj.add_numbers(x, y) render "The sum of $x and $y is $sum" } }
application.yml
by assigning a value to
the grails.clojure.dynamicPropertyName
config property.grails: clojure: dynamicPropertyName: mathHelper
// grails-app/controllers/demo/DemoController.groovypackage democlass DemoController { def add(int x, int y) { // this will invoke the add_numbers clojure function… def sum = mathHelper.add_numbers(x, y) render "The sum of $x and $y is $sum" } }
false
to the grails.clojure.addDynamicProperty
config setting in application.yml
.grails:
clojure:
addDynamicProperty: false