I'd like to display the application version in the footer of my app. Is there a way to get the value of the app.version variable in the application.properties file at runtime?
Metadata regarding a project in Grails is kept in application. properties . Within this file you will find the version of Grails used for the project under the key app.
ApplicationHolder is depreciated.
You can use
Holders.grailsApplication.metadata['app.version']
or inject grailsApplication bean by adding field:
def grailsApplication
and access to application version
grailsApplication.metadata['app.version']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With