Led & Sustained by

G2one Logo

Developed with

Intellij

Powered by

Spring

Configuration

Configuration

The below sections detail the various configuration options you have in Grails:

Other Tips

Changing Application Name (Since 0.5)

Occasionally you may want the application name to be different from the project's directory name. This affects the URI used when testing locally, and the name of JARs produced.

Edit the application.properties file in your project directory and change the value of app.name

Adding a Properties File to the Classpath

Sometimes it is useful to add additional properties to the environment (e.g. for a Spring placeholder configurer). To do this put a properties file in grails-app/conf. Everything you put there is copied to WEB-INF/classes when the packaging is done during "grails run-app".

Actually, putting it in WEB-INF/classes directly works too, but then it is removed when you do "grails clean".

Accessing data at runtime in application.properties or the "Config"

  • the data in application.properties is available here: grailsApplication.metadata
  • the "Config" is accessible via grailsApplication.config
</