From 16b28bc773460bc24d0287dad5e0e0806f7b37ef Mon Sep 17 00:00:00 2001 From: Mathew Lodge <2354066+mjlodge@users.noreply.github.com> Date: Thu, 16 Jul 2020 18:08:07 +0100 Subject: [PATCH] Bump to Spring Boot 2 --- pom.xml | 2 +- .../works/weave/socks/cart/configuration/BeanConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index eac7c9695..8f1ef5182 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 1.4.4.RELEASE + 2.0.4.RELEASE diff --git a/src/main/java/works/weave/socks/cart/configuration/BeanConfiguration.java b/src/main/java/works/weave/socks/cart/configuration/BeanConfiguration.java index f9caa3305..5a9068f5b 100644 --- a/src/main/java/works/weave/socks/cart/configuration/BeanConfiguration.java +++ b/src/main/java/works/weave/socks/cart/configuration/BeanConfiguration.java @@ -51,7 +51,7 @@ public void destroy(Item item) { @Override public Item findOne(String id) { - return itemRepository.findOne(id); + return itemRepository.findById(id).orElse(null); } }; }