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

com.capitalone.dashboard.logging.DatabaseLoggingCondition Maven / Gradle / Ivy

There is a newer version: 3.7.33
Show newest version
package com.capitalone.dashboard.logging;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

public class DatabaseLoggingCondition implements Condition {

    protected static final String LOG_REQUEST = "logRequest";

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        String logRequest = context.getEnvironment().getProperty(LOG_REQUEST);
        return logRequest != null && Boolean.parseBoolean(logRequest);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy