Skip to content

Commit 0578738

Browse files
author
Gong Yi
committed
Update document to use latest release
1 parent df9d307 commit 0578738

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ repositories {
4444
}
4545
4646
dependencies {
47-
implementation 'io.github.topikachu:propertysource-reload-spring-boot-starter:0.0.3'
47+
implementation 'io.github.topikachu:propertysource-reload-spring-boot-starter:0.0.4'
4848
}
4949
```
5050

@@ -53,7 +53,7 @@ Maven:
5353
<dependency>
5454
<groupId>io.github.topikachu</groupId>
5555
<artifactId>propertysource-reload-spring-boot-starter</artifactId>
56-
<version>0.0.3</version>
56+
<version>0.0.4</version>
5757
</dependency>
5858
```
5959

@@ -78,13 +78,13 @@ Other available Spring Boot bootstrap configuration parameter:
7878
propertysource.reload.poll-interval=5s
7979
propertysource.reload.strategy=refresh_environment
8080
propertysource.reload.max-wait-for-shutdown=2s
81+
propertysource.reload.max-wait-for-system-exit=10s
8182
propertysource.reload.ignore-resource-not-found=true
8283
propertysource.reload.ignore-resource-load-error=true
8384
```
8485
Once the content of the configuration file specified in `propertysource.reload.properties-files` is change, the application is reload automatically.
8586

8687
# Reload Strategy
87-
There are four strategies
8888
1. refresh_scope
8989
This is the default strategy. Execute `ContextRefresher.refresh()`.
9090
1. refresh_environment
@@ -94,6 +94,8 @@ There are four strategies
9494
1. exit_application_force
9595
Execute [`SpringApplication.exit()`](https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/SpringApplication.html#exit-org.springframework.context.ApplicationContext-org.springframework.boot.ExitCodeGenerator...-)
9696
and [`System.exit()`](https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#exit-int-)
97+
1. restart
98+
Set `management.endpoint.restart.enabled=true` to enable this strategy. See `RestartEndpoint#restart` for details.
9799

98100
# PropertySourceReloadEvent
99101
There's a `PropertySourceReloadEvent` fired after each reload. To receive this event

propertysource-reload-example/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
<groupId>org.springframework.cloud</groupId>
2929
<artifactId>spring-cloud-starter</artifactId>
3030
</dependency>
31-
<dependency>
32-
<groupId>org.springframework.boot</groupId>
33-
<artifactId>spring-boot-starter-actuator</artifactId>
34-
</dependency>
3531
<dependency>
3632
<groupId>org.projectlombok</groupId>
3733
<artifactId>lombok</artifactId>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
management.endpoint.restart.enabled=true
12

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
propertysource.reload.properties-files=config/foo.properties,config/bar.properties,config/foo.yaml,config/a.properties
22
propertysource.reload.strategy=restart
3-
management.endpoint.restart.enabled=true

0 commit comments

Comments
 (0)