类 ResourceCondition
java.lang.Object
org.springframework.boot.autoconfigure.condition.SpringBootCondition
org.springframework.boot.autoconfigure.condition.ResourceCondition
- 所有已实现的接口:
Condition
- 直接已知子类:
HazelcastConfigResourceCondition
SpringBootCondition used to check if a resource can be found using a
configurable property and optional default location(s).- 从以下版本开始:
- 1.3.0
- 作者:
- Stephane Nicoll, Phillip Webb, Madhura Bhave
-
构造器概要
构造器限定符构造器说明protectedResourceCondition(String name, String property, String... resourceLocations) Create a new condition. -
方法概要
修饰符和类型方法说明getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) Determine the outcome of the match along with suitable log output.protected ConditionOutcomegetResourceOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) Check if one of the default resource locations actually exists.protected final ConditionMessage.Builder从类继承的方法 org.springframework.boot.autoconfigure.condition.SpringBootCondition
anyMatches, logOutcome, matches, matches
-
构造器详细资料
-
ResourceCondition
Create a new condition.- 参数:
name- the name of the componentproperty- the configuration propertyresourceLocations- default location(s) where the configuration file can be found if the configuration key is not specified- 从以下版本开始:
- 2.0.0
-
-
方法详细资料
-
getMatchOutcome
从类复制的说明:SpringBootConditionDetermine the outcome of the match along with suitable log output.- 指定者:
getMatchOutcome在类中SpringBootCondition- 参数:
context- the condition contextmetadata- the annotation metadata- 返回:
- the condition outcome
-
getResourceOutcome
protected ConditionOutcome getResourceOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) Check if one of the default resource locations actually exists.- 参数:
context- the condition contextmetadata- the annotation metadata- 返回:
- the condition outcome
-
startConditionMessage
-