Search in sources :

Example 1 with HeaderContentTypeResolver

use of org.springframework.web.reactive.accept.HeaderContentTypeResolver in project spring-framework by spring-projects.

the class ViewResolutionResultHandlerTests method resultHandler.

private ViewResolutionResultHandler resultHandler(List<View> defaultViews, ViewResolver... resolvers) {
    List<ViewResolver> resolverList = Arrays.asList(resolvers);
    RequestedContentTypeResolver contentTypeResolver = new HeaderContentTypeResolver();
    ViewResolutionResultHandler handler = new ViewResolutionResultHandler(resolverList, contentTypeResolver);
    handler.setDefaultViews(defaultViews);
    return handler;
}
Also used : HeaderContentTypeResolver(org.springframework.web.reactive.accept.HeaderContentTypeResolver) RequestedContentTypeResolver(org.springframework.web.reactive.accept.RequestedContentTypeResolver)

Aggregations

HeaderContentTypeResolver (org.springframework.web.reactive.accept.HeaderContentTypeResolver)1 RequestedContentTypeResolver (org.springframework.web.reactive.accept.RequestedContentTypeResolver)1