public class WatchedFilesApplicationRunListener extends Object 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 Map<File,Long> |
lastModified |
protected org.springframework.boot.env.PropertiesPropertySourceLoader |
propertiesPropertySourceLoader |
protected boolean |
requiresReloading |
protected net.stickycode.configured.ConfigurationSystem |
system |
protected Set<File> |
watchedFiles |
protected int |
watchTimeout |
protected org.springframework.boot.env.YamlPropertySourceLoader |
yamlPropertySourceLoader |
| Constructor and Description |
|---|
WatchedFilesApplicationRunListener(org.springframework.boot.SpringApplication application,
String[] args) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkForTimerOverride() |
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 void |
loadWatchedFiles() |
void |
started() |
void |
starting() |
protected net.stickycode.configured.ConfigurationSystem system
protected int watchTimeout
protected org.springframework.boot.env.YamlPropertySourceLoader yamlPropertySourceLoader
protected org.springframework.boot.env.PropertiesPropertySourceLoader propertiesPropertySourceLoader
protected boolean requiresReloading
public WatchedFilesApplicationRunListener(org.springframework.boot.SpringApplication application,
String[] args)
protected void determineWatchedFileListFromCommandLineArguments(String[] args)
protected void loadWatchedFiles()
protected void checkForTimerOverride()
public 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.