diff --git a/spring-core/src/main/java/org/springframework/util/MimeType.java b/spring-core/src/main/java/org/springframework/util/MimeType.java index 4b6652598a52..eb5fb4cf5357 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeType.java +++ b/spring-core/src/main/java/org/springframework/util/MimeType.java @@ -16,6 +16,7 @@ package org.springframework.util; +import java.io.Serializable; import java.nio.charset.Charset; import java.util.BitSet; import java.util.Collections; @@ -45,7 +46,9 @@ * * @see MimeTypeUtils */ -public class MimeType implements Comparable { +public class MimeType implements Comparable, Serializable { + + private static final long serialVersionUID = 4085923477777865903L; protected static final String WILDCARD_TYPE = "*"; diff --git a/spring-web/src/main/java/org/springframework/http/MediaType.java b/spring-web/src/main/java/org/springframework/http/MediaType.java index 4e1c8d3826a9..a5194b9ce7c8 100644 --- a/spring-web/src/main/java/org/springframework/http/MediaType.java +++ b/spring-web/src/main/java/org/springframework/http/MediaType.java @@ -16,6 +16,7 @@ package org.springframework.http; +import java.io.Serializable; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Collection; @@ -42,7 +43,9 @@ * @since 3.0 * @see HTTP 1.1, section 3.7 */ -public class MediaType extends MimeType { +public class MediaType extends MimeType implements Serializable { + + private static final long serialVersionUID = 2069937152339670231L; /** * Public constant media type that includes all media ranges (i.e. "*/*").