Skip to content

Commit b9f4fd0

Browse files
committed
Fix exclude filter to not exclude MediaType
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
1 parent 4568f14 commit b9f4fd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ content into your application; rather pick only the properties that you need.
608608
609609
# DATA REST ({sc-spring-boot-autoconfigure}/data/rest/RepositoryRestProperties.{sc-ext}[RepositoryRestProperties])
610610
spring.data.rest.base-path= # Base path to be used by Spring Data REST to expose repository resources.
611+
spring.data.rest.default-media-type= # Content type to use as a default when none is specified.
611612
spring.data.rest.default-page-size= # Default size of pages.
612613
spring.data.rest.detection-strategy=default # Strategy to use to determine which repositories get exposed.
613614
spring.data.rest.enable-enum-translation= # Enable enum value translation via the Spring Data REST default resource bundle.

spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeExcludeFilter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,7 +46,6 @@ class TypeExcludeFilter {
4646
add("org.apache.tomcat.jdbc.pool.Validator");
4747
add("org.flywaydb.core.api.callback.FlywayCallback");
4848
add("org.flywaydb.core.api.resolver.MigrationResolver");
49-
add("org.springframework.http.MediaType");
5049
}
5150

5251
private void add(String className) {

0 commit comments

Comments
 (0)