@Test public void resolve() throws Exception { assertTrue(interceptor.preHandle(request, response, null)); assertSame(device, DeviceUtils.getCurrentDevice(request)); }
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { Device device = deviceResolver.resolveDevice(request); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); return true; }
DeviceResolverHandlerInterceptor extends HandlerInterceptorAdapter { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { Device device = deviceResolver.resolveDevice(request); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); return true; } }
DeviceResolverHandlerInterceptor extends HandlerInterceptorAdapter { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { Device device = deviceResolver.resolveDevice(request); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); return true; } DeviceResolverHandlerInterceptor();  DeviceResolverHandlerInterceptor(DeviceResolver deviceResolver); }
DeviceResolverHandlerInterceptor extends HandlerInterceptorAdapter { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { Device device = deviceResolver.resolveDevice(request); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); return true; } DeviceResolverHandlerInterceptor();  DeviceResolverHandlerInterceptor(DeviceResolver deviceResolver); boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler); }
DeviceResolverHandlerInterceptor extends HandlerInterceptorAdapter { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { Device device = deviceResolver.resolveDevice(request); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); return true; } DeviceResolverHandlerInterceptor();  DeviceResolverHandlerInterceptor(DeviceResolver deviceResolver); boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler);  }