title: Cache lookups on application startup and reuse it in Hibernate entity
body: <p>I am using <strong>Spring Boot 1.5.9.RELEASE</strong> and I am using spring <code>@Cacheable</code>
  and what I am trying to accomplish is to cache a country lookup on application start-up as follows:</p>
  
  <pre><code>public interface CountryRepository extends JpaRepository&lt;Country, BigInteger&gt; {
  
      @Cacheable(cacheNames = Constants.CACHE_NAME_ALL_COUNTRIES)
      List&lt;Country&gt; findAll();
  
  }
  </code></pre>
  
  <p>and call it on start-up as follows:</p>
  
  <pre><code>@Component
  public class StartUpInit {
  
      @Autowired
      private CountryRepository countryRepository;
  
      @EventListener
      public void onApplicationReady(ApplicationReadyEvent ready) {
          List&lt;Country&gt; list = countryRepository.findAll();
      }
  
  }
  </code></pre>
  
  <p>The obvious thing is that subsequent calls to findAll will load the data from the cache, but what I am trying to do is something like the following:</p>
  
  <pre><code>@Entity
  @Table(name = "PROJECT")
  public class Project {
  
      @OneToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "COUNTRY_ID")
      private Country country;
  
      @Cacheable(cacheNames = Constants.CACHE_NAME_ALL_COUNTRIES)
      public Country getCountry() {
          return country;
      }
  
      public void setCountry(Country country) {
          this.country = country;
      }
  
  }
  </code></pre>
  
  <p>I want when trying to get country from project object the country to be retrieved from the cache instead of database; I know that I can cache the whole project object with all data in it but I don't want to do that I want only to get the lookup inside it from the cache</p>