1 package net.sf.appstatus.demo.batch; 2 3 import org.slf4j.Logger; 4 import org.slf4j.LoggerFactory; 5 import org.springframework.cache.annotation.Cacheable; 6 7 /** 8 * Sample service with caching using spring-cache. 9 * 10 * @author Nicolas Richeton 11 * 12 */ 13 public class ServiceSample { 14 private static Logger logger = LoggerFactory.getLogger(ServiceSample.class); 15 16 @Cacheable("refCache") 17 public String getRefs() { 18 logger.info("getRefs"); 19 return "refList"; 20 } 21 22 public String getRefsAOP() { 23 logger.info("getRefsAOP"); 24 return "refList"; 25 } 26 }