接口的使用
org.springframework.boot.BootstrapRegistry.InstanceSupplier
-
org.springframework.boot中BootstrapRegistry.InstanceSupplier的使用
修饰符和类型方法说明static <T> BootstrapRegistry.InstanceSupplier
<T> Factory method that can be used to create anBootstrapRegistry.InstanceSupplier
from aSupplier
.BootstrapRegistry.getRegisteredInstanceSupplier
(Class<T> type) Return any existingBootstrapRegistry.InstanceSupplier
for the given type.DefaultBootstrapContext.getRegisteredInstanceSupplier
(Class<T> type) static <T> BootstrapRegistry.InstanceSupplier
<T> BootstrapRegistry.InstanceSupplier.of
(T instance) Factory method that can be used to create anBootstrapRegistry.InstanceSupplier
for a given instance.default BootstrapRegistry.InstanceSupplier
<T> BootstrapRegistry.InstanceSupplier.withScope
(BootstrapRegistry.Scope scope) Return a newBootstrapRegistry.InstanceSupplier
with an updatedBootstrapRegistry.Scope
.修饰符和类型方法说明<T> void
BootstrapRegistry.register
(Class<T> type, BootstrapRegistry.InstanceSupplier<T> instanceSupplier) Register a specific type with the registry.<T> void
DefaultBootstrapContext.register
(Class<T> type, BootstrapRegistry.InstanceSupplier<T> instanceSupplier) <T> void
BootstrapRegistry.registerIfAbsent
(Class<T> type, BootstrapRegistry.InstanceSupplier<T> instanceSupplier) Register a specific type with the registry if one is not already present.<T> void
DefaultBootstrapContext.registerIfAbsent
(Class<T> type, BootstrapRegistry.InstanceSupplier<T> instanceSupplier)