@Test public void unresolvedNormal() throws Exception { request.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, SitePreference.NORMAL, WebRequest.SCOPE_REQUEST); MethodParameter parameter = new MethodParameter(getClass().getMethod("handlerMethodUnresolved", String.class), 0); Object resolved = resolver.resolveArgument(parameter, request); assertSame(WebArgumentResolver.UNRESOLVED, resolved); }
public Object resolveArgument(MethodParameter param, NativeWebRequest request) throws Exception { if (SitePreference.class.isAssignableFrom(param.getParameterType())) { return SitePreferenceUtils.getCurrentSitePreference(request); } else { return WebArgumentResolver.UNRESOLVED; } }
SitePreferenceWebArgumentResolver implements WebArgumentResolver { public Object resolveArgument(MethodParameter param, NativeWebRequest request) throws Exception { if (SitePreference.class.isAssignableFrom(param.getParameterType())) { return SitePreferenceUtils.getCurrentSitePreference(request); } else { return WebArgumentResolver.UNRESOLVED; } } }
SitePreferenceWebArgumentResolver implements WebArgumentResolver { public Object resolveArgument(MethodParameter param, NativeWebRequest request) throws Exception { if (SitePreference.class.isAssignableFrom(param.getParameterType())) { return SitePreferenceUtils.getCurrentSitePreference(request); } else { return WebArgumentResolver.UNRESOLVED; } }  }
SitePreferenceWebArgumentResolver implements WebArgumentResolver { public Object resolveArgument(MethodParameter param, NativeWebRequest request) throws Exception { if (SitePreference.class.isAssignableFrom(param.getParameterType())) { return SitePreferenceUtils.getCurrentSitePreference(request); } else { return WebArgumentResolver.UNRESOLVED; } }  Object resolveArgument(MethodParameter param, NativeWebRequest request); }
SitePreferenceWebArgumentResolver implements WebArgumentResolver { public Object resolveArgument(MethodParameter param, NativeWebRequest request) throws Exception { if (SitePreference.class.isAssignableFrom(param.getParameterType())) { return SitePreferenceUtils.getCurrentSitePreference(request); } else { return WebArgumentResolver.UNRESOLVED; } }  Object resolveArgument(MethodParameter param, NativeWebRequest request);  }