Skip to content

Commit

Permalink
Fix exclude filter to not exclude MediaType
Browse files Browse the repository at this point in the history
This commit removes MediaType from the list of exclude types as it looks
like an error: MediaType has a constructor taking a `String` and binding
works fine with it.

This has the effect of properly generating the metadata for the only key
that Spring Boot exposes with a MediaType type:
spring.data.rest.default-media-type.

Closes gh-11568
  • Loading branch information
snicoll committed Jan 8, 2018
1 parent 4568f14 commit b9f4fd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ content into your application; rather pick only the properties that you need.
# DATA REST ({sc-spring-boot-autoconfigure}/data/rest/RepositoryRestProperties.{sc-ext}[RepositoryRestProperties])
spring.data.rest.base-path= # Base path to be used by Spring Data REST to expose repository resources.
spring.data.rest.default-media-type= # Content type to use as a default when none is specified.
spring.data.rest.default-page-size= # Default size of pages.
spring.data.rest.detection-strategy=default # Strategy to use to determine which repositories get exposed.
spring.data.rest.enable-enum-translation= # Enable enum value translation via the Spring Data REST default resource bundle.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -46,7 +46,6 @@ class TypeExcludeFilter {
add("org.apache.tomcat.jdbc.pool.Validator");
add("org.flywaydb.core.api.callback.FlywayCallback");
add("org.flywaydb.core.api.resolver.MigrationResolver");
add("org.springframework.http.MediaType");
}

private void add(String className) {
Expand Down

0 comments on commit b9f4fd0

Please sign in to comment.