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