public class YogaModelAndViewResolverAdapter extends Object implements org.springframework.web.servlet.mvc.annotation.ModelAndViewResolver
This is a bit of a hack to create ModelAndViewResolver as an adapter for a ViewResolver, namely the ContentNegotiationViewResolver. There's plenty of room for improvement here, especially since there isn't much logic in this adapter. There's plenty of interesting additions that one can use to extend or replace this class, including additional filtering logic.
You can log an issue or reach out to the development team about any extensions you might be considering
| Constructor and Description |
|---|
YogaModelAndViewResolverAdapter() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.web.servlet.ModelAndView |
resolveModelAndView(Method handlerMethod,
Class handlerType,
Object returnValue,
org.springframework.ui.ExtendedModelMap implicitModel,
org.springframework.web.context.request.NativeWebRequest webRequest) |
void |
setRequireResponseBodyAnnotation(boolean requireResponseBodyAnnotation)
This is a failsafe to require the @ResponseBody annotation on the
|
void |
setViewResolver(org.springframework.web.servlet.ViewResolver viewResolver) |
public void setViewResolver(org.springframework.web.servlet.ViewResolver viewResolver)
public void setRequireResponseBodyAnnotation(boolean requireResponseBodyAnnotation)
requireResponseBodyAnnotation - public org.springframework.web.servlet.ModelAndView resolveModelAndView(Method handlerMethod, Class handlerType, Object returnValue, org.springframework.ui.ExtendedModelMap implicitModel, org.springframework.web.context.request.NativeWebRequest webRequest)
resolveModelAndView in interface org.springframework.web.servlet.mvc.annotation.ModelAndViewResolverCopyright © 2014. All Rights Reserved.