/** * Enable use of a {@link ContentNegotiatingViewResolver} to front all other * configured view resolvers and select among all selected Views based on * media types requested by the client (e.g. in the Accept header). * <p>If invoked multiple times the provided default views will be added to * any other default views that may have been configured already. * @see ContentNegotiatingViewResolver#setDefaultViews */ public void enableContentNegotiation(View... defaultViews) { initContentNegotiatingViewResolver(defaultViews); }
/** * Enable use of a {@link ContentNegotiatingViewResolver} to front all other * configured view resolvers and select among all selected Views based on * media types requested by the client (e.g. in the Accept header). * <p>If invoked multiple times the provided default views will be added to * any other default views that may have been configured already. * @see ContentNegotiatingViewResolver#setDefaultViews */ public void enableContentNegotiation(View... defaultViews) { initContentNegotiatingViewResolver(defaultViews); }
/** * Enable use of a {@link ContentNegotiatingViewResolver} to front all other * configured view resolvers and select among all selected Views based on * media types requested by the client (e.g. in the Accept header). * <p>If invoked multiple times the provided default views will be added to * any other default views that may have been configured already. * @see ContentNegotiatingViewResolver#setDefaultViews */ public void enableContentNegotiation(boolean useNotAcceptableStatus, View... defaultViews) { ContentNegotiatingViewResolver vr = initContentNegotiatingViewResolver(defaultViews); vr.setUseNotAcceptableStatusCode(useNotAcceptableStatus); }
/** * Enable use of a {@link ContentNegotiatingViewResolver} to front all other * configured view resolvers and select among all selected Views based on * media types requested by the client (e.g. in the Accept header). * <p>If invoked multiple times the provided default views will be added to * any other default views that may have been configured already. * @see ContentNegotiatingViewResolver#setDefaultViews */ public void enableContentNegotiation(boolean useNotAcceptableStatus, View... defaultViews) { ContentNegotiatingViewResolver vr = initContentNegotiatingViewResolver(defaultViews); vr.setUseNotAcceptableStatusCode(useNotAcceptableStatus); }
/** * Enable use of a {@link ContentNegotiatingViewResolver} to front all other * configured view resolvers and select among all selected Views based on * media types requested by the client (e.g. in the Accept header). * <p>If invoked multiple times the provided default views will be added to * any other default views that may have been configured already. * @see ContentNegotiatingViewResolver#setDefaultViews */ public void enableContentNegotiation(View... defaultViews) { initContentNegotiatingViewResolver(defaultViews); }
/** * Enable use of a {@link ContentNegotiatingViewResolver} to front all other * configured view resolvers and select among all selected Views based on * media types requested by the client (e.g. in the Accept header). * <p>If invoked multiple times the provided default views will be added to * any other default views that may have been configured already. * @see ContentNegotiatingViewResolver#setDefaultViews */ public void enableContentNegotiation(boolean useNotAcceptableStatus, View... defaultViews) { initContentNegotiatingViewResolver(defaultViews); this.contentNegotiatingResolver.setUseNotAcceptableStatusCode(useNotAcceptableStatus); }