Drop . prefix from files in .config directory for devtools

Closes gh-18006
This commit is contained in:
Madhura Bhave 2019-09-20 14:58:18 -07:00
parent d092df43b7
commit 48960c54d1
3 changed files with 14 additions and 14 deletions

View File

@ -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/";

View File

@ -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();

View File

@ -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 <<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]
----
spring.devtools.reload.trigger-file=.reloadtrigger