public static @ Nullable GrailsWebRequest lookup ( ) { GrailsWebRequest webRequest = null ; RequestAttributes requestAttributes = RequestContextHolder . getRequestAttributes ( ) ; if ( requestAttributes instanceof GrailsWebRequest ) { webRequest = ( GrailsWebRequest ) requestAttributes ; } return webRequest ; }
Looks up the current Grails WebRequest instance