From f91f92b08e52b76b8902c8dc3b6c64d5042cd2f3 Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Fri, 5 Jan 2024 03:02:34 +0530 Subject: [PATCH] [JAVA-28929] - Upgrade to mustache to Spring boot 3 (#15551) --- mustache/pom.xml | 5 +++-- .../springmustache/controller/ArticleController.java | 1 - .../com/baeldung/mustache/TodoMustacheServiceUnitTest.java | 1 - .../SpringMustacheApplicationIntegrationTest.java | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mustache/pom.xml b/mustache/pom.xml index b5d39ef15e..5c4aff0d80 100644 --- a/mustache/pom.xml +++ b/mustache/pom.xml @@ -9,9 +9,9 @@ com.baeldung - parent-boot-2 + parent-boot-3 0.0.1-SNAPSHOT - ../parent-boot-2 + ../parent-boot-3 @@ -58,6 +58,7 @@ 0.9.10 0.8 3.3.7 + com.baeldung.springmustache.SpringMustacheApplication \ No newline at end of file diff --git a/mustache/src/main/java/com/baeldung/springmustache/controller/ArticleController.java b/mustache/src/main/java/com/baeldung/springmustache/controller/ArticleController.java index 880fb337fd..cf9df1be56 100644 --- a/mustache/src/main/java/com/baeldung/springmustache/controller/ArticleController.java +++ b/mustache/src/main/java/com/baeldung/springmustache/controller/ArticleController.java @@ -6,7 +6,6 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.servlet.ModelAndView; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/mustache/src/test/java/com/baeldung/mustache/TodoMustacheServiceUnitTest.java b/mustache/src/test/java/com/baeldung/mustache/TodoMustacheServiceUnitTest.java index 0c192b30bc..73bb750475 100644 --- a/mustache/src/test/java/com/baeldung/mustache/TodoMustacheServiceUnitTest.java +++ b/mustache/src/test/java/com/baeldung/mustache/TodoMustacheServiceUnitTest.java @@ -71,7 +71,6 @@ public class TodoMustacheServiceUnitTest { Map context = new HashMap<>(); assertThat(executeTemplate(m, context)).isEmpty(); - ; } @Test diff --git a/mustache/src/test/java/com/baeldung/springmustache/SpringMustacheApplicationIntegrationTest.java b/mustache/src/test/java/com/baeldung/springmustache/SpringMustacheApplicationIntegrationTest.java index 1eecf58986..ce5695b8a4 100644 --- a/mustache/src/test/java/com/baeldung/springmustache/SpringMustacheApplicationIntegrationTest.java +++ b/mustache/src/test/java/com/baeldung/springmustache/SpringMustacheApplicationIntegrationTest.java @@ -23,7 +23,7 @@ public class SpringMustacheApplicationIntegrationTest { ResponseEntity entity = this.restTemplate.getForEntity("/article", String.class); - Assert.assertTrue(entity.getStatusCode().equals(HttpStatus.OK)); + Assert.assertEquals(entity.getStatusCode(), HttpStatus.OK); Assert.assertTrue(entity.getBody().contains("Article Title 0")); }