Here's a simple way to run one thing in Development and another in Production (or as many environments as you need ...).
import grails.util.Environment;
class MyController{
Environment.executeForCurrentEnvironment {
production {
// Here goes the prod code
}
development {
// Here goes the dev code
}
}
}
No comments:
Post a Comment