org.zodiac.autoconfigure.cache.CachableAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.cache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cache.annotation.EnableCaching;
/**
* Cache配置类。
*
*/
@EnableCaching
@SpringBootConfiguration
@ConditionalOnProperty(value = "spring.cache.type")
@ConditionalOnBean(value = {org.springframework.cache.CacheManager.class})
public class CachableAutoConfiguration {
private static final Logger LOG = LoggerFactory.getLogger(CachableAutoConfiguration.class);
public CachableAutoConfiguration() {
LOG.info("{} is loaded.", getClass().getCanonicalName());
}
}