Commit 48960c54 authored by Madhura Bhave's avatar Madhura Bhave

Drop . prefix from files in .config directory for devtools

Closes gh-18006
parent d092df43
...@@ -47,8 +47,8 @@ public class DevToolsHomePropertiesPostProcessor implements EnvironmentPostProce ...@@ -47,8 +47,8 @@ public class DevToolsHomePropertiesPostProcessor implements EnvironmentPostProce
private static final String LEGACY_FILE_NAME = ".spring-boot-devtools.properties"; 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", private static final String[] FILE_NAMES = new String[] { "spring-boot-devtools.yml", "spring-boot-devtools.yaml",
".spring-boot-devtools.properties" }; "spring-boot-devtools.properties" };
private static final String CONFIG_PATH = "/.config/spring-boot/"; private static final String CONFIG_PATH = "/.config/spring-boot/";
......
...@@ -65,7 +65,7 @@ class DevToolsHomePropertiesPostProcessorTests { ...@@ -65,7 +65,7 @@ class DevToolsHomePropertiesPostProcessorTests {
void loadsPropertiesFromConfigFolderUsingProperties() throws Exception { void loadsPropertiesFromConfigFolderUsingProperties() throws Exception {
Properties properties = new Properties(); Properties properties = new Properties();
properties.put("abc", "def"); 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); properties.store(out, null);
out.close(); out.close();
ConfigurableEnvironment environment = getPostProcessedEnvironment(); ConfigurableEnvironment environment = getPostProcessedEnvironment();
...@@ -76,7 +76,7 @@ class DevToolsHomePropertiesPostProcessorTests { ...@@ -76,7 +76,7 @@ class DevToolsHomePropertiesPostProcessorTests {
void loadsPropertiesFromConfigFolderUsingYml() throws Exception { void loadsPropertiesFromConfigFolderUsingYml() throws Exception {
Properties properties = new Properties(); Properties properties = new Properties();
properties.put("abc", "def"); 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); properties.store(out, null);
out.close(); out.close();
ConfigurableEnvironment environment = getPostProcessedEnvironment(); ConfigurableEnvironment environment = getPostProcessedEnvironment();
...@@ -87,7 +87,7 @@ class DevToolsHomePropertiesPostProcessorTests { ...@@ -87,7 +87,7 @@ class DevToolsHomePropertiesPostProcessorTests {
void loadsPropertiesFromConfigFolderUsingYaml() throws Exception { void loadsPropertiesFromConfigFolderUsingYaml() throws Exception {
Properties properties = new Properties(); Properties properties = new Properties();
properties.put("abc", "def"); 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); properties.store(out, null);
out.close(); out.close();
ConfigurableEnvironment environment = getPostProcessedEnvironment(); ConfigurableEnvironment environment = getPostProcessedEnvironment();
...@@ -100,13 +100,13 @@ class DevToolsHomePropertiesPostProcessorTests { ...@@ -100,13 +100,13 @@ class DevToolsHomePropertiesPostProcessorTests {
properties.put("abc", "def"); properties.put("abc", "def");
properties.put("bar", "baz"); properties.put("bar", "baz");
OutputStream out = new FileOutputStream( 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); properties.store(out, null);
out.close(); out.close();
Properties properties2 = new Properties(); Properties properties2 = new Properties();
properties2.put("abc", "jkl"); properties2.put("abc", "jkl");
OutputStream out2 = new FileOutputStream( 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); properties2.store(out2, null);
out2.close(); out2.close();
ConfigurableEnvironment environment = getPostProcessedEnvironment(); ConfigurableEnvironment environment = getPostProcessedEnvironment();
...@@ -123,7 +123,7 @@ class DevToolsHomePropertiesPostProcessorTests { ...@@ -123,7 +123,7 @@ class DevToolsHomePropertiesPostProcessorTests {
Properties properties2 = new Properties(); Properties properties2 = new Properties();
properties2.put("abc", "jkl"); properties2.put("abc", "jkl");
OutputStream out2 = new FileOutputStream( 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); properties2.store(out2, null);
out2.close(); out2.close();
ConfigurableEnvironment environment = getPostProcessedEnvironment(); ConfigurableEnvironment environment = getPostProcessedEnvironment();
...@@ -140,7 +140,7 @@ class DevToolsHomePropertiesPostProcessorTests { ...@@ -140,7 +140,7 @@ class DevToolsHomePropertiesPostProcessorTests {
Properties properties2 = new Properties(); Properties properties2 = new Properties();
properties2.put("abc", "jkl"); properties2.put("abc", "jkl");
OutputStream out2 = new FileOutputStream( 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); properties2.store(out2, null);
out2.close(); out2.close();
ConfigurableEnvironment environment = getPostProcessedEnvironment(); ConfigurableEnvironment environment = getPostProcessedEnvironment();
......
...@@ -891,16 +891,16 @@ If you start multiple applications from your IDE, only the first has LiveReload ...@@ -891,16 +891,16 @@ If you start multiple applications from your IDE, only the first has LiveReload
[[using-boot-devtools-globalsettings]] [[using-boot-devtools-globalsettings]]
=== Global Settings === 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.properties`
. `.spring-boot-devtools.yaml` . `spring-boot-devtools.yaml`
. `.spring-boot-devtools.yml` . `spring-boot-devtools.yml`
Any properties added to these file apply to _all_ Spring Boot applications on your machine that use devtools. 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 <<using-boot-devtools-restart-triggerfile, trigger file>>, you would add the following property: For example, to configure restart to always use a <<using-boot-devtools-restart-triggerfile, trigger file>>, you would add the following property:
.~/config/spring-boot/.spring-boot-devtools.properties .~/config/spring-boot/spring-boot-devtools.properties
[source,properties,indent=0] [source,properties,indent=0]
---- ----
spring.devtools.reload.trigger-file=.reloadtrigger spring.devtools.reload.trigger-file=.reloadtrigger
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment