接口的使用
org.springframework.boot.SpringApplicationHook
使用SpringApplicationHook的程序包
-
org.springframework.boot中SpringApplicationHook的使用
修饰符和类型方法说明static void
SpringApplication.withHook
(SpringApplicationHook hook, Runnable action) Perform the given action with the givenSpringApplicationHook
attached if the action triggers anapplication run
.static <T> T
SpringApplication.withHook
(SpringApplicationHook hook, ThrowingSupplier<T> action) Perform the given action with the givenSpringApplicationHook
attached if the action triggers anapplication run
.