title: in JpaRepository if one parameter is common for many query method then how to make as good as possible in Repository and in Service also
body: <pre><code>public interface UserRepo extends JpaRepository&lt;User, Long&gt; {
  
      public List&lt;User&gt; findById(long id);
  
      public List&lt;User&gt; findByEmail(String email);
  
      public List&lt;User&gt; findByEmailAndCode(String email, Code code);
  
      public List&lt;User&gt; findByEmailAndClassType(String email, ClassType code);
  
  }
  
  public class UserService {
      @Autowired
      UserRepo userRepo;
  
      public List&lt;user&gt; fetchByClassType(ClassType ct) {
          return userRepo.findByEmailAndClassType("email", ct);
      }
  
  }
  </code></pre>
  
  <blockquote>
    <p>here email need to fetch once how to avoid it many time to go on database or any other solution in controller it need to give again and again in each request mapping ...suggest</p>
  </blockquote>