类 EnvironmentUtils
java.lang.Object
com.github.xiaoymin.knife4j.spring.gateway.utils.EnvironmentUtils
- 从以下版本开始:
- 作者:
- xiaoymin@foxmail.com 2022/8/18 22:26
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static BooleanresolveBool(org.springframework.core.env.Environment environment, String key, Boolean defaultValue) 获取bool值static IntegerresolveInt(org.springframework.core.env.Environment environment, String key, Integer defaultValue) 获取int类型的值static StringresolveString(org.springframework.core.env.Environment environment, String key, String defaultValue) get String property
-
构造器详细资料
-
EnvironmentUtils
public EnvironmentUtils()
-
-
方法详细资料
-
resolveString
public static String resolveString(org.springframework.core.env.Environment environment, String key, String defaultValue) get String property- 参数:
environment- Spring Context Environmentkey- hash-keydefaultValue- default- 返回:
-
resolveInt
public static Integer resolveInt(org.springframework.core.env.Environment environment, String key, Integer defaultValue) 获取int类型的值- 参数:
environment- 环境变量key- 变量defaultValue- 默认值- 返回:
-
resolveBool
public static Boolean resolveBool(org.springframework.core.env.Environment environment, String key, Boolean defaultValue) 获取bool值- 参数:
environment- 环境变量key- 变量defaultValue- 默认值- 返回:
-