From 172987c874b45b4390470c07e9dcd68b57c7b02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Fri, 7 Jun 2024 18:41:37 +0200 Subject: [PATCH] Ignore checkpointOnRefresh after restore Closes gh-32978 --- .../context/support/DefaultLifecycleProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java b/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java index 91b486de53f3..d353f33ad5af 100644 --- a/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java @@ -98,7 +98,7 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor public static final String ON_REFRESH_VALUE = "onRefresh"; - private static final boolean checkpointOnRefresh = + private static boolean checkpointOnRefresh = ON_REFRESH_VALUE.equalsIgnoreCase(SpringProperties.getProperty(CHECKPOINT_PROPERTY_NAME)); private static final boolean exitOnRefresh = @@ -194,6 +194,7 @@ public void stop() { @Override public void onRefresh() { if (checkpointOnRefresh) { + checkpointOnRefresh = false; new CracDelegate().checkpointRestore(); } if (exitOnRefresh) {