接口 DynamicPropertyRegistry


public interface DynamicPropertyRegistry
Registry used with @DynamicPropertySource methods so that they can add properties to the Environment that have dynamically resolved values.
从以下版本开始:
4.0
作者:
Phillip Webb, Sam Brannen
另请参阅:
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    add(String name, Supplier<Object> valueSupplier)
    Add a Supplier for the given property name to this registry.
  • 方法详细资料

    • add

      void add(String name, Supplier<Object> valueSupplier)
      Add a Supplier for the given property name to this registry.
      参数:
      name - the name of the property for which the supplier should be added
      valueSupplier - a supplier that will provide the property value on demand