PathExtensionContentNegotiationStrategy strategy; if (this.servletContext != null && !useRegisteredExtensionsOnly()) { strategy = new ServletPathExtensionContentNegotiationStrategy(this.servletContext, this.mediaTypes);
/** * Initialize the content negotiation strategy depending on the {@code ContentNegotiationManager} * setup and the availability of a {@code ServletContext}. * @see ServletPathExtensionContentNegotiationStrategy * @see PathExtensionContentNegotiationStrategy */ protected PathExtensionContentNegotiationStrategy initContentNegotiationStrategy() { Map<String, MediaType> mediaTypes = null; if (getContentNegotiationManager() != null) { PathExtensionContentNegotiationStrategy strategy = getContentNegotiationManager().getStrategy(PathExtensionContentNegotiationStrategy.class); if (strategy != null) { mediaTypes = new HashMap<>(strategy.getMediaTypes()); } } return (getServletContext() != null ? new ServletPathExtensionContentNegotiationStrategy(getServletContext(), mediaTypes) : new PathExtensionContentNegotiationStrategy(mediaTypes)); }
PathExtensionContentNegotiationStrategy strategy; if (this.servletContext != null && !useRegisteredExtensionsOnly()) { strategy = new ServletPathExtensionContentNegotiationStrategy(this.servletContext, this.mediaTypes);
/** * Initialize the content negotiation strategy depending on the {@code ContentNegotiationManager} * setup and the availability of a {@code ServletContext}. * @see ServletPathExtensionContentNegotiationStrategy * @see PathExtensionContentNegotiationStrategy */ protected PathExtensionContentNegotiationStrategy initContentNegotiationStrategy() { Map<String, MediaType> mediaTypes = null; if (getContentNegotiationManager() != null) { PathExtensionContentNegotiationStrategy strategy = getContentNegotiationManager().getStrategy(PathExtensionContentNegotiationStrategy.class); if (strategy != null) { mediaTypes = new HashMap<>(strategy.getMediaTypes()); } } return (getServletContext() != null ? new ServletPathExtensionContentNegotiationStrategy(getServletContext(), mediaTypes) : new PathExtensionContentNegotiationStrategy(mediaTypes)); }
/** * Initialize the content negotiation strategy depending on the {@code ContentNegotiationManager} * setup and the availability of a {@code ServletContext}. * @see ServletPathExtensionContentNegotiationStrategy * @see PathExtensionContentNegotiationStrategy */ protected PathExtensionContentNegotiationStrategy initContentNegotiationStrategy() { Map<String, MediaType> mediaTypes = null; if (getContentNegotiationManager() != null) { PathExtensionContentNegotiationStrategy strategy = getContentNegotiationManager().getStrategy(PathExtensionContentNegotiationStrategy.class); if (strategy != null) { mediaTypes = new HashMap<String, MediaType>(strategy.getMediaTypes()); } } return (getServletContext() != null ? new ServletPathExtensionContentNegotiationStrategy(getServletContext(), mediaTypes) : new PathExtensionContentNegotiationStrategy(mediaTypes)); }
PathExtensionContentNegotiationStrategy strategy; if (this.servletContext != null) { strategy = new ServletPathExtensionContentNegotiationStrategy(this.servletContext, this.mediaTypes); } else { strategy = new PathExtensionContentNegotiationStrategy(this.mediaTypes);
PathExtensionContentNegotiationStrategy strategy; if (this.servletContext != null && !useRegisteredExtensionsOnly()) { strategy = new ServletPathExtensionContentNegotiationStrategy(this.servletContext, this.mediaTypes);
PathExtensionContentNegotiationStrategy strategy; if (this.servletContext != null && !useRegisteredExtensionsOnly()) { strategy = new ServletPathExtensionContentNegotiationStrategy(this.servletContext, this.mediaTypes);