All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bugsnag.SpringWebMvcLoadedCondition Maven / Gradle / Ivy

There is a newer version: 3.7.2
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy