mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
update migrate endpoint condition class
This commit is contained in:
parent
d093c2a6f6
commit
fdffba7fd6
@ -9,7 +9,7 @@ import org.springframework.context.annotation.Conditional;
|
|||||||
* @author pbting
|
* @author pbting
|
||||||
*/
|
*/
|
||||||
@ConditionalOnWebApplication
|
@ConditionalOnWebApplication
|
||||||
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.annotation.Endpoint")
|
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.AbstractEndpoint")
|
||||||
@Conditional(MigrateOnConditionClass.class)
|
@Conditional(MigrateOnConditionClass.class)
|
||||||
public class MigrateEndpointAutoConfiguration {
|
public class MigrateEndpointAutoConfiguration {
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public abstract class MigrateOnCondition implements Condition, BeanClassLoaderAw
|
|||||||
forName(className, classLoader);
|
forName(className, classLoader);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Throwable var3) {
|
catch (Throwable throwable) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ public class MigrateOnConditionClass extends MigrateOnCondition {
|
|||||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||||
boolean result = isPresent(conditionOnClass[0], classLoader)
|
boolean result = isPresent(conditionOnClass[0], classLoader)
|
||||||
|| isPresent(conditionOnClass[1], classLoader);
|
|| isPresent(conditionOnClass[1], classLoader);
|
||||||
log.info(" matche result is " + result);
|
log.info("the result of matcher is " + result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ public class MigrateOnConditionMissingClass extends MigrateOnConditionClass {
|
|||||||
@Override
|
@Override
|
||||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||||
boolean result = !super.matches(context, metadata);
|
boolean result = !super.matches(context, metadata);
|
||||||
log.info(" matche result is " + result);
|
log.info(" the result of matcher is " + result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user