mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Polish ShutdownEndpoint
This commit is contained in:
parent
8639552405
commit
96c0e4783b
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package org.springframework.boot.actuate.context;
|
package org.springframework.boot.actuate.context;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
@ -37,11 +36,9 @@ import org.springframework.context.ConfigurableApplicationContext;
|
|||||||
@Endpoint(id = "shutdown", enableByDefault = false)
|
@Endpoint(id = "shutdown", enableByDefault = false)
|
||||||
public class ShutdownEndpoint implements ApplicationContextAware {
|
public class ShutdownEndpoint implements ApplicationContextAware {
|
||||||
|
|
||||||
private static final Map<String, String> NO_CONTEXT_MESSAGE = Collections
|
private static final Map<String, String> NO_CONTEXT_MESSAGE = Map.of("message", "No context to shutdown.");
|
||||||
.unmodifiableMap(Collections.singletonMap("message", "No context to shutdown."));
|
|
||||||
|
|
||||||
private static final Map<String, String> SHUTDOWN_MESSAGE = Collections
|
private static final Map<String, String> SHUTDOWN_MESSAGE = Map.of("message", "Shutting down, bye...");
|
||||||
.unmodifiableMap(Collections.singletonMap("message", "Shutting down, bye..."));
|
|
||||||
|
|
||||||
private ConfigurableApplicationContext context;
|
private ConfigurableApplicationContext context;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user