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
|
||||
*/
|
||||
@ConditionalOnWebApplication
|
||||
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.annotation.Endpoint")
|
||||
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.AbstractEndpoint")
|
||||
@Conditional(MigrateOnConditionClass.class)
|
||||
public class MigrateEndpointAutoConfiguration {
|
||||
|
||||
|
@ -35,7 +35,7 @@ public abstract class MigrateOnCondition implements Condition, BeanClassLoaderAw
|
||||
forName(className, classLoader);
|
||||
return true;
|
||||
}
|
||||
catch (Throwable var3) {
|
||||
catch (Throwable throwable) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ public class MigrateOnConditionClass extends MigrateOnCondition {
|
||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||
boolean result = isPresent(conditionOnClass[0], classLoader)
|
||||
|| isPresent(conditionOnClass[1], classLoader);
|
||||
log.info(" matche result is " + result);
|
||||
log.info("the result of matcher is " + result);
|
||||
return result;
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ public class MigrateOnConditionMissingClass extends MigrateOnConditionClass {
|
||||
@Override
|
||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||
boolean result = !super.matches(context, metadata);
|
||||
log.info(" matche result is " + result);
|
||||
log.info(" the result of matcher is " + result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user