title: How to search database for string instead id with findById()?
body: <p>how can I search for a string Pathvariable instead of a Integer by ID? I like to find the names.</p>
  
  <p>The method below works well, but just with IDs as a Integer value.</p>
  
  <p>Thanks :)</p>
  
  <pre class="lang-java prettyprint-override"><code>
  @RestController
  @RequestMapping(value = "/etbestandservice")
  public class ETBestandserviceController {
  
      @Autowired
      ETBestandserviceRepository etbestandRepos;
  
          @GetMapping(value = "/find/{id}", produces = "application/json")
          public Optional&lt;ETBestandservice&gt; findErsatzteile(@PathVariable("id") Integer id, ETBestandservice et) {
  
          id = et.getId();
          return etbestandRepos.findById(id);
      }
  }
  </code></pre>