diff --git a/docker/grafana/dashboards/grafana-petclinic-dashboard.json b/docker/grafana/dashboards/grafana-petclinic-dashboard.json
index 6d79a8d5f..ccd51d1bf 100644
--- a/docker/grafana/dashboards/grafana-petclinic-dashboard.json
+++ b/docker/grafana/dashboards/grafana-petclinic-dashboard.json
@@ -283,7 +283,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "sum(petclinic_owner_seconds_count{method=\"PUT\", status=\"200\"})",
+ "expr": "sum(petclinic_owner_seconds_count{method=\"PUT\", status=\"204\"})",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
@@ -446,7 +446,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "sum(petclinic_pet_seconds_count{method=\"POST\", status=\"204\"})",
+ "expr": "sum(petclinic_pet_seconds_count{method=\"POST\", status=\"201\"})",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
@@ -528,7 +528,7 @@
"tableColumn": "Value",
"targets": [
{
- "expr": "sum(petclinic_visit_seconds_count{method=\"POST\", status=\"204\"})",
+ "expr": "sum(petclinic_visit_seconds_count{method=\"POST\", status=\"201\"})",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
@@ -598,21 +598,21 @@
"refId": "A"
},
{
- "expr": "sum(petclinic_pet_seconds_count{method=\"POST\", status=\"204\"})",
+ "expr": "sum(petclinic_pet_seconds_count{method=\"POST\", status=\"201\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "pet create",
"refId": "B"
},
{
- "expr": "sum(petclinic_visit_seconds_count{method=\"POST\", status=\"204\"})",
+ "expr": "sum(petclinic_visit_seconds_count{method=\"POST\", status=\"201\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "visit create",
"refId": "C"
},
{
- "expr": "sum(petclinic_owner_seconds_count{method=\"PUT\", status=\"200\"})",
+ "expr": "sum(petclinic_owner_seconds_count{method=\"PUT\", status=\"204\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "owner update",
diff --git a/pom.xml b/pom.xml
index 3627c00de..8314aff71 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,12 +6,12 @@
org.springframework.boot
spring-boot-starter-parent
- 2.0.6.RELEASE
+ 2.1.1.RELEASE
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2
${project.artifactId}
pom
@@ -30,9 +30,9 @@
1.8
3.11.1
- 2.0.4.RELEASE
- Finchley.SR2
- 2.0.0.RC2
+ 2.1.2.RELEASE
+ Greenwich.RELEASE
+ 1.0.5
2.22.0
@@ -45,13 +45,6 @@
-
- org.springframework.cloud
- spring-cloud-sleuth-dependencies
- pom
- import
- ${sleuth.version}
-
org.springframework.cloud
spring-cloud-dependencies
diff --git a/spring-petclinic-admin-server/pom.xml b/spring-petclinic-admin-server/pom.xml
index 960be8251..7aaa088f3 100644
--- a/spring-petclinic-admin-server/pom.xml
+++ b/spring-petclinic-admin-server/pom.xml
@@ -12,11 +12,11 @@
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2
- 2.0.3
+ 2.1.2
9090
${basedir}/../docker
diff --git a/spring-petclinic-api-gateway/pom.xml b/spring-petclinic-api-gateway/pom.xml
index 790845120..b179c8c4e 100644
--- a/spring-petclinic-api-gateway/pom.xml
+++ b/spring-petclinic-api-gateway/pom.xml
@@ -11,7 +11,7 @@
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2
diff --git a/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/VisitDetails.java b/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/VisitDetails.java
index 29b7c2192..7c8a7827b 100644
--- a/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/VisitDetails.java
+++ b/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/VisitDetails.java
@@ -15,19 +15,21 @@
*/
package org.springframework.samples.petclinic.api.dto;
+import lombok.NoArgsConstructor;
import lombok.Value;
/**
* @author Maciej Szarlinski
*/
@Value
+@NoArgsConstructor
public class VisitDetails {
- private int id;
+ private Integer id = null;
- private int petId;
+ private Integer petId = null;
- private String date;
+ private String date = null;
- private String description;
+ private String description = null;
}
diff --git a/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/Visits.java b/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/Visits.java
index 58708bc91..25957cf42 100644
--- a/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/Visits.java
+++ b/spring-petclinic-api-gateway/src/main/java/org/springframework/samples/petclinic/api/dto/Visits.java
@@ -16,12 +16,17 @@
package org.springframework.samples.petclinic.api.dto;
import java.util.List;
+
+import lombok.NoArgsConstructor;
import lombok.Value;
/**
* @author Maciej Szarlinski
*/
@Value
+@NoArgsConstructor
public class Visits {
- private List items;
+
+ private List items = null;
+
}
diff --git a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java
index 939092f56..864d4fbf3 100644
--- a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java
+++ b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java
@@ -1,12 +1,9 @@
package org.springframework.samples.petclinic.api;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
-@ExtendWith(SpringExtension.class)
@ActiveProfiles("test")
@SpringBootTest
class ApiGatewayApplicationTests {
diff --git a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/application/VisitsServiceClientTest.java b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/application/VisitsServiceClientTest.java
index 506ded57e..465ab7b74 100644
--- a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/application/VisitsServiceClientTest.java
+++ b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/application/VisitsServiceClientTest.java
@@ -2,16 +2,12 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.http.MediaType;
import org.springframework.samples.petclinic.api.dto.VisitDetails;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
+import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestTemplate;
@@ -25,10 +21,9 @@
import static org.springframework.test.web.client.response.MockRestResponseCreators.withServerError;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
-@ExtendWith(SpringExtension.class)
@EnableCircuitBreaker
@EnableAspectJAutoProxy
-@ContextConfiguration(classes = {VisitsServiceClient.class})
+@SpringJUnitConfig(classes = {VisitsServiceClient.class, RestTemplate.class})
class VisitsServiceClientTest {
private static final Integer PET_ID = 1;
@@ -41,21 +36,11 @@ class VisitsServiceClientTest {
private MockRestServiceServer mockServer;
- @Configuration
- static class Config {
- @Bean
- public RestTemplate restTemplate() {
- return new RestTemplate();
- }
- }
-
-
@BeforeEach
public void setUp() {
mockServer = MockRestServiceServer.createServer(restTemplate);
}
-
@Test
public void getVisitsForPets_withAvailableVisitsService() {
mockServer.expect(requestTo("http://visits-service/pets/visits?petId=1"))
diff --git a/spring-petclinic-config-server/pom.xml b/spring-petclinic-config-server/pom.xml
index 39eccfa10..3410f2f1a 100644
--- a/spring-petclinic-config-server/pom.xml
+++ b/spring-petclinic-config-server/pom.xml
@@ -11,7 +11,7 @@
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2
diff --git a/spring-petclinic-config-server/src/test/java/org/springframework/samples/petclinic/config/PetclinicConfigServerApplicationTests.java b/spring-petclinic-config-server/src/test/java/org/springframework/samples/petclinic/config/PetclinicConfigServerApplicationTests.java
index 52423bfcb..e4cd33f3a 100644
--- a/spring-petclinic-config-server/src/test/java/org/springframework/samples/petclinic/config/PetclinicConfigServerApplicationTests.java
+++ b/spring-petclinic-config-server/src/test/java/org/springframework/samples/petclinic/config/PetclinicConfigServerApplicationTests.java
@@ -16,11 +16,8 @@
package org.springframework.samples.petclinic.config;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
-@ExtendWith(SpringExtension.class)
@SpringBootTest
class PetclinicConfigServerApplicationTests {
diff --git a/spring-petclinic-customers-service/pom.xml b/spring-petclinic-customers-service/pom.xml
index 9c411deb6..dccc8e5a5 100644
--- a/spring-petclinic-customers-service/pom.xml
+++ b/spring-petclinic-customers-service/pom.xml
@@ -11,7 +11,7 @@
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2
diff --git a/spring-petclinic-discovery-server/pom.xml b/spring-petclinic-discovery-server/pom.xml
index 5cefc3dd6..1049dbeb9 100644
--- a/spring-petclinic-discovery-server/pom.xml
+++ b/spring-petclinic-discovery-server/pom.xml
@@ -11,7 +11,7 @@
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2
diff --git a/spring-petclinic-discovery-server/src/test/java/org/springframework/samples/petclinic/discovery/DiscoveryServerApplicationTests.java b/spring-petclinic-discovery-server/src/test/java/org/springframework/samples/petclinic/discovery/DiscoveryServerApplicationTests.java
index 0d82eebef..a1ede35e1 100644
--- a/spring-petclinic-discovery-server/src/test/java/org/springframework/samples/petclinic/discovery/DiscoveryServerApplicationTests.java
+++ b/spring-petclinic-discovery-server/src/test/java/org/springframework/samples/petclinic/discovery/DiscoveryServerApplicationTests.java
@@ -16,11 +16,8 @@
package org.springframework.samples.petclinic.discovery;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
-@ExtendWith(SpringExtension.class)
@SpringBootTest
class DiscoveryServerApplicationTests {
diff --git a/spring-petclinic-hystrix-dashboard/pom.xml b/spring-petclinic-hystrix-dashboard/pom.xml
index 81ef00b2c..3b847df6a 100644
--- a/spring-petclinic-hystrix-dashboard/pom.xml
+++ b/spring-petclinic-hystrix-dashboard/pom.xml
@@ -5,7 +5,7 @@
spring-petclinic-microservices
org.springframework.samples
- 2.0.6
+ 2.1.2
4.0.0
diff --git a/spring-petclinic-hystrix-dashboard/src/test/java/org/springframework/samples/petclinic/dashboard/HystrixDashboardApplicationTests.java b/spring-petclinic-hystrix-dashboard/src/test/java/org/springframework/samples/petclinic/dashboard/HystrixDashboardApplicationTests.java
index 18bc6d7e5..2049712ef 100644
--- a/spring-petclinic-hystrix-dashboard/src/test/java/org/springframework/samples/petclinic/dashboard/HystrixDashboardApplicationTests.java
+++ b/spring-petclinic-hystrix-dashboard/src/test/java/org/springframework/samples/petclinic/dashboard/HystrixDashboardApplicationTests.java
@@ -1,11 +1,8 @@
package org.springframework.samples.petclinic.dashboard;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
-@ExtendWith(SpringExtension.class)
@SpringBootTest
class HystrixDashboardApplicationTests {
diff --git a/spring-petclinic-vets-service/pom.xml b/spring-petclinic-vets-service/pom.xml
index 9f3c58cd7..ba93f4603 100644
--- a/spring-petclinic-vets-service/pom.xml
+++ b/spring-petclinic-vets-service/pom.xml
@@ -11,7 +11,7 @@
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2
diff --git a/spring-petclinic-visits-service/pom.xml b/spring-petclinic-visits-service/pom.xml
index 2bf6cc5d0..bf5b1b76a 100644
--- a/spring-petclinic-visits-service/pom.xml
+++ b/spring-petclinic-visits-service/pom.xml
@@ -11,7 +11,7 @@
org.springframework.samples
spring-petclinic-microservices
- 2.0.6
+ 2.1.2