Class FileMonitorConfiguration

java.lang.Object
org.springframework.cloud.config.monitor.FileMonitorConfiguration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.ResourceLoaderAware, org.springframework.context.SmartLifecycle

@Configuration(proxyBeanMethods=false) @EnableScheduling public class FileMonitorConfiguration extends Object implements org.springframework.context.SmartLifecycle, org.springframework.context.ResourceLoaderAware
Configuration for a file watcher that detects changes in local files related to the environment repository. If any files change the PropertyPathEndpoint is pinged with the paths of the files. This applies to the source files of a local git repository (i.e. a git repository with a "file:" URI) or to a native repository.
Author:
Dave Syer, Gilles Robert
  • Constructor Details

    • FileMonitorConfiguration

      public FileMonitorConfiguration()
  • Method Details

    • setResourceLoader

      public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
      Specified by:
      setResourceLoader in interface org.springframework.context.ResourceLoaderAware
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • setPhase

      public void setPhase(int phase)
      Parameters:
      phase - the phase.
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • setRunning

      public void setRunning(boolean running)
      Parameters:
      running - true if running.
      See Also:
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • setAutoStartup

      public void setAutoStartup(boolean autoStartup)
      Parameters:
      autoStartup - true to auto start.
      See Also:
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • stop

      public void stop(Runnable callback)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • poll

      @Scheduled(fixedRateString="${spring.cloud.config.server.monitor.fixedDelay:5000}") public void poll()