title: How To Create Method Extend from CrudRepository for Composite Key
body: <p>I have 1 class ContainerLoadList with Composite Key ContainerLoadListPK like this</p>
  
  <pre><code>@Embeddable
  public class ContainerLoadListPK implements Serializable {
  
      /**
       * 
       */
      private static final long serialVersionUID = 3526479259987259367L;
      @Basic(optional = false)
      @NotNull
      @Size(min = 1, max = 13)
      @Column(name = "ContainerNo")
      private String containerNo;
      @Basic(optional = false)
      @NotNull
      @Size(min = 1, max = 6)
      @Column(name = "VesselCode")
      private String vesselCode;
      @Basic(optional = false)
      @NotNull
      @Size(min = 1, max = 8)
      @Column(name = "Voyage")
      private String voyage;
  
      public ContainerLoadListPK() {
      }
  
      public ContainerLoadListPK(String containerNo, String vesselCode, String voyage) {
          this.containerNo = containerNo;
          this.vesselCode = vesselCode;
          this.voyage = voyage;
      }
  
      public String getContainerNo() {
          return containerNo;
      }
  
      public void setContainerNo(String containerNo) {
          this.containerNo = containerNo;
      }
  
      public String getVesselCode() {
          return vesselCode;
      }
  
      public void setVesselCode(String vesselCode) {
          this.vesselCode = vesselCode;
      }
  
      public String getVoyage() {
          return voyage;
      }
  
      public void setVoyage(String voyage) {
          this.voyage = voyage;
      }
  }
  </code></pre>
  
  <p>and I have another interface extended from CrudRepository like this</p>
  
  <pre><code>public interface ContainerLoadListRepository extends CrudRepository&lt;ContainerLoadList, ContainerLoadListPK&gt; {
      List&lt;ContainerLoadList&gt; findByBNo(@Param("bNo") String bNo);
  
      @Query(name = "ContainerLoadList.findByVesselCodeAndVoyage")
      List&lt;ContainerLoadList&gt; findByVesselCodeAndVoyage(@Param("vesselCode") String vesselCode,@Param("voyage") String voyage);
  }
  </code></pre>
  
  <p>Are You Have Another Solution for findByVesselCodeAndVoyage without using @Query?</p>