[JAVA-28828] Fix spring-boot-3-2 build and integration tests (#16038)
This commit is contained in:
parent
2c8e998cfd
commit
2a16dc158c
@ -97,7 +97,7 @@
|
|||||||
<module>spring-boot-3-observation</module>
|
<module>spring-boot-3-observation</module>
|
||||||
<module>spring-boot-3-test-pitfalls</module>
|
<module>spring-boot-3-test-pitfalls</module>
|
||||||
<module>spring-boot-3-testcontainers</module>
|
<module>spring-boot-3-testcontainers</module>
|
||||||
<!-- <module>spring-boot-3-2</module>--> <!-- JAVA-28828 -->
|
<module>spring-boot-3-2</module>
|
||||||
<module>spring-boot-resilience4j</module>
|
<module>spring-boot-resilience4j</module>
|
||||||
<module>spring-boot-properties</module>
|
<module>spring-boot-properties</module>
|
||||||
<module>spring-boot-properties-2</module>
|
<module>spring-boot-properties-2</module>
|
||||||
|
@ -196,6 +196,11 @@
|
|||||||
<groupId>io.zipkin.reporter2</groupId>
|
<groupId>io.zipkin.reporter2</groupId>
|
||||||
<artifactId>zipkin-sender-urlconnection</artifactId>
|
<artifactId>zipkin-sender-urlconnection</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.swagger.core.v3</groupId>
|
||||||
|
<artifactId>swagger-core</artifactId>
|
||||||
|
<version>2.2.20</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -290,7 +295,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<start-class>com.baeldung.restclient.RestClientApplication</start-class>
|
<start-class>com.baeldung.restclient.RestClientApplication</start-class>
|
||||||
<mapstruct.version>1.6.0.Beta1</mapstruct.version>
|
<mapstruct.version>1.6.0.Beta1</mapstruct.version>
|
||||||
<springdoc.version>2.0.0</springdoc.version>
|
<springdoc.version>2.3.0</springdoc.version>
|
||||||
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
|
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
|
||||||
<mockserver.version>5.14.0</mockserver.version>
|
<mockserver.version>5.14.0</mockserver.version>
|
||||||
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
|
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
|
||||||
|
@ -15,12 +15,14 @@ import org.springframework.core.ParameterizedTypeReference;
|
|||||||
import org.springframework.http.HttpStatusCode;
|
import org.springframework.http.HttpStatusCode;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.test.context.TestPropertySource;
|
||||||
import org.springframework.web.client.RestClient;
|
import org.springframework.web.client.RestClient;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
|
@TestPropertySource(locations="classpath:connectiondetails/application-r2dbc.properties")
|
||||||
public class RestClientIntegrationTest {
|
public class RestClientIntegrationTest {
|
||||||
|
|
||||||
@LocalServerPort
|
@LocalServerPort
|
||||||
@ -110,7 +112,7 @@ public class RestClientIntegrationTest {
|
|||||||
.uri(uriBase + "/articles/1234")
|
.uri(uriBase + "/articles/1234")
|
||||||
.retrieve()
|
.retrieve()
|
||||||
.onStatus(status -> status.value() == 404, (request, response) -> { throw new ArticleNotFoundException(); })
|
.onStatus(status -> status.value() == 404, (request, response) -> { throw new ArticleNotFoundException(); })
|
||||||
.body(new ParameterizedTypeReference<>() {});
|
.body(new ParameterizedTypeReference<String>() {});
|
||||||
}).isInstanceOf(ArticleNotFoundException.class);
|
}).isInstanceOf(ArticleNotFoundException.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user