List of usage examples for org.springframework.core.codec Hints isLoggingSuppressed
public static boolean isLoggingSuppressed(@Nullable Map<String, Object> hints)
From source file:org.springframework.http.codec.ResourceHttpMessageWriter.java
private static MediaType getResourceMediaType(@Nullable MediaType mediaType, Resource resource, Map<String, Object> hints) { if (mediaType != null && mediaType.isConcrete() && !mediaType.equals(MediaType.APPLICATION_OCTET_STREAM)) { return mediaType; }//ww w . j av a 2 s . co m mediaType = MediaTypeFactory.getMediaType(resource).orElse(MediaType.APPLICATION_OCTET_STREAM); if (logger.isDebugEnabled() && !Hints.isLoggingSuppressed(hints)) { logger.debug(Hints.getLogPrefix(hints) + "Resource associated with '" + mediaType + "'"); } return mediaType; }