Skip to content

Instantly share code, notes, and snippets.

@MafaldaLandeiro
Created March 22, 2016 20:11
Show Gist options
  • Select an option

  • Save MafaldaLandeiro/d6f33780197959c23f2a to your computer and use it in GitHub Desktop.

Select an option

Save MafaldaLandeiro/d6f33780197959c23f2a to your computer and use it in GitHub Desktop.
Country repository
package org.CachingDataSpring;
import java.util.List;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.repository.CrudRepository;
public interface CountryRepository extends CrudRepository<Country, Integer> {
@Cacheable("countries")
List<Country> findByCurrency(String currency);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment