Skip to content

Create cacheable method on service layer

Piyush Chaudhari edited this page Sep 13, 2018 · 1 revision

Create cacheable method on service layer on CountryServiceImpl.java as below.

@Cacheable("countryListCache")
@Override
public List<Country> list() {
logger.info("list called... ");
return countryDao.findAll();
}

Clone this wiki locally