From 48960c54d1ef7cd578792f743626af35676d56e1 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Fri, 20 Sep 2019 14:58:18 -0700 Subject: [PATCH] Drop . prefix from files in .config directory for devtools Closes gh-18006 --- .../env/DevToolsHomePropertiesPostProcessor.java | 4 ++-- .../DevToolsHomePropertiesPostProcessorTests.java | 14 +++++++------- .../src/main/asciidoc/using-spring-boot.adoc | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) 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 3105966224..54aa625f7e 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 fe76b39246..009d078760 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 8fa14816bd..c0a5f11944 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