forked from spring-cloud/spring-cloud-commons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Targeted Property Refresh in /actuator/refresh Endpoint
Fixes spring-cloud#1370
- Loading branch information
Showing
5 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...d-context/src/main/java/org/springframework/cloud/context/refresh/RefreshAllStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.springframework.cloud.context.refresh; | ||
|
||
import java.util.Set; | ||
|
||
public class RefreshAllStrategy implements RefreshStrategy { | ||
@Override | ||
public Set<String> refresh(ContextRefresher contextRefresher, Set<String> propertiesToRefresh) { | ||
return contextRefresher.refreshEnvironment(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...ain/java/org/springframework/cloud/context/refresh/RefreshSpecificPropertiesStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.springframework.cloud.context.refresh; | ||
|
||
import java.util.Set; | ||
|
||
public class RefreshSpecificPropertiesStrategy implements RefreshStrategy { | ||
@Override | ||
public Set<String> refresh(ContextRefresher contextRefresher, Set<String> propertiesToRefresh) { | ||
return contextRefresher.refreshSpecificEnvironment(propertiesToRefresh); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...loud-context/src/main/java/org/springframework/cloud/context/refresh/RefreshStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.springframework.cloud.context.refresh; | ||
|
||
import java.util.Set; | ||
|
||
public interface RefreshStrategy { | ||
Set<String> refresh(ContextRefresher contextRefresher, Set<String> propertiesToRefresh); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters