Example usage for org.springframework.cache.concurrent ConcurrentMapCacheFactoryBean setName

List of usage examples for org.springframework.cache.concurrent ConcurrentMapCacheFactoryBean setName

Introduction

In this page you can find the example usage for org.springframework.cache.concurrent ConcurrentMapCacheFactoryBean setName.

Prototype

public void setName(String name) 

Source Link

Document

Specify the name of the cache.

Usage

From source file:com.axel.config.ServiceConfig.java

@Bean
public Cache defaultCache() {
    ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
    cacheFactoryBean.setName("default");
    cacheFactoryBean.afterPropertiesSet();
    return cacheFactoryBean.getObject();

}