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