类 ClassPathFileSystemWatcher
- java.lang.Object
- org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher
- 所有已实现的接口:
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 aFileSystemWatcherto watch the local classpath folders for changes.- 从以下版本开始:
- 1.3.0
- 另请参阅:
ClassPathFileChangeListener
构造器概要
构造器 构造器 说明 ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, URL[] urls)Create a newClassPathFileSystemWatcherinstance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterPropertiesSet()voiddestroy()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetStopWatcherOnRestart(boolean stopWatcherOnRestart)Set if theFileSystemWatchershould be stopped when a full restart occurs.
构造器详细资料
ClassPathFileSystemWatcher
public ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, URL[] urls)
Create a newClassPathFileSystemWatcherinstance.- 参数:
fileSystemWatcherFactory- a factory to create the underlyingFileSystemWatcherused to monitor the local file systemrestartStrategy- the classpath restart strategyurls- the URLs to watch
方法详细资料
setStopWatcherOnRestart
public void setStopWatcherOnRestart(boolean stopWatcherOnRestart)
Set if theFileSystemWatchershould be stopped when a full restart occurs.- 参数:
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
- 指定者:
setApplicationContext在接口中org.springframework.context.ApplicationContextAware- 抛出:
org.springframework.beans.BeansException
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean- 抛出:
Exception