Class ClassPathFileSystemWatcher
- java.lang.Object
- org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher
 
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware,- org.springframework.beans.factory.DisposableBean,- org.springframework.beans.factory.InitializingBean,- org.springframework.context.ApplicationContextAware
 - public class ClassPathFileSystemWatcher extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware Encapsulates a- FileSystemWatcherto watch the local classpath folders for changes.- Since:
- 1.3.0
- See Also:
- ClassPathFileChangeListener
 
- Constructor Summary- Constructors - Constructor - Description - ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, URL[] urls)Create a new- ClassPathFileSystemWatcherinstance.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - void- afterPropertiesSet()- void- destroy()- void- setApplicationContext(org.springframework.context.ApplicationContext applicationContext)- void- setStopWatcherOnRestart(boolean stopWatcherOnRestart)Set if the- FileSystemWatchershould be stopped when a full restart occurs.
 
- Constructor Detail- ClassPathFileSystemWatcher- public ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, URL[] urls) Create a new- ClassPathFileSystemWatcherinstance.- Parameters:
- fileSystemWatcherFactory- a factory to create the underlying- FileSystemWatcherused to monitor the local file system
- restartStrategy- the classpath restart strategy
- urls- the URLs to watch
 
 
 - Method Detail- setStopWatcherOnRestart- public void setStopWatcherOnRestart(boolean stopWatcherOnRestart) Set if the- FileSystemWatchershould be stopped when a full restart occurs.- Parameters:
- stopWatcherOnRestart- if the watcher should be stopped when a restart occurs
 
 - setApplicationContext- public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
- setApplicationContextin interface- org.springframework.context.ApplicationContextAware
- Throws:
- org.springframework.beans.BeansException
 
 - afterPropertiesSet- public void afterPropertiesSet() throws Exception - Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
- Throws:
- Exception