From f739484c0252999f3444bbd9e6c205af2327b5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Wilmsmann?= Date: Tue, 10 Oct 2023 09:52:01 +0200 Subject: [PATCH 1/5] Formatting --- .../de/workshops/bookshelf/config/JacksonTestConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/de/workshops/bookshelf/config/JacksonTestConfiguration.java b/src/test/java/de/workshops/bookshelf/config/JacksonTestConfiguration.java index 71ec6a9..fe5be12 100644 --- a/src/test/java/de/workshops/bookshelf/config/JacksonTestConfiguration.java +++ b/src/test/java/de/workshops/bookshelf/config/JacksonTestConfiguration.java @@ -7,7 +7,7 @@ @TestConfiguration public class JacksonTestConfiguration { - @Bean + @Bean public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() { return builder -> builder.featuresToEnable(SerializationFeature.INDENT_OUTPUT); } From b56670fdaddc5f981a09677b69749abf814ee3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Wilmsmann?= Date: Fri, 20 Oct 2023 12:27:27 +0200 Subject: [PATCH 2/5] Spring Boot update --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9d77f08..54d6fe8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.4 + 3.1.5 de.workshops From 29c0fbcb18862d471d9ad3ba3b83aac4e600cac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Wilmsmann?= Date: Fri, 24 Nov 2023 13:41:09 +0100 Subject: [PATCH 3/5] Spring Boot update --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 54d6fe8..d067651 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.5 + 3.2.0 de.workshops From 1c9cbb2c6e02b00fd85a0b59637e0c4e0bd58be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Wilmsmann?= Date: Sun, 26 Nov 2023 22:44:46 +0100 Subject: [PATCH 4/5] Spring Boot update --- .../bookshelf/book/BookRepository.java | 2 +- .../bookshelf/book/BookRepositoryTest.java | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/de/workshops/bookshelf/book/BookRepository.java b/src/main/java/de/workshops/bookshelf/book/BookRepository.java index e0ba580..1dcb202 100644 --- a/src/main/java/de/workshops/bookshelf/book/BookRepository.java +++ b/src/main/java/de/workshops/bookshelf/book/BookRepository.java @@ -4,7 +4,7 @@ import org.springframework.stereotype.Repository; @Repository -public interface BookRepository extends ListCrudRepository { +interface BookRepository extends ListCrudRepository { Book findByIsbn(String isbn); } diff --git a/src/test/java/de/workshops/bookshelf/book/BookRepositoryTest.java b/src/test/java/de/workshops/bookshelf/book/BookRepositoryTest.java index 00ceb6b..d213b43 100644 --- a/src/test/java/de/workshops/bookshelf/book/BookRepositoryTest.java +++ b/src/test/java/de/workshops/bookshelf/book/BookRepositoryTest.java @@ -1,15 +1,13 @@ package de.workshops.bookshelf.book; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; -import java.util.List; -import java.util.stream.StreamSupport; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - @DataJpaTest class BookRepositoryTest { @@ -21,9 +19,10 @@ void createBook() { String isbn = "123-4567890"; Book book = buildAndSaveBook(isbn); - List books = StreamSupport - .stream(bookRepository.findAll().spliterator(), false) - .toList(); + List books = bookRepository + .findAll() + .stream() + .toList(); assertNotNull(books); assertEquals(4, books.size()); From 522246447b43425fda7cbb9b0f33ef62a3623de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Wilmsmann?= Date: Sun, 26 Nov 2023 23:41:10 +0100 Subject: [PATCH 5/5] Spring Boot update --- src/main/resources/application.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f78e932..327f14a 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -11,9 +11,9 @@ server: spring: datasource: - url: jdbc:postgresql://tai.db.elephantsql.com:5432/tdygxryv # adapt URL to your database + url: jdbc:postgresql://roasted-tomato.db.elephantsql.com:5432/ooqpwbmi # adapt URL to your database driver-class-name: org.postgresql.Driver - username: tdygxryv # adapt username accordingly + username: ooqpwbmi # adapt username accordingly # set PG_PASSWORD in your environment, e.g., by running "export PG_PASSWORD=..." in the command line password: ${PG_PASSWORD} jpa: