Skip to content

Commit 67604a5

Browse files
committed
Only process main metadata as it already includes additional metadata
Previously, the configuration property table generation was reading both the main metadata and the additional metadata from each project. This was unnecessary as the annotation processor will have already merged the additional metadata into the main metadata before writing it to disk. Processing both the main and additional metadata led to a clash as the metadata overlapped. When the entry in the additional metadata won the clash, the resulting entry in the configuration property table would lose any details that aren't contained in the additional metadata. This commit updates the property table generation code to only use the main metadata files. Fixes gh-21131
1 parent 1b62aba commit 67604a5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ import java.nio.file.Path
66
import java.nio.file.Paths
77

88
def getConfigMetadataInputStreams() {
9-
def mainMetadata = getClass().getClassLoader().getResources("META-INF/spring-configuration-metadata.json")
10-
def additionalMetadata = getClass().getClassLoader().getResources("META-INF/additional-spring-configuration-metadata.json")
11-
def streams = []
12-
streams += mainMetadata.collect { new UrlResource(it).getInputStream() }
13-
streams += additionalMetadata.collect { new UrlResource(it).getInputStream() }
14-
return streams
9+
return getClass().getClassLoader().getResources("META-INF/spring-configuration-metadata.json")
10+
.collect { new UrlResource(it).getInputStream() }
1511
}
1612

1713
def generateConfigMetadataDocumentation() {

0 commit comments

Comments
 (0)