类 EnvironmentUtils
java.lang.Object
com.github.xiaoymin.knife4j.spring.util.EnvironmentUtils
- 从以下版本开始:
- knife4j 2.0.9
- 作者:
- xiaoymin@foxmail.com 2022/8/18 22:26
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static BooleanresolveBool(org.springframework.core.env.Environment environment, String key, Boolean defaultValue) 获取bool值static StringresolveContextPath(org.springframework.core.env.Environment environment) 处理程序contextPathstatic 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()
-
-
方法详细资料
-
resolveContextPath
处理程序contextPath- 参数:
environment- 环境变量- 返回:
- contextPath
- 从以下版本开始:
- v4.4.0
-
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- 默认值- 返回:
- int属性
-
resolveBool
public static Boolean resolveBool(org.springframework.core.env.Environment environment, String key, Boolean defaultValue) 获取bool值- 参数:
environment- 环境变量key- 变量defaultValue- 默认值- 返回:
- bool
-