Add Grails sample app
Closes gh-250
This commit is contained in:
committed by
Andy Wilkinson
parent
c1d245f7d4
commit
64803b5fae
@@ -0,0 +1,31 @@
|
||||
package com.example
|
||||
|
||||
import grails.core.GrailsApplication
|
||||
import grails.util.Environment
|
||||
|
||||
class IndexController {
|
||||
|
||||
GrailsApplication grailsApplication
|
||||
|
||||
def index() {
|
||||
render(contentType: 'application/json') {
|
||||
message = "Welcome to Grails!"
|
||||
environment = Environment.current.name
|
||||
appversion = grailsApplication.metadata['info.app.version']
|
||||
grailsversion = grailsApplication.metadata['info.app.grailsVersion']
|
||||
appprofile = grailsApplication.config.grails?.profile
|
||||
groovyversion = GroovySystem.getVersion()
|
||||
jvmversion = System.getProperty('java.version')
|
||||
controllers = array {
|
||||
for (c in grailsApplication.controllerClasses) {
|
||||
controller([name: c.fullName])
|
||||
}
|
||||
}
|
||||
plugins = array {
|
||||
for (p in grailsApplication.mainContext.pluginManager.allPlugins) {
|
||||
plugin([name: p.fullName])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user