From 55e7c834988ad2e3d080fe39c8451ebfa7ed2c16 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 3 Oct 2025 11:29:48 +0100 Subject: [PATCH] Allow modules to contribute to Devtools' default properties Closes gh-44792 --- .../DocumentDevtoolsPropertyDefaults.java | 57 ++++++++++++------- .../META-INF/spring-devtools.properties | 3 + .../META-INF/spring-devtools.properties | 1 + documentation/spring-boot-docs/build.gradle | 8 ++- module/spring-boot-devtools/build.gradle | 8 --- ...DevToolsPropertyDefaultsPostProcessor.java | 27 +-------- .../devtools/settings/DevToolsSettings.java | 17 +++++- .../env/devtools-property-defaults.properties | 17 ------ .../DevToolPropertiesIntegrationTests.java | 33 +++++++---- .../settings/DevToolsSettingsTests.java | 9 +++ .../spring-devtools-defaults.properties | 3 + .../META-INF/spring-devtools.properties | 1 + .../META-INF/spring-devtools.properties | 1 + .../META-INF/spring-devtools.properties | 1 + .../META-INF/spring-devtools.properties | 1 + .../META-INF/spring-devtools.properties | 1 + .../META-INF/spring-devtools.properties | 1 + .../META-INF/spring-devtools.properties | 1 + .../META-INF/spring-devtools.properties | 5 ++ .../META-INF/spring-devtools.properties | 1 + 20 files changed, 112 insertions(+), 84 deletions(-) create mode 100644 core/spring-boot-autoconfigure/src/main/resources/META-INF/spring-devtools.properties create mode 100644 core/spring-boot-docker-compose/src/main/resources/META-INF/spring-devtools.properties delete mode 100644 module/spring-boot-devtools/src/main/resources/org/springframework/boot/devtools/env/devtools-property-defaults.properties create mode 100644 module/spring-boot-devtools/src/test/resources/org/springframework/boot/devtools/settings/spring-devtools-defaults.properties create mode 100644 module/spring-boot-freemarker/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-graphql/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-groovy-templates/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-h2console/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-mustache/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-reactor-netty/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-thymeleaf/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-web-server/src/main/resources/META-INF/spring-devtools.properties create mode 100644 module/spring-boot-webmvc/src/main/resources/META-INF/spring-devtools.properties diff --git a/buildSrc/src/main/java/org/springframework/boot/build/devtools/DocumentDevtoolsPropertyDefaults.java b/buildSrc/src/main/java/org/springframework/boot/build/devtools/DocumentDevtoolsPropertyDefaults.java index 242143ac1d2..ac1afae990c 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/devtools/DocumentDevtoolsPropertyDefaults.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/devtools/DocumentDevtoolsPropertyDefaults.java @@ -16,22 +16,24 @@ package org.springframework.boot.build.devtools; -import java.io.FileInputStream; +import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; -import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.TreeMap; +import java.util.jar.JarFile; +import java.util.zip.ZipEntry; import org.gradle.api.DefaultTask; -import org.gradle.api.artifacts.Configuration; import org.gradle.api.file.FileCollection; import org.gradle.api.file.RegularFileProperty; import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.OutputFile; +import org.gradle.api.tasks.PathSensitive; +import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.TaskAction; /** @@ -41,22 +43,22 @@ import org.gradle.api.tasks.TaskAction; */ public abstract class DocumentDevtoolsPropertyDefaults extends DefaultTask { - private final Configuration devtools; + private FileCollection defaults; public DocumentDevtoolsPropertyDefaults() { - this.devtools = getProject().getConfigurations().create("devtools"); getOutputFile().convention(getProject().getLayout() .getBuildDirectory() .file("generated/docs/using/devtools-property-defaults.adoc")); - Map dependency = new HashMap<>(); - dependency.put("path", ":module:spring-boot-devtools"); - dependency.put("configuration", "propertyDefaults"); - this.devtools.getDependencies().add(getProject().getDependencies().project(dependency)); } @InputFiles - public FileCollection getDevtools() { - return this.devtools; + @PathSensitive(PathSensitivity.RELATIVE) + public FileCollection getDefaults() { + return this.defaults; + } + + public void setDefaults(FileCollection defaults) { + this.defaults = defaults; } @OutputFile @@ -64,23 +66,36 @@ public abstract class DocumentDevtoolsPropertyDefaults extends DefaultTask { @TaskAction void documentPropertyDefaults() throws IOException { - Map properties = loadProperties(); - documentProperties(properties); + Map propertyDefaults = loadPropertyDefaults(); + documentPropertyDefaults(propertyDefaults); } - private Map loadProperties() throws IOException, FileNotFoundException { + private Map loadPropertyDefaults() throws IOException, FileNotFoundException { Properties properties = new Properties(); - Map sortedProperties = new TreeMap<>(); - try (FileInputStream stream = new FileInputStream(this.devtools.getSingleFile())) { - properties.load(stream); - for (String name : properties.stringPropertyNames()) { - sortedProperties.put(name, properties.getProperty(name)); + Map propertyDefaults = new TreeMap<>(); + for (File contribution : this.defaults.getFiles()) { + if (contribution.isFile()) { + try (JarFile jar = new JarFile(contribution)) { + ZipEntry entry = jar.getEntry("META-INF/spring-devtools.properties"); + if (entry != null) { + properties.load(jar.getInputStream(entry)); + } + } + } + else if (contribution.exists()) { + throw new IllegalStateException( + "Unexpected Devtools default properties contribution from '" + contribution + "'"); } } - return sortedProperties; + for (String name : properties.stringPropertyNames()) { + if (name.startsWith("defaults.")) { + propertyDefaults.put(name.substring("defaults.".length()), properties.getProperty(name)); + } + } + return propertyDefaults; } - private void documentProperties(Map properties) throws IOException { + private void documentPropertyDefaults(Map properties) throws IOException { try (PrintWriter writer = new PrintWriter(new FileWriter(getOutputFile().getAsFile().get()))) { writer.println("[cols=\"3,1\"]"); writer.println("|==="); diff --git a/core/spring-boot-autoconfigure/src/main/resources/META-INF/spring-devtools.properties b/core/spring-boot-autoconfigure/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..9d490e918b2 --- /dev/null +++ b/core/spring-boot-autoconfigure/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1,3 @@ +defaults.spring.template.provider.cache=false +defaults.spring.web.resources.cache.period=0 +defaults.spring.web.resources.chain.cache=false diff --git a/core/spring-boot-docker-compose/src/main/resources/META-INF/spring-devtools.properties b/core/spring-boot-docker-compose/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..e107eaef901 --- /dev/null +++ b/core/spring-boot-docker-compose/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.docker.compose.readiness.wait=only-if-started diff --git a/documentation/spring-boot-docs/build.gradle b/documentation/spring-boot-docs/build.gradle index 59a828fcba0..244d3d0329b 100644 --- a/documentation/spring-boot-docs/build.gradle +++ b/documentation/spring-boot-docs/build.gradle @@ -322,6 +322,10 @@ aggregates { category = Category.DOCUMENTATION usage = "test-slice-metadata" } + devtoolsPropertyDefaults { + category = Category.LIBRARY + usage = "java-runtime" + } } tasks.register("documentTestSlices", org.springframework.boot.build.test.autoconfigure.DocumentTestSlices) { @@ -363,7 +367,9 @@ tasks.register("documentConfigurationProperties", org.springframework.boot.build outputDir = layout.buildDirectory.dir("generated/docs/application-properties") } -tasks.register("documentDevtoolsPropertyDefaults", org.springframework.boot.build.devtools.DocumentDevtoolsPropertyDefaults) {} +tasks.register("documentDevtoolsPropertyDefaults", org.springframework.boot.build.devtools.DocumentDevtoolsPropertyDefaults) { + defaults = aggregates.devtoolsPropertyDefaults.files +} tasks.register("runRemoteSpringApplicationExample", org.springframework.boot.build.docs.ApplicationRunner) { classpath = configurations.remoteSpringApplicationExample diff --git a/module/spring-boot-devtools/build.gradle b/module/spring-boot-devtools/build.gradle index 4b4e3cee45c..a29b485bb6b 100644 --- a/module/spring-boot-devtools/build.gradle +++ b/module/spring-boot-devtools/build.gradle @@ -29,13 +29,6 @@ configurations { intTestDependencies { extendsFrom dependencyManagement } - propertyDefaults -} - -artifacts { - propertyDefaults(file("build/resources/main/org/springframework/boot/devtools/env/devtools-property-defaults.properties")) { - builtBy(processResources) - } } dependencies { @@ -60,7 +53,6 @@ dependencies { intTestImplementation("org.apache.httpcomponents.client5:httpclient5") intTestImplementation("net.bytebuddy:byte-buddy") - intTestRuntimeOnly("org.springframework:spring-web") optional(project(":module:spring-boot-jdbc")) diff --git a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java index d220d9a4e6b..8f4d3e949c7 100755 --- a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java +++ b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java @@ -16,12 +16,8 @@ package org.springframework.boot.devtools.env; -import java.io.IOException; -import java.io.InputStream; import java.util.Collections; -import java.util.HashMap; import java.util.Map; -import java.util.Properties; import org.apache.commons.logging.Log; import org.jspecify.annotations.Nullable; @@ -30,6 +26,7 @@ import org.springframework.boot.EnvironmentPostProcessor; import org.springframework.boot.SpringApplication; import org.springframework.boot.devtools.logger.DevToolsLogFactory; import org.springframework.boot.devtools.restart.Restarter; +import org.springframework.boot.devtools.settings.DevToolsSettings; import org.springframework.boot.devtools.system.DevToolsEnablementDeducer; import org.springframework.core.NativeDetector; import org.springframework.core.Ordered; @@ -69,7 +66,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro PROPERTIES = Collections.emptyMap(); } else { - PROPERTIES = loadDefaultProperties(); + PROPERTIES = DevToolsSettings.get().getPropertyDefaults(); } } @@ -133,24 +130,4 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro } } - private static Map loadDefaultProperties() { - Properties properties = new Properties(); - try (InputStream stream = DevToolsPropertyDefaultsPostProcessor.class - .getResourceAsStream("devtools-property-defaults.properties")) { - if (stream == null) { - throw new RuntimeException( - "Failed to load devtools-property-defaults.properties because it doesn't exist"); - } - properties.load(stream); - } - catch (IOException ex) { - throw new RuntimeException("Failed to load devtools-property-defaults.properties", ex); - } - Map map = new HashMap<>(); - for (String name : properties.stringPropertyNames()) { - map.put(name, properties.getProperty(name)); - } - return Collections.unmodifiableMap(map); - } - } diff --git a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java index 79e87cdbb8e..5b6ffbe78bf 100644 --- a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java +++ b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java @@ -18,7 +18,9 @@ package org.springframework.boot.devtools.settings; import java.net.URL; import java.util.ArrayList; +import java.util.Collections; import java.util.Enumeration; +import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -52,14 +54,23 @@ public class DevToolsSettings { private final List restartExcludePatterns = new ArrayList<>(); + private final Map propertyDefaults = new HashMap<>(); + DevToolsSettings() { } - void add(Map properties) { + private void add(Map properties) { Map includes = getPatterns(properties, "restart.include."); this.restartIncludePatterns.addAll(includes.values()); Map excludes = getPatterns(properties, "restart.exclude."); this.restartExcludePatterns.addAll(excludes.values()); + properties.forEach((key, value) -> { + String name = String.valueOf(key); + if (name.startsWith("defaults.")) { + name = name.substring("defaults.".length()); + this.propertyDefaults.put(name, value); + } + }); } private Map getPatterns(Map properties, String prefix) { @@ -82,6 +93,10 @@ public class DevToolsSettings { return isMatch(url.toString(), this.restartExcludePatterns); } + public Map getPropertyDefaults() { + return Collections.unmodifiableMap(this.propertyDefaults); + } + private boolean isMatch(String url, List patterns) { for (Pattern pattern : patterns) { if (pattern.matcher(url).find()) { diff --git a/module/spring-boot-devtools/src/main/resources/org/springframework/boot/devtools/env/devtools-property-defaults.properties b/module/spring-boot-devtools/src/main/resources/org/springframework/boot/devtools/env/devtools-property-defaults.properties deleted file mode 100644 index 1d86f504552..00000000000 --- a/module/spring-boot-devtools/src/main/resources/org/springframework/boot/devtools/env/devtools-property-defaults.properties +++ /dev/null @@ -1,17 +0,0 @@ -server.error.include-binding-errors=always -server.error.include-message=always -server.error.include-stacktrace=always -server.servlet.jsp.init-parameters.development=true -server.servlet.session.persistent=true -spring.freemarker.cache=false -spring.graphql.graphiql.enabled=true -spring.groovy.template.cache=false -spring.h2.console.enabled=true -spring.mustache.servlet.cache=false -spring.mvc.log-resolved-exception=true -spring.reactor.netty.shutdown-quiet-period=0s -spring.template.provider.cache=false -spring.thymeleaf.cache=false -spring.web.resources.cache.period=0 -spring.web.resources.chain.cache=false -spring.docker.compose.readiness.wait=only-if-started diff --git a/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java b/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java index 70bce31c058..cfe91a606ed 100644 --- a/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java +++ b/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java @@ -18,7 +18,6 @@ package org.springframework.boot.devtools.env; import java.net.URL; import java.util.Collections; -import java.util.Locale; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; @@ -31,9 +30,10 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.boot.SpringApplication; import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.web.ErrorProperties; import org.springframework.boot.devtools.restart.RestartInitializer; import org.springframework.boot.devtools.restart.Restarter; +import org.springframework.boot.testsupport.classpath.ForkedClassPath; +import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -65,6 +65,8 @@ class DevToolPropertiesIntegrationTests { } @Test + @ForkedClassPath + @WithResource(name = "META-INF/spring-devtools.properties", content = "defaults.com.example.enabled=true") void classPropertyConditionIsAffectedByDevToolProperties() throws Exception { SpringApplication application = new SpringApplication(ClassConditionConfiguration.class); application.setWebApplicationType(WebApplicationType.NONE); @@ -73,6 +75,8 @@ class DevToolPropertiesIntegrationTests { } @Test + @ForkedClassPath + @WithResource(name = "META-INF/spring-devtools.properties", content = "defaults.com.example.enabled=true") void beanMethodPropertyConditionIsAffectedByDevToolProperties() throws Exception { SpringApplication application = new SpringApplication(BeanConditionConfiguration.class); application.setWebApplicationType(WebApplicationType.NONE); @@ -81,6 +85,8 @@ class DevToolPropertiesIntegrationTests { } @Test + @ForkedClassPath + @WithResource(name = "META-INF/spring-devtools.properties", content = "defaults.com.example.enabled=true") void postProcessWhenRestarterDisabledAndRemoteSecretNotSetShouldNotAddPropertySource() throws Exception { Restarter.clearInstance(); Restarter.disable(); @@ -94,6 +100,8 @@ class DevToolPropertiesIntegrationTests { } @Test + @ForkedClassPath + @WithResource(name = "META-INF/spring-devtools.properties", content = "defaults.com.example.enabled=true") void postProcessWhenRestarterDisabledAndRemoteSecretSetShouldAddPropertySource() throws Exception { Restarter.clearInstance(); Restarter.disable(); @@ -105,17 +113,20 @@ class DevToolPropertiesIntegrationTests { } @Test - void postProcessEnablesIncludeStackTraceProperty() throws Exception { + @ForkedClassPath + @WithResource(name = "META-INF/spring-devtools.properties", content = """ + defaults.com.example.one=alpha + defaults.com.example.two=bravo + """) + void postProcessSetsPropertyDefaults() throws Exception { SpringApplication application = new SpringApplication(TestConfiguration.class); application.setWebApplicationType(WebApplicationType.NONE); this.context = getContext(application::run); ConfigurableEnvironment environment = this.context.getEnvironment(); - String includeStackTrace = environment.getProperty("server.error.include-stacktrace"); - assertThat(includeStackTrace) - .isEqualTo(ErrorProperties.IncludeAttribute.ALWAYS.toString().toLowerCase(Locale.ENGLISH)); - String includeMessage = environment.getProperty("server.error.include-message"); - assertThat(includeMessage) - .isEqualTo(ErrorProperties.IncludeAttribute.ALWAYS.toString().toLowerCase(Locale.ENGLISH)); + String one = environment.getProperty("com.example.one"); + assertThat(one).isEqualTo("alpha"); + String two = environment.getProperty("com.example.two"); + assertThat(two).isEqualTo("bravo"); } protected ConfigurableApplicationContext getContext(Supplier supplier) @@ -138,7 +149,7 @@ class DevToolPropertiesIntegrationTests { } @Configuration(proxyBeanMethods = false) - @ConditionalOnProperty("spring.h2.console.enabled") + @ConditionalOnProperty("com.example.enabled") static class ClassConditionConfiguration { } @@ -147,7 +158,7 @@ class DevToolPropertiesIntegrationTests { static class BeanConditionConfiguration { @Bean - @ConditionalOnProperty("spring.h2.console.enabled") + @ConditionalOnProperty("com.example.enabled") MyBean myBean() { return new MyBean(); } diff --git a/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/settings/DevToolsSettingsTests.java b/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/settings/DevToolsSettingsTests.java index dd32f58e8d3..de6132b6cae 100644 --- a/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/settings/DevToolsSettingsTests.java +++ b/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/settings/DevToolsSettingsTests.java @@ -19,6 +19,7 @@ package org.springframework.boot.devtools.settings; import java.io.File; import java.io.IOException; import java.net.URL; +import java.util.Map; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -60,6 +61,14 @@ class DevToolsSettingsTests { assertThat(settings.isRestartExclude(makeUrl(tempDir, "spring-boot-starter-some-thing"))).isTrue(); } + @Test + void propertyDefaults() { + DevToolsSettings settings = DevToolsSettings.load(ROOT + "spring-devtools-defaults.properties"); + Map propertyDefaults = settings.getPropertyDefaults(); + assertThat(propertyDefaults) + .containsExactlyInAnyOrderEntriesOf(Map.of("com.example.a", "true", "com.example.b", "17")); + } + private URL makeUrl(File file, String name) throws IOException { file = new File(file, name); file = new File(file, "build"); diff --git a/module/spring-boot-devtools/src/test/resources/org/springframework/boot/devtools/settings/spring-devtools-defaults.properties b/module/spring-boot-devtools/src/test/resources/org/springframework/boot/devtools/settings/spring-devtools-defaults.properties new file mode 100644 index 00000000000..5780cc7f4cf --- /dev/null +++ b/module/spring-boot-devtools/src/test/resources/org/springframework/boot/devtools/settings/spring-devtools-defaults.properties @@ -0,0 +1,3 @@ +defaults.com.example.a=true +defaults.com.example.b=17 + diff --git a/module/spring-boot-freemarker/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-freemarker/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..4383de89c17 --- /dev/null +++ b/module/spring-boot-freemarker/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.freemarker.cache=false diff --git a/module/spring-boot-graphql/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-graphql/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..ed954da9f23 --- /dev/null +++ b/module/spring-boot-graphql/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.graphql.graphiql.enabled=true diff --git a/module/spring-boot-groovy-templates/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-groovy-templates/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..23deb697faa --- /dev/null +++ b/module/spring-boot-groovy-templates/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.groovy.template.cache=false diff --git a/module/spring-boot-h2console/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-h2console/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..a1feca24bd7 --- /dev/null +++ b/module/spring-boot-h2console/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.h2.console.enabled=true diff --git a/module/spring-boot-mustache/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-mustache/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..643ed85f344 --- /dev/null +++ b/module/spring-boot-mustache/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.mustache.servlet.cache=false diff --git a/module/spring-boot-reactor-netty/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-reactor-netty/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..c8d8b60a1f2 --- /dev/null +++ b/module/spring-boot-reactor-netty/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.reactor.netty.shutdown-quiet-period=0s diff --git a/module/spring-boot-thymeleaf/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-thymeleaf/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..fe419a216e2 --- /dev/null +++ b/module/spring-boot-thymeleaf/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.thymeleaf.cache=false diff --git a/module/spring-boot-web-server/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-web-server/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..bd1efd90b50 --- /dev/null +++ b/module/spring-boot-web-server/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1,5 @@ +defaults.server.error.include-binding-errors=always +defaults.server.error.include-message=always +defaults.server.error.include-stacktrace=always +defaults.server.servlet.jsp.init-parameters.development=true +defaults.server.servlet.session.persistent=true diff --git a/module/spring-boot-webmvc/src/main/resources/META-INF/spring-devtools.properties b/module/spring-boot-webmvc/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 00000000000..b9c5ae27827 --- /dev/null +++ b/module/spring-boot-webmvc/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +defaults.spring.mvc.log-resolved-exception=true