Skip to content

Instantly share code, notes, and snippets.

@danveloper danveloper/Config.groovy Secret
Created May 28, 2013

Embed
What would you like to do?
app.parentname = "objectpartners.com"
class Customer {
@Value('${app.parentname}')
String parentName
String username
static constraints = {
}
}
class CustomerController {
def grailsApplication
def createSpring() {
def customer = grailsApplication.mainContext.getBean(Customer.class)
customer.username = params.username
customer.save()
assert customer.parentName == "objectpartners.com"
render customer as JSON
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.