This is an automated email from the ASF dual-hosted git repository. jamesbognar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/juneau-petstore.git
commit 0b6a461d30c0cf83db8a8d047d2d8d783545e020 Author: rasa <[email protected]> AuthorDate: Mon Oct 14 14:12:28 2019 +0300 spring data --- .../java/org/apache/juneau/petstore/service/PetStoreService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/service/PetStoreService.java b/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/service/PetStoreService.java index 352d6fd..f633983 100644 --- a/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/service/PetStoreService.java +++ b/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/service/PetStoreService.java @@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired; + /** * Pet store database application. * <p> @@ -110,7 +111,7 @@ public class PetStoreService { * @throws IdNotFound If pet was not found. */ public Pet getPet(long id) throws IdNotFound { - return petRepository.getOne(id); + return petRepository.findById(id).get(); } /** @@ -121,7 +122,7 @@ public class PetStoreService { * @throws IdNotFound If order was not found. */ public Order getOrder(long id) throws IdNotFound { - return orderRepository.getOne(id); + return orderRepository.findById(id).get(); } /**
