[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-test-pitfalls</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-properties</module>
|
||||
<module>spring-boot-properties-2</module>
|
||||
|
|
|
@ -196,6 +196,11 @@
|
|||
<groupId>io.zipkin.reporter2</groupId>
|
||||
<artifactId>zipkin-sender-urlconnection</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-core</artifactId>
|
||||
<version>2.2.20</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@ -290,7 +295,7 @@
|
|||
<properties>
|
||||
<start-class>com.baeldung.restclient.RestClientApplication</start-class>
|
||||
<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>
|
||||
<mockserver.version>5.14.0</mockserver.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.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.web.client.RestClient;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@TestPropertySource(locations="classpath:connectiondetails/application-r2dbc.properties")
|
||||
public class RestClientIntegrationTest {
|
||||
|
||||
@LocalServerPort
|
||||
|
@ -110,7 +112,7 @@ public class RestClientIntegrationTest {
|
|||
.uri(uriBase + "/articles/1234")
|
||||
.retrieve()
|
||||
.onStatus(status -> status.value() == 404, (request, response) -> { throw new ArticleNotFoundException(); })
|
||||
.body(new ParameterizedTypeReference<>() {});
|
||||
.body(new ParameterizedTypeReference<String>() {});
|
||||
}).isInstanceOf(ArticleNotFoundException.class);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue