title: In Spring Data JPA FindBy method is not working and “No Property Found for Type” Exception is not occurring.
body: <p>I am new to Spring boot and JPA, I created a simple JPA repository and was trying to implement custom findBy method but it always returns null, Even if I use any dummy name after findBy which is not a property of my class it dose not show any error.Although default findBy methods are working fine.</p>
  
  <pre><code>package com.example.demo;
  
     import java.util.List;
     import org.springframework.beans.factory.annotation.Autowired;
     import org.springframework.stereotype.Service;
  
     @Service
     public class EmployeeService {
  
      // This is my service class.
      // Creating employee repository
      @Autowired
      EmployeeRepo er;
  
      // This is the method I want to implement
      public List&lt;Employee&gt; getByname(String name) {
  
          return er.findByName(name);
      }
  
  }
  
  //This is my Repository 
  
  package com.example.demo;
  
  import java.util.List;
  
  import org.springframework.data.jpa.repository.JpaRepository;
  
  public interface EmployeeRepo extends JpaRepository&lt;Employee, Integer&gt; {
          // Name is a property of Employee class
      public List&lt;Employee&gt; findByName(String name);
          // Dummy is not a property of Employee class
      public List&lt;Employee&gt; findByDummy(String name);
  
  
  }
  </code></pre>
  
  <p>It should give an error for findByDummy method, but it is not giving. Is it considering this interface as general interface and allowing any declaration.
  For findByName it is returning null. It should search based on name and for findByDummy it should show error. </p>
  
  <p>Thanks in advance.</p>