title: Spring Data - ignore parameter if it has a null value
body: <p>I want to have a spring data repository interface that takes two parameters. Is there a way to make it have the following behaviour?</p>
  
  <pre><code>MyObject findByParameterOneAndParameterTwo( String parameterOne, String parameterTwo);
  </code></pre>
  
  <p>If both parameters have a value, I would like it to behave normally and do an "AND" for both values.</p>
  
  <p>If for example the second parameter is null, then it would search only by ParameterOne</p>
  
  <p>Any suggestions?</p>