Is it possible to get a List of all active Sessions?
问题 When being in a Grails action I can access a HTTPSession with session . Is it also possible to get a list of all active sessions? 回答1: You can use getSessionsInfo() method of ScopesInfoService service of Application Info plugin. First install plugin(in BuildConfig) compile ":app-info:1.0.2"{ excludes 'jquery' } then make an entry in Config grails.plugins.appinfo.useContextListener = true finally inject service and use its getSessionsInfo() method def scopesInfoService ... scopesInfoService