title: How to use an objects' property as the key for @CachePut?
body: <pre><code>public interface MyRespository extends CrudRepository&lt;MyEntity, Long&gt; {
      @CachePut(value = "mycache", key = "id")
      @Override
      public &lt;S extends MyEntity&gt; S save(S entity);
  }
  
  @Entity
  public class MyEntity {
      @Id
      private Long id;
  
      public Long getId() { return id; }
      public void setId(Long id) { this.id = id; }
  }
  </code></pre>
  
  <p>Result:</p>
  
  <blockquote>
    <p>org.springframework.expression.spel.SpelEvaluationException:
    EL1008E:(pos 0): Property or field 'id' cannot be found on object of
    type 'org.springframework.cache.interceptor.CacheExpressionRootObject'
    - maybe not public?</p>
  </blockquote>