the postConnect method of ConnectInterceptor has the signature:
postConnect(Connection connection, WebRequest webRequest)
In that method implementation of my own ConnectInterceptor I need to get a handle to the HttpServletRequest since another utility class that I have to call requires it as a param.
Is this an ok way to get the HttpServletRequest or is there a more efficient/easier way?
Code:public void postConnect(Connection connection, WebRequest webRequest) { ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes(); HttpServletRequest request = requestAttributes.getRequest()); ...


Reply With Quote