From 790af6a304f95d415a5169c8da820fb541a784ee Mon Sep 17 00:00:00 2001 From: jamesrferguson1 <94848497+jamesrferguson1@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:01:01 +0000 Subject: [PATCH] Upgrade to spring boot 3.3.5 (#5674) * Upgrade to spring boot 3.3.5 * Fix for upgrade to auth-checker-lib * Update jackson version * Revert mockito upgrade --------- Co-authored-by: prabhamuthu15 <78162288+prabhamuthu15@users.noreply.github.com> --- service/build.gradle | 6 +++--- .../hmcts/reform/fpl/config/HttpClientConfiguration.java | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/service/build.gradle b/service/build.gradle index 2aaa4ab85cd..729405a390e 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -17,7 +17,7 @@ plugins { id 'checkstyle' id 'jacoco' id 'io.spring.dependency-management' version '1.1.6' - id 'org.springframework.boot' version '3.2.4' + id 'org.springframework.boot' version '3.3.5' id 'com.github.ben-manes.versions' version '0.51.0' id 'org.sonarqube' version '5.1.0.4882' id 'project-report' @@ -328,7 +328,7 @@ dependencies { implementation group: 'com.github.hmcts', name: 'document-management-client', version: '7.0.1' implementation group: 'com.github.hmcts', name: 'core-case-data-store-client', version: '4.7.6' implementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: '4.1.2' - implementation group: 'com.github.hmcts', name: 'auth-checker-lib', version: '3.0.0' + implementation group: 'com.github.hmcts', name: 'auth-checker-lib', version: '3.0.4' implementation group: 'com.github.hmcts', name: 'send-letter-client', version: '4.0.4' implementation group: 'uk.gov.service.notify', name: 'notifications-java-client', version: '5.2.1-RELEASE' @@ -336,7 +336,7 @@ dependencies { implementation group: 'com.google.guava', name: 'guava', version: '33.3.1-jre' - implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: '2.18.2' + implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: versions.jackson implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: '6.1.7' diff --git a/service/src/main/java/uk/gov/hmcts/reform/fpl/config/HttpClientConfiguration.java b/service/src/main/java/uk/gov/hmcts/reform/fpl/config/HttpClientConfiguration.java index 9940b6ce9bc..0aec737a37c 100644 --- a/service/src/main/java/uk/gov/hmcts/reform/fpl/config/HttpClientConfiguration.java +++ b/service/src/main/java/uk/gov/hmcts/reform/fpl/config/HttpClientConfiguration.java @@ -6,6 +6,7 @@ import org.apache.hc.core5.util.Timeout; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; @@ -15,12 +16,13 @@ public class HttpClientConfiguration { @Bean public RestTemplate restTemplate() { RestTemplate restTemplate = new RestTemplate(); - restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory(userTokenParserHttpClient())); + restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory(getHttpClient())); return restTemplate; } @Bean - public CloseableHttpClient userTokenParserHttpClient() { + @Primary + public CloseableHttpClient getHttpClient() { RequestConfig config = RequestConfig.custom() .setConnectTimeout(Timeout.ofMilliseconds(10000)) .setConnectionRequestTimeout(Timeout.ofMilliseconds(10000))