类 PropertyResolver
java.lang.Object
cn.herodotus.stirrup.core.foundation.context.PropertyResolver
Description: 配置信息读取工具类
- 作者:
- : gengwei.zheng
- Date:
- : 2021/8/7 13:39
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanstatic booleanstatic booleangetBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property) 从条件上下文中获取Boolean类型值配置信息static booleangetBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property, boolean defaultValue) 从条件上下文中获取Boolean类型值配置信息static booleangetBoolean(org.springframework.core.env.Environment environment, String property) 从条件上下文中获取Boolean类型值配置信息static booleangetBoolean(org.springframework.core.env.Environment environment, String property, boolean defaultValue) 从条件上下文中获取Boolean类型值配置信息static StringgetProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property) 从条件上下文中获取配置信息static <T> TgetProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, Class<T> targetType) static <T> TgetProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, Class<T> targetType, T defaultValue) static StringgetProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, String defaultValue) 从条件上下文中获取配置信息static StringgetProperty(org.springframework.core.env.Environment environment, String property) 从环境信息中获取配置信息static <T> TgetProperty(org.springframework.core.env.Environment environment, String property, Class<T> targetType) static <T> TgetProperty(org.springframework.core.env.Environment environment, String property, Class<T> targetType, T defaultValue) static StringgetProperty(org.springframework.core.env.Environment environment, String property, String defaultValue) 从环境信息中获取配置信息
-
构造器详细资料
-
PropertyResolver
public PropertyResolver()
-
-
方法详细资料
-
getProperty
public static String getProperty(org.springframework.core.env.Environment environment, String property) 从环境信息中获取配置信息- 参数:
environment- Spring Boot EnvironmentEnvironmentproperty- 配置名称- 返回:
- 配置属性值
-
getProperty
public static String getProperty(org.springframework.core.env.Environment environment, String property, String defaultValue) 从环境信息中获取配置信息- 参数:
environment- Spring Boot EnvironmentEnvironmentproperty- 配置名称defaultValue- 默认值- 返回:
- 配置属性值
-
getProperty
public static String getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property) 从条件上下文中获取配置信息- 参数:
conditionContext- Spring Boot ConditionContextConditionContextproperty- 配置名称- 返回:
- 配置属性值
-
getProperty
public static String getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, String defaultValue) 从条件上下文中获取配置信息- 参数:
conditionContext- Spring Boot ConditionContextConditionContextproperty- 配置名称defaultValue- 默认值- 返回:
- 配置属性值
-
getProperty
-
getProperty
-
getProperty
-
getProperty
-
contains
public static boolean contains(org.springframework.core.env.Environment environment, String property) -
contains
public static boolean contains(org.springframework.context.annotation.ConditionContext conditionContext, String property) -
getBoolean
public static boolean getBoolean(org.springframework.core.env.Environment environment, String property, boolean defaultValue) 从条件上下文中获取Boolean类型值配置信息- 参数:
environment- Spring Boot ConditionContextConditionContextproperty- 配置名称defaultValue- 默认值- 返回:
- 配置属性值
-
getBoolean
public static boolean getBoolean(org.springframework.core.env.Environment environment, String property) 从条件上下文中获取Boolean类型值配置信息- 参数:
environment- Spring Boot ConditionContextConditionContextproperty- 配置名称- 返回:
- 配置属性值
-
getBoolean
public static boolean getBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property) 从条件上下文中获取Boolean类型值配置信息- 参数:
conditionContext- Spring Boot ConditionContextConditionContextproperty- 配置名称- 返回:
- 配置属性值
-
getBoolean
public static boolean getBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property, boolean defaultValue) 从条件上下文中获取Boolean类型值配置信息- 参数:
conditionContext- Spring Boot ConditionContextConditionContextproperty- 配置名称defaultValue- 默认值- 返回:
- 配置属性值
-