-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Remove skipping of spring-boot-* projects when determining what is eligible for DevTools restart #23158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See #4040 |
I'm not sure that I understand diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/DefaultSourceDirectoryUrlFilter.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/DefaultSourceDirectoryUrlFilter.java
index b2fb5a550d..0d16d82221 100644
--- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/DefaultSourceDirectoryUrlFilter.java
+++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/DefaultSourceDirectoryUrlFilter.java
@@ -17,9 +17,6 @@
package org.springframework.boot.devtools.restart.server;
import java.net.URL;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -40,9 +37,6 @@ public class DefaultSourceDirectoryUrlFilter implements SourceDirectoryUrlFilter
private static final Pattern VERSION_PATTERN = Pattern.compile("^-\\d+(?:\\.\\d+)*(?:[.-].+)?$");
- private static final Set<String> SKIPPED_PROJECTS = new HashSet<>(Arrays.asList("spring-boot",
- "spring-boot-devtools", "spring-boot-autoconfigure", "spring-boot-actuator", "spring-boot-starter"));
-
@Override
public boolean isMatch(String sourceDirectory, URL url) {
String jarName = getJarName(url);
@@ -73,7 +67,7 @@ public class DefaultSourceDirectoryUrlFilter implements SourceDirectoryUrlFilter
}
private boolean isDirectoryMatch(String directory, String jarName) {
- if (!jarName.startsWith(directory) || SKIPPED_PROJECTS.contains(directory)) {
+ if (!jarName.startsWith(directory)) {
return false;
}
String version = jarName.substring(directory.length()); Any ideas, @philwebb? |
Sorry @wilkinsona, I've been looking at the commit logs and trying to remember but I have no idea. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prompted by #3315 (comment), I think we should review DevTools' restart excludes and make them more apparent at runtime.
The current defaults are a little odd as they're tailored towards Spring Boot's development, ignoring
…/target/classes
in 2.2.x which is built with Maven and…/build
in 2.3.x which is built with Gradle. The behaviour that users see shouldn't be affected by the build system used to build Boot itself so it feels like we should either remove these default excludes or alter them so that they don't only apply to a particular build system.When excludes have been applied – particularly when they leave you with no changeable URLs, and, therefore, no restart – it's not obvious that's what has happened. We should look at improving the logging somehow to help users to identify why changes to their application are having no effect.
The text was updated successfully, but these errors were encountered: