diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/BookRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/BookRepository.java index 75f6367..7fe6657 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/BookRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/BookRepository.java @@ -2,13 +2,14 @@ package com.fjordtek.bookstore.model; -import java.util.List; +import java.util.Optional; import org.springframework.data.repository.CrudRepository; public interface BookRepository extends CrudRepository { - public List findById(String title); + @Override + public Optional findById(Long id); /* Assume a single book with a single ISBN, or multiple books with possibly duplicate ISBNs? * For meanwhile, we have a UNIQUE constraint for ISBN values. If this policy changes,