Class HalMediaTypeConfiguration
java.lang.Object
org.springframework.hateoas.mediatype.hal.HalMediaTypeConfiguration
- All Implemented Interfaces:
HypermediaMappingInformation
@Configuration(proxyBeanMethods=false)
public class HalMediaTypeConfiguration
extends Object
implements HypermediaMappingInformation
Spring configuration to set up HAL support.
- Author:
- Greg Turnquist, Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionHalMediaTypeConfiguration(LinkRelationProvider relProvider, org.springframework.beans.factory.ObjectProvider<CurieProvider> curieProvider, org.springframework.beans.factory.ObjectProvider<HalConfiguration> halConfiguration, org.springframework.beans.factory.ObjectProvider<MediaTypeConfigurationCustomizer<HalConfiguration>> customizers, MessageResolver resolver, org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory) -
Method Summary
Modifier and TypeMethodDescriptiontools.jackson.databind.json.JsonMapper.BuilderconfigureJsonMapper(tools.jackson.databind.json.JsonMapper.Builder builder) Configure anJsonMapper.Builderand register custom serializers and deserializers for the supported media types.List<org.springframework.http.MediaType>AllMediaTypes this hypermedia can handle.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.hateoas.config.HypermediaMappingInformation
getJacksonModule, getRootType
-
Constructor Details
-
HalMediaTypeConfiguration
public HalMediaTypeConfiguration(LinkRelationProvider relProvider, org.springframework.beans.factory.ObjectProvider<CurieProvider> curieProvider, org.springframework.beans.factory.ObjectProvider<HalConfiguration> halConfiguration, org.springframework.beans.factory.ObjectProvider<MediaTypeConfigurationCustomizer<HalConfiguration>> customizers, MessageResolver resolver, org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory)
-
-
Method Details
-
getMediaTypes
Description copied from interface:HypermediaMappingInformationAllMediaTypes this hypermedia can handle.- Specified by:
getMediaTypesin interfaceHypermediaMappingInformation- Returns:
-
configureJsonMapper
public tools.jackson.databind.json.JsonMapper.Builder configureJsonMapper(tools.jackson.databind.json.JsonMapper.Builder builder) Description copied from interface:HypermediaMappingInformationConfigure anJsonMapper.Builderand register custom serializers and deserializers for the supported media types. If all you want to do is register a JacksonModule, prefer implementingHypermediaMappingInformation.getJacksonModule().- Specified by:
configureJsonMapperin interfaceHypermediaMappingInformation- Parameters:
builder- will never be null.- Returns:
- must not be null.
- See Also:
-