![JAR search and dependency download from the Maven repository](/logo.png)
com.bugsnag.SpringWebMvcLoadedCondition Maven / Gradle / Ivy
package com.bugsnag;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
/**
* Check whether spring-webmvc is available to the application.
*/
class SpringWebMvcLoadedCondition implements Condition {
@Override
public boolean matches(ConditionContext context,
AnnotatedTypeMetadata metadata) {
return context.getClassLoader() != null
&& context.getClassLoader().getResource("org/springframework/web/servlet") != null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy