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

org.infinispan.spring.starter.embedded.InfinispanEmbeddedCacheManagerChecker Maven / Gradle / Ivy

There is a newer version: 14.0.32.Final
Show newest version
package org.infinispan.spring.starter.embedded;

import org.springframework.boot.autoconfigure.cache.CacheType;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

public class InfinispanEmbeddedCacheManagerChecker implements Condition {
    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        String cacheType = context.getEnvironment().getProperty("spring.cache.type");

        return cacheType == null || CacheType.INFINISPAN.name().equalsIgnoreCase(cacheType);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy