diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessor.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessor.java index 31059662243..54aa625f7e7 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessor.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessor.java @@ -47,8 +47,8 @@ public class DevToolsHomePropertiesPostProcessor implements EnvironmentPostProce private static final String LEGACY_FILE_NAME = ".spring-boot-devtools.properties"; - private static final String[] FILE_NAMES = new String[] { ".spring-boot-devtools.yml", ".spring-boot-devtools.yaml", - ".spring-boot-devtools.properties" }; + private static final String[] FILE_NAMES = new String[] { "spring-boot-devtools.yml", "spring-boot-devtools.yaml", + "spring-boot-devtools.properties" }; private static final String CONFIG_PATH = "/.config/spring-boot/"; diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java index fe76b392463..009d0787602 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java @@ -65,7 +65,7 @@ class DevToolsHomePropertiesPostProcessorTests { void loadsPropertiesFromConfigFolderUsingProperties() throws Exception { Properties properties = new Properties(); properties.put("abc", "def"); - OutputStream out = new FileOutputStream(new File(this.configDir, ".spring-boot-devtools.properties")); + OutputStream out = new FileOutputStream(new File(this.configDir, "spring-boot-devtools.properties")); properties.store(out, null); out.close(); ConfigurableEnvironment environment = getPostProcessedEnvironment(); @@ -76,7 +76,7 @@ class DevToolsHomePropertiesPostProcessorTests { void loadsPropertiesFromConfigFolderUsingYml() throws Exception { Properties properties = new Properties(); properties.put("abc", "def"); - OutputStream out = new FileOutputStream(new File(this.configDir, ".spring-boot-devtools.yml")); + OutputStream out = new FileOutputStream(new File(this.configDir, "spring-boot-devtools.yml")); properties.store(out, null); out.close(); ConfigurableEnvironment environment = getPostProcessedEnvironment(); @@ -87,7 +87,7 @@ class DevToolsHomePropertiesPostProcessorTests { void loadsPropertiesFromConfigFolderUsingYaml() throws Exception { Properties properties = new Properties(); properties.put("abc", "def"); - OutputStream out = new FileOutputStream(new File(this.configDir, ".spring-boot-devtools.yaml")); + OutputStream out = new FileOutputStream(new File(this.configDir, "spring-boot-devtools.yaml")); properties.store(out, null); out.close(); ConfigurableEnvironment environment = getPostProcessedEnvironment(); @@ -100,13 +100,13 @@ class DevToolsHomePropertiesPostProcessorTests { properties.put("abc", "def"); properties.put("bar", "baz"); OutputStream out = new FileOutputStream( - new File(this.home + "/.config/spring-boot/", ".spring-boot-devtools.yaml")); + new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.yaml")); properties.store(out, null); out.close(); Properties properties2 = new Properties(); properties2.put("abc", "jkl"); OutputStream out2 = new FileOutputStream( - new File(this.home + "/.config/spring-boot/", ".spring-boot-devtools.properties")); + new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.properties")); properties2.store(out2, null); out2.close(); ConfigurableEnvironment environment = getPostProcessedEnvironment(); @@ -123,7 +123,7 @@ class DevToolsHomePropertiesPostProcessorTests { Properties properties2 = new Properties(); properties2.put("abc", "jkl"); OutputStream out2 = new FileOutputStream( - new File(this.home + "/.config/spring-boot/", ".spring-boot-devtools.properties")); + new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.properties")); properties2.store(out2, null); out2.close(); ConfigurableEnvironment environment = getPostProcessedEnvironment(); @@ -140,7 +140,7 @@ class DevToolsHomePropertiesPostProcessorTests { Properties properties2 = new Properties(); properties2.put("abc", "jkl"); OutputStream out2 = new FileOutputStream( - new File(this.home + "/.config/spring-boot/", ".spring-boot-devtools.yml")); + new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.yml")); properties2.store(out2, null); out2.close(); ConfigurableEnvironment environment = getPostProcessedEnvironment(); diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index 8fa14816bd9..c0a5f119445 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -891,16 +891,16 @@ If you start multiple applications from your IDE, only the first has LiveReload [[using-boot-devtools-globalsettings]] === Global Settings -You can configure global devtools settings by adding any of the following files to the `$HOME/.config/spring-boot` folder (note that the filenames startswith "`.`"): +You can configure global devtools settings by adding any of the following files to the `$HOME/.config/spring-boot` folder: -. `.spring-boot-devtools.properties` -. `.spring-boot-devtools.yaml` -. `.spring-boot-devtools.yml` +. `spring-boot-devtools.properties` +. `spring-boot-devtools.yaml` +. `spring-boot-devtools.yml` Any properties added to these file apply to _all_ Spring Boot applications on your machine that use devtools. For example, to configure restart to always use a <>, you would add the following property: -.~/config/spring-boot/.spring-boot-devtools.properties +.~/config/spring-boot/spring-boot-devtools.properties [source,properties,indent=0] ---- spring.devtools.reload.trigger-file=.reloadtrigger