From f77b0e4b6aa1ccbf56a2af955a434f87c8c403d4 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 9 Jul 2015 10:42:44 +0200 Subject: [PATCH] Force documentation of nested group The `strategy` group is not detected in the meta-data because the Strategy inner class is not defined at the "right" level in the hierarchy. For now, `@NestedConfigurationProperty` was added to workaround the issue. Once gh-3454 is solved, we should remove them. --- .../boot/autoconfigure/web/ResourceProperties.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java index d9fb396561..9e2022b594 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.List; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.context.ResourceLoaderAware; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -168,6 +169,7 @@ public class ResourceProperties implements ResourceLoaderAware { */ private boolean htmlApplicationCache = false; + @NestedConfigurationProperty private final Strategy strategy = new Strategy(); public Boolean getEnabled() { @@ -205,8 +207,10 @@ public class ResourceProperties implements ResourceLoaderAware { */ public static class Strategy { + @NestedConfigurationProperty private final Fixed fixed = new Fixed(); + @NestedConfigurationProperty private final Content content = new Content(); public Fixed getFixed() {