title: CrudRepository findById dont return java.util. Optional
body: <p>public interface LmsRepository extends CrudRepository
  I have no findOne method for getting single count so when i using findById I got this exception."Property [id] not found on type [java.util.Optional]" How can i solve this trouble ?</p>
  
  <p>This is my CrudRepo</p>
  
  <pre><code>@Repository
  public interface LmsRepository extends CrudRepository&lt;Book, Long&gt; {
  
  
  }
  </code></pre>
  
  <p>Entity File</p>
  
  <pre><code>@Entity(name="lms_tbl")
  public class Book {
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;
  
  @Column(name="book_name")
  private String bookName;
  
  private String author;
  
  @Column(name="purchase_date")
  @Temporal(TemporalType.DATE)
  private Date purchaseDate;
  
  public long getId() {
      return id;
  }
  
  public void setId(long id) {
      this.id = id;
  }
  
  and other....
  </code></pre>
  
  <p>Service File</p>
  
  <pre><code>@Service
  public class LmsService {
  
  @Autowired
  private LmsRepository lmsRepository;
  
  public Collection&lt;Book&gt; findAllBooks(){
      ArrayList&lt;Book&gt; books = new ArrayList&lt;Book&gt;();
      for (Book book : lmsRepository.findAll()) {
          books.add(book);
      }
  
      return books;
  }
  
  public void deleteBook(long id) {
  
      lmsRepository.deleteById(id);
  }
  
  public Optional&lt;Book&gt; findById(Long id) {
  
      return lmsRepository.findById(id);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Controller File</p>
  
  <pre><code>@Controller
  public class MainController {
  
  @Autowired
  private LmsService lmsService;
  
  
  @GetMapping("/")
  public String index(HttpServletRequest req) {
      req.setAttribute("books", lmsService.findAllBooks());
      req.setAttribute("mode","BOOK_VIEW");
      return "index";
  }
  
  @GetMapping("/updateBook")
  public String index(@RequestParam Long id,HttpServletRequest req) {
      req.setAttribute("book", lmsService.findById(id));
      req.setAttribute("mode","BOOK_EDIT");
      return "index";
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I tried add new method in CrudRepo but it doesnt work.</p>