public class WatchedFilesApplicationRunListener extends BaseConfigurationFileWatcher implements org.springframework.boot.SpringApplicationRunListener
This looks for configuration parameters that have been specified on the command line. It is specifically designed to work with Spring Boot style applications.
Deliberately NOT using the WatchService as it is too complex and incorrect events for this.
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.boot.env.PropertiesPropertySourceLoader |
propertiesPropertySourceLoader |
protected net.stickycode.configured.ConfigurationSystem |
system |
protected org.springframework.boot.env.YamlPropertySourceLoader |
yamlPropertySourceLoader |
lastModified, requiresReloading, watchedFiles, watchTimeout| Constructor and Description |
|---|
WatchedFilesApplicationRunListener(org.springframework.boot.SpringApplication application,
String[] args) |
| Modifier and Type | Method and Description |
|---|---|
void |
contextLoaded(org.springframework.context.ConfigurableApplicationContext configurableApplicationContext) |
void |
contextPrepared(org.springframework.context.ConfigurableApplicationContext configurableApplicationContext) |
protected void |
determineWatchedFileListFromCommandLineArguments(String[] args) |
void |
environmentPrepared(org.springframework.core.env.ConfigurableEnvironment configurableEnvironment) |
void |
finished(org.springframework.context.ConfigurableApplicationContext configurableApplicationContext,
Throwable throwable) |
protected org.springframework.core.env.MapPropertySource |
loadPropertyFile(File newFile) |
void |
started() |
void |
starting() |
checkForTimerOverride, isProperties, isYaml, loadWatchedFiles, startWatchingprotected net.stickycode.configured.ConfigurationSystem system
protected org.springframework.boot.env.YamlPropertySourceLoader yamlPropertySourceLoader
protected org.springframework.boot.env.PropertiesPropertySourceLoader propertiesPropertySourceLoader
public WatchedFilesApplicationRunListener(org.springframework.boot.SpringApplication application,
String[] args)
protected void determineWatchedFileListFromCommandLineArguments(String[] args)
protected org.springframework.core.env.MapPropertySource loadPropertyFile(File newFile)
loadPropertyFile in class BaseConfigurationFileWatcherpublic void started()
public void starting()
starting in interface org.springframework.boot.SpringApplicationRunListenerpublic void environmentPrepared(org.springframework.core.env.ConfigurableEnvironment configurableEnvironment)
environmentPrepared in interface org.springframework.boot.SpringApplicationRunListenerpublic void contextPrepared(org.springframework.context.ConfigurableApplicationContext configurableApplicationContext)
contextPrepared in interface org.springframework.boot.SpringApplicationRunListenerpublic void contextLoaded(org.springframework.context.ConfigurableApplicationContext configurableApplicationContext)
contextLoaded in interface org.springframework.boot.SpringApplicationRunListenerpublic void finished(org.springframework.context.ConfigurableApplicationContext configurableApplicationContext,
Throwable throwable)
finished in interface org.springframework.boot.SpringApplicationRunListenerCopyright © 2017. All rights reserved.