title: Interface function throwing error when it call in the controller class
body: <blockquote>
  <p>I creates a match repository interface and define a function with the
  return type ,but when I call that interface function through the
  instance of that repository that function show me an error ,please
  define an abstract function of that function, I don't know how to call
  that function. here below I provide the code details
  team.kt</p>
  </blockquote>
  <pre><code>package com.nilmani.ipldashboard2021.entity
  
  import javax.persistence.Entity
  import javax.persistence.GeneratedValue
  import javax.persistence.GenerationType
  import javax.persistence.Id
  import javax.persistence.Transient
  
  @Entity
  data class Team(
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      val id:Long=-1,
      val teamName:String=&quot;&quot;,
      val totalMatches:Long=-1,
      val wins:Long=-1,
      @Transient
      var matches:List&lt;Match&gt; = ArrayList()
  )
  </code></pre>
  <blockquote>
  <p>matchRepository.kt</p>
  </blockquote>
  <pre><code>package com.nilmani.ipldashboard2021.repository
  
  import com.nilmani.ipldashboard2021.entity.Match
  import org.springframework.data.domain.PageRequest
  import org.springframework.data.domain.Pageable
  import org.springframework.data.repository.CrudRepository
  
  
  interface MatchRepository : CrudRepository&lt;Match,Long&gt; {
      fun getByTeam1OrTeam2OrderByDateDesc(teamName1: String?,teamName2: String?,pageable: Pageable):List&lt;Match&gt;
  
      fun findLatestMatchesbyTeam(teamName: String?, count: Int): List&lt;Match?&gt;? {
          return getByTeam1OrTeam2OrderByDateDesc(teamName, teamName, PageRequest.of(0, count))
      }
  }
  </code></pre>
  <blockquote>
  <p>TeamController.kt</p>
  </blockquote>
  <pre><code> @GetMapping(&quot;/team/{teamName}&quot;)
      fun getTeam(@PathVariable teamName: String): Team? {
          val team: Team = this.teamRepository.findByTeamName(teamName)
          team.matches = matchRepository.findLatestMatchesbyTeam(teamName, 4)
          return team
      }
  </code></pre>
  <blockquote>
  <p>I got exact error at</p>
  </blockquote>
  <pre><code>team.matches = matchRepository.findLatestMatchesbyTeam(teamName,4)
  </code></pre>
  <blockquote>
  <p>what is the reason for getting an error while calling
  findLatestMatchesbyTeam  function</p>
  </blockquote>