diff --git a/boot-ultimate-redis/src/test/java/com/example/ultimateredis/controller/RedisControllerTest.java b/boot-ultimate-redis/src/test/java/com/example/ultimateredis/controller/RedisControllerTest.java
index da5d7bebe..138a3e789 100644
--- a/boot-ultimate-redis/src/test/java/com/example/ultimateredis/controller/RedisControllerTest.java
+++ b/boot-ultimate-redis/src/test/java/com/example/ultimateredis/controller/RedisControllerTest.java
@@ -28,6 +28,7 @@ void addRedisKeyValue() throws Exception {
.content(objectMapper.writeValueAsString(addRedisRequest))
.assertThat()
.hasStatus(HttpStatus.CREATED)
+ .hasContentType(MediaType.APPLICATION_JSON)
.bodyJson()
.convertTo(GenericResponse.class)
.satisfies(response -> assertThat(response.response()).isEqualTo(true));
@@ -42,6 +43,7 @@ void getFromCache() {
.param("key", "junit")
.assertThat()
.hasStatusOk()
+ .hasContentType(MediaType.APPLICATION_JSON)
.bodyJson()
.convertTo(GenericResponse.class)
.satisfies(response -> assertThat(response.response()).isEqualTo("JunitValue"));
@@ -61,6 +63,7 @@ void expireFromCache() {
.param("key", "junit")
.assertThat()
.hasStatusOk()
+ .hasContentType(MediaType.APPLICATION_JSON)
.bodyJson()
.convertTo(GenericResponse.class)
.satisfies(
diff --git a/jpa/boot-read-replica-postgresql/pom.xml b/jpa/boot-read-replica-postgresql/pom.xml
index 97fd825bb..3fd43f429 100644
--- a/jpa/boot-read-replica-postgresql/pom.xml
+++ b/jpa/boot-read-replica-postgresql/pom.xml
@@ -9,9 +9,9 @@
com.example.demo
- boot-jpa-read-replica-postgresql
+ boot-read-replica-postgresql
0.0.1-SNAPSHOT
- boot-jpa-read-replica-postgresql
+ boot-read-replica-postgresql
Demo project for Spring Boot Read Replica
@@ -109,7 +109,7 @@
- 1.24.0
+ 1.25.2
diff --git a/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/controller/ArticleController.java b/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/controller/ArticleController.java
index 24e44e806..60a7700a5 100644
--- a/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/controller/ArticleController.java
+++ b/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/controller/ArticleController.java
@@ -4,12 +4,14 @@
import com.example.demo.readreplica.service.ArticleService;
import java.net.URI;
import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
@RestController
@RequestMapping("/articles")
@@ -22,7 +24,7 @@ class ArticleController {
}
@GetMapping("/{id}")
- ResponseEntity findArticleById(@PathVariable Integer id) {
+ ResponseEntity findArticleById(@PathVariable Long id) {
return this.articleService
.findArticleById(id)
.map(ResponseEntity::ok)
@@ -32,6 +34,23 @@ ResponseEntity findArticleById(@PathVariable Integer id) {
@PostMapping("/")
ResponseEntity