类 PropertyResolver

java.lang.Object
cn.herodotus.stirrup.core.foundation.context.PropertyResolver

public class PropertyResolver extends Object

Description: 配置信息读取工具类

作者:
: gengwei.zheng
Date:
: 2021/8/7 13:39
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static boolean
    contains(org.springframework.context.annotation.ConditionContext conditionContext, String property)
     
    static boolean
    contains(org.springframework.core.env.Environment environment, String property)
     
    static boolean
    getBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property)
    从条件上下文中获取Boolean类型值配置信息
    static boolean
    getBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property, boolean defaultValue)
    从条件上下文中获取Boolean类型值配置信息
    static boolean
    getBoolean(org.springframework.core.env.Environment environment, String property)
    从条件上下文中获取Boolean类型值配置信息
    static boolean
    getBoolean(org.springframework.core.env.Environment environment, String property, boolean defaultValue)
    从条件上下文中获取Boolean类型值配置信息
    static String
    getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property)
    从条件上下文中获取配置信息
    static <T> T
    getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, Class<T> targetType)
     
    static <T> T
    getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, Class<T> targetType, T defaultValue)
     
    static String
    getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, String defaultValue)
    从条件上下文中获取配置信息
    static String
    getProperty(org.springframework.core.env.Environment environment, String property)
    从环境信息中获取配置信息
    static <T> T
    getProperty(org.springframework.core.env.Environment environment, String property, Class<T> targetType)
     
    static <T> T
    getProperty(org.springframework.core.env.Environment environment, String property, Class<T> targetType, T defaultValue)
     
    static String
    getProperty(org.springframework.core.env.Environment environment, String property, String defaultValue)
    从环境信息中获取配置信息

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • PropertyResolver

      public PropertyResolver()
  • 方法详细资料

    • getProperty

      public static String getProperty(org.springframework.core.env.Environment environment, String property)
      从环境信息中获取配置信息
      参数:
      environment - Spring Boot Environment Environment
      property - 配置名称
      返回:
      配置属性值
    • getProperty

      public static String getProperty(org.springframework.core.env.Environment environment, String property, String defaultValue)
      从环境信息中获取配置信息
      参数:
      environment - Spring Boot Environment Environment
      property - 配置名称
      defaultValue - 默认值
      返回:
      配置属性值
    • getProperty

      public static String getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property)
      从条件上下文中获取配置信息
      参数:
      conditionContext - Spring Boot ConditionContext ConditionContext
      property - 配置名称
      返回:
      配置属性值
    • getProperty

      public static String getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, String defaultValue)
      从条件上下文中获取配置信息
      参数:
      conditionContext - Spring Boot ConditionContext ConditionContext
      property - 配置名称
      defaultValue - 默认值
      返回:
      配置属性值
    • getProperty

      public static <T> T getProperty(org.springframework.core.env.Environment environment, String property, Class<T> targetType)
    • getProperty

      public static <T> T getProperty(org.springframework.core.env.Environment environment, String property, Class<T> targetType, T defaultValue)
    • getProperty

      public static <T> T getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, Class<T> targetType)
    • getProperty

      public static <T> T getProperty(org.springframework.context.annotation.ConditionContext conditionContext, String property, Class<T> targetType, T defaultValue)
    • 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 ConditionContext ConditionContext
      property - 配置名称
      defaultValue - 默认值
      返回:
      配置属性值
    • getBoolean

      public static boolean getBoolean(org.springframework.core.env.Environment environment, String property)
      从条件上下文中获取Boolean类型值配置信息
      参数:
      environment - Spring Boot ConditionContext ConditionContext
      property - 配置名称
      返回:
      配置属性值
    • getBoolean

      public static boolean getBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property)
      从条件上下文中获取Boolean类型值配置信息
      参数:
      conditionContext - Spring Boot ConditionContext ConditionContext
      property - 配置名称
      返回:
      配置属性值
    • getBoolean

      public static boolean getBoolean(org.springframework.context.annotation.ConditionContext conditionContext, String property, boolean defaultValue)
      从条件上下文中获取Boolean类型值配置信息
      参数:
      conditionContext - Spring Boot ConditionContext ConditionContext
      property - 配置名称
      defaultValue - 默认值
      返回:
      配置属性值