It's a bit easier in Grails 3 (and Grails 2 if you only use methods for actions and no closures):
import grails.web.Action
def data = grailsApplication.controllerClasses.collect { controller ->
[controller: controller.logicalPropertyName,
controllerName: controller.fullName,
actions: controller.clazz.methods.findAll { it.getAnnotation(Action) }*.name.sort()]
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.