Add `git.properties` to default devtools excludes

Update `DevToolsProperties` to exclude `git.properties` files.

Prior to this commit any application configured to write `git.properties`
could trigger unexpected application restarts. The problem is particularly
prevalent when using Eclipse M2E in combination with the
`git-commit-id-plugin`.

Closes gh-3938
This commit is contained in:
Craig Andrews 2015-09-09 21:08:44 -04:00 committed by Phillip Webb
parent a63ec53d2b
commit 84da5a26a7
2 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,7 @@ public class DevToolsProperties {
private static final String DEFAULT_RESTART_EXCLUDES = "META-INF/maven/**," private static final String DEFAULT_RESTART_EXCLUDES = "META-INF/maven/**,"
+ "META-INF/resources/**,resources/**,static/**,public/**,templates/**," + "META-INF/resources/**,resources/**,static/**,public/**,templates/**,"
+ "**/*Test.class,**/*Tests.class"; + "**/*Test.class,**/*Tests.class,git.properties";
private static final long DEFAULT_RESTART_POLL_INTERVAL = 1000; private static final long DEFAULT_RESTART_POLL_INTERVAL = 1000;

View File

@ -38,7 +38,8 @@ public class DevToolsPropertiesTests {
restart.getAllExclude(), restart.getAllExclude(),
arrayContaining("META-INF/maven/**", "META-INF/resources/**", arrayContaining("META-INF/maven/**", "META-INF/resources/**",
"resources/**", "static/**", "public/**", "templates/**", "resources/**", "static/**", "public/**", "templates/**",
"**/*Test.class", "**/*Tests.class", "foo/**", "bar/**")); "**/*Test.class", "**/*Tests.class", "git.properties", "foo/**",
"bar/**"));
} }
@Test @Test