diff --git a/src/main/asciidoc/mediatypes.adoc b/src/main/asciidoc/mediatypes.adoc index 13f26c3f..27c7d0e8 100644 --- a/src/main/asciidoc/mediatypes.adoc +++ b/src/main/asciidoc/mediatypes.adoc @@ -722,7 +722,7 @@ To define your own media type could look as simple as this: [source, java] ---- @Configuration -class MyMediaTypeConfiguration implements HypermediaMappingInformation { +public class MyMediaTypeConfiguration implements HypermediaMappingInformation { @Override public List getMediaTypes() { @@ -764,3 +764,6 @@ In the `Serializer` and `Deserializer` implementations registered for `Represent The media types supported by default use the same configuration mechanism as third-party implementations would do. So it's worth studying the implementations in https://github.com/spring-projects/spring-hateoas/tree/master/src/main/java/org/springframework/hateoas/mediatype[the `mediatype` package]. +Note, that the built in media type implementations keep their configuration classes package private, as they're activated via `@EnableHypermediaSupport`. +Custom implementations should probably make those public instead to make sure, users can import those configuration classes from their application packages. +