Table of Contents
- Usage
- Repository
- Requirements and Downloads
- How to enable external property source reloading
- Contributions
- Licenses
This starter can auto detect the external property source (current only support java properties file) change on the file system, and triggers the refresh process of the application.
Repository contains:
propertysource-reload-spring-boot-starter
the starter project which enables propertysource reloadpropertysource-reload-example
an example demonstrating the usage of the starter
Requirements:
- Java 1.8
- Spring Framework Boot > 2.x.x (web)
Gradle:
repositories {
jcenter()
mavenCentral()
}
dependencies {
runtimeOnly 'io.github.topikachu:propertysource-reload-spring-boot-starter:0.0.1'
}
Maven:
<dependency>
<groupId>io.github.topikachu</groupId>
<artifactId>propertysource-reload-spring-boot-starter</artifactId>
<version>0.0.1</version>
<scope>runtime</scope>
</dependency>
This starter requires the Spring Cloud Context . Add at least one Spring Cloud module, for example:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter</artifactId>
</dependency>
Available Spring Boot bootstrap configuration parameter (either bootstrap.properties
or bootstrap.yaml
):
propertysource.reload.properties-files=config/foo.properties,config/bar.properties
propertysource.reload.poll-interval=5000
propertysource.reload.ignore-resource-not-found=true
Once the contents of the configuration file specified in propertysource.reload.properties-files
are change, the application is reload automatically.
Contributions are welcome. Please respect the Code of Conduct.
propertysource-reload-spring-boot-starter
are licensed under the Apache 2.0 License. See LICENSE for details.