Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin org.springframework.boot to v3.4.1 #2329

Merged
merged 16 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ is dependent, such as database servers, web services etc.
| Profile | Config Location | Purpose | External Components |
|------------------|----------------------------------------------------------------|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `local` | `src/main/resources/application-local.yaml` | For running the application locally as a docker compose stack with `docker-compose-local.yml`. | Provided as needed by `docker-compose-local.yml`. No external connectivity permitted outside the network boundary of the stack. |
| `intTest` | `src/integrationTest/resources/application-intTest.yaml` | For running integration tests under `src/integrationTest`. | No interaction required or permitted, all external calls are mocked via embedded wiremock (for HTTP requests), an embedded database (for db queries) or `@MockBeans` for anything else. Spring Security is explicitly disabled. |
| `intTest` | `src/integrationTest/resources/application-intTest.yaml` | For running integration tests under `src/integrationTest`. | No interaction required or permitted, all external calls are mocked via embedded wiremock (for HTTP requests), an embedded database (for db queries) or `@MockitoBean` for anything else. Spring Security is explicitly disabled. |
| `functionalTest` | `src/functionalTest/resources/application-functionalTest.yaml` | For running functional tests under `src/functionalTest`. | Functional tests execute API calls against the application deployed in the PR environment. That application is deployed with the `dev` profile (see below). |
| `dev` | `src/main/resources/application-dev.yaml` | For running the application in the Pull Request (dev) environment. | Interaction permitted with "real" components, which may be services deployed to a test environment. |

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
id 'jacoco'
id 'idea'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.springframework.boot' version '3.3.5'
id 'org.springframework.boot' version '3.4.2'
id 'org.owasp.dependencycheck' version '11.1.1'
id 'com.github.ben-manes.versions' version '0.52.0'
id 'org.sonarqube' version '6.0.1.5171'
Expand Down Expand Up @@ -417,8 +417,8 @@ dependencies {
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
implementation 'org.zalando:problem-spring-web-starter:0.29.1'

implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.6.0'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: '4.1.4'
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.8.3'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: '4.2.0'
implementation 'org.springframework.retry:spring-retry:2.0.11'

implementation 'net.javacrumbs.shedlock:shedlock-spring:6.2.0'
Expand Down Expand Up @@ -475,7 +475,7 @@ dependencies {
exclude group: 'junit', module: 'junit'
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-contract-stub-runner', version: '4.1.5'
testImplementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-contract-stub-runner', version: '4.2.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
testImplementation group: 'io.projectreactor', name: 'reactor-test', version: '3.7.2'
testImplementation 'org.springframework.security:spring-security-test:6.4.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import org.junit.jupiter.api.TestInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.boot.test.mock.mockito.SpyBean;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.context.bean.override.mockito.MockitoSpyBean;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import uk.gov.hmcts.darts.authorisation.component.UserIdentity;
Expand Down Expand Up @@ -41,19 +41,19 @@ class TestSupportControllerTest extends IntegrationBase {
private static final String ENDPOINT_URL = "/functional-tests";
@Autowired
private transient MockMvc mockMvc;
@MockBean
@MockitoBean
private UserIdentity mockUserIdentity;
@MockBean
@MockitoBean
private BankHolidaysService mockBankHolidaysService;

@MockBean
@MockitoBean
private UserAccountEntity mockUserAccountEntity;

@MockBean
@MockitoBean
private SecurityGroupEntity mockSecurityGroupEntity;
@MockBean
@MockitoBean
private CourthouseEntity courthouseEntity;
@SpyBean
@MockitoSpyBean
private AuditActivityRepository auditActivityRepository;

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.core.io.Resource;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
import uk.gov.hmcts.darts.common.datamanagement.api.DataManagementFacade;
Expand Down Expand Up @@ -46,7 +46,7 @@ class AnnotationGetTest extends IntegrationBase {

@Mock
private DownloadResponseMetaData downloadResponseMetaData;
@MockBean
@MockitoBean
private DataManagementFacade dataManagementFacade;
@Autowired
private MockMvc mockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
import uk.gov.hmcts.darts.common.entity.ArmRpoExecutionDetailEntity;
Expand Down Expand Up @@ -50,7 +50,7 @@ class StubbedArmRpoDownloadProductionIntTest extends PostgresIntegrationBase {
@Autowired
private ArmAutomatedTaskRepository armAutomatedTaskRepository;

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

private ArmRpoExecutionDetailEntity armRpoExecutionDetailEntity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.boot.test.mock.mockito.SpyBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.context.bean.override.mockito.MockitoSpyBean;
import uk.gov.hmcts.darts.arm.config.ArmDataManagementConfiguration;
import uk.gov.hmcts.darts.arm.model.ArchiveRecord;
import uk.gov.hmcts.darts.arm.model.batch.ArmBatchItem;
Expand Down Expand Up @@ -62,9 +62,9 @@ class DataStoreToArmHelperIntTest extends IntegrationBase {
private static final LocalDateTime HEARING_DATE = LocalDateTime.of(2023, 9, 26, 10, 0, 0);
private MediaEntity savedMedia;

@MockBean
@MockitoBean
private UserIdentity userIdentity;
@SpyBean
@MockitoSpyBean
private ArmDataManagementConfiguration armDataManagementConfiguration;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.ArmAsyncSearchResponse;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
Expand All @@ -22,7 +22,7 @@

class ArmRpoApiAddAsyncSearchIntTest extends PostgresIntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.CreateExportBasedOnSearchResultsTableResponse;
import uk.gov.hmcts.darts.arm.model.rpo.MasterIndexFieldByRecordClassSchema;
Expand All @@ -25,7 +25,7 @@ class ArmRpoApiCreateExportBasedOnSearchResultsTableIntTest extends PostgresInte

private static final String PRODUCTION_NAME = "DARTS_RPO_2024-08-13";

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import feign.FeignException;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
import uk.gov.hmcts.darts.common.entity.ArmRpoExecutionDetailEntity;
Expand All @@ -29,7 +29,7 @@
@SuppressWarnings("PMD.CloseResource")
class ArmRpoApiDownloadProductionIntTest extends IntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.ExtendedProductionsByMatterResponse;
import uk.gov.hmcts.darts.arm.config.ArmApiConfigurationProperties;
Expand All @@ -24,10 +24,10 @@ class ArmRpoApiGetExtendedProductionsByMatterIntTest extends IntegrationBase {

private static final String PRODUCTION_NAME = "DARTS_RPO_2024-08-13";
public static final String END_PRODUCTION_TIME = "2025-01-16T12:30:09.9129726+00:00";
@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@MockBean
@MockitoBean
private ArmApiConfigurationProperties armApiConfigurationProperties;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.ExtendedSearchesByMatterResponse;
import uk.gov.hmcts.darts.arm.config.ArmApiConfigurationProperties;
Expand All @@ -23,10 +23,10 @@ class ArmRpoApiGetExtendedSearchesByMatterIntTest extends IntegrationBase {
private static final String SEARCH_ID = "8271f101-8c14-4c41-8865-edc5d8baed99";
private static final String PRODUCTION_NAME = "DARTS_RPO_2024-08-13";

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@MockBean
@MockitoBean
private ArmApiConfigurationProperties armApiConfigurationProperties;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import feign.FeignException;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.IndexesByMatterIdResponse;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
Expand All @@ -25,7 +25,7 @@
import static org.mockito.Mockito.when;

class ArmRpoApiGetIndexesByMatterIdIntTest extends IntegrationBase {
@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.ProductionOutputFilesRequest;
import uk.gov.hmcts.darts.arm.client.model.rpo.ProductionOutputFilesResponse;
Expand All @@ -29,7 +29,7 @@
@SuppressWarnings("checkstyle:linelength")
class ArmRpoApiGetProductionOutputFilesIntTest extends PostgresIntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import feign.FeignException;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.RemoveProductionResponse;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
Expand All @@ -22,7 +22,7 @@

class ArmRpoApiRemoveProductionIntTest extends IntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.SaveBackgroundSearchResponse;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
Expand All @@ -21,7 +21,7 @@

class ArmRpoApiSaveBackgroundSearchIntTest extends IntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.EmptyRpoRequest;
import uk.gov.hmcts.darts.arm.client.model.rpo.ProfileEntitlementResponse;
Expand All @@ -29,7 +29,7 @@
})
class ArmRpoGetProfileEntitlementsIntTest extends PostgresIntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.MasterIndexFieldByRecordClassSchemaResponse;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
Expand All @@ -28,7 +28,7 @@

class ArpRpoApiGetMasterIndexFieldByRecordClassSchemaIntTest extends IntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import feign.FeignException;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.RecordManagementMatterResponse;
import uk.gov.hmcts.darts.arm.exception.ArmRpoException;
Expand All @@ -22,7 +22,7 @@

class ArpRpoApiGetRecordManagementMatterIntTest extends IntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import feign.FeignException;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import uk.gov.hmcts.darts.arm.client.ArmRpoClient;
import uk.gov.hmcts.darts.arm.client.model.rpo.StorageAccountResponse;
import uk.gov.hmcts.darts.arm.config.ArmApiConfigurationProperties;
Expand All @@ -27,10 +27,10 @@

class ArpRpoApiGetStorageAccountsIntTest extends IntegrationBase {

@MockBean
@MockitoBean
private ArmRpoClient armRpoClient;

@MockBean
@MockitoBean
private ArmApiConfigurationProperties armApiConfigurationProperties;

@Autowired
Expand Down
Loading