Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

import java.util.Set;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.boot.devtools.filewatch.ChangedFile;
import org.springframework.boot.devtools.filewatch.ChangedFiles;
import org.springframework.boot.devtools.filewatch.FileChangeListener;
Expand All @@ -35,6 +38,8 @@
*/
class ClassPathFileChangeListener implements FileChangeListener {

private static final Log logger = LogFactory.getLog(ClassPathFileChangeListener.class);

private final ApplicationEventPublisher eventPublisher;

private final ClassPathRestartStrategy restartStrategy;
Expand All @@ -60,6 +65,9 @@ class ClassPathFileChangeListener implements FileChangeListener {
@Override
public void onChange(Set<ChangedFiles> changeSet) {
boolean restart = isRestartRequired(changeSet);
if (restart && logger.isDebugEnabled()) {
logger.debug("Restarting dev tools due to changes in the following files: " + changeSet);
}
publishEvent(new ClassPathChangedEvent(this, changeSet, restart));
}

Expand Down