Skip to content

SPRNGCORE-6: Upgrade to Spring-boot 3.4.2 and springdoc 2.8.4. #74

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

Merged
merged 4 commits into from
Feb 11, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ bin/
target/
.settings/
!.mvn/wrapper/maven-wrapper.jar
/target_test-classes/

### STS ###
.apt_generated
Expand Down Expand Up @@ -61,4 +62,4 @@ hs_err_pid*

.DS_Store

.vscode*
.vscode*
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
Expand All @@ -71,7 +71,7 @@ class JsonSchemasControllerTest {
@Autowired
private MockMvc mvc;

@MockBean
@MockitoBean
private JsonSchemasService jsonSchemasService;

@ParameterizedTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
Expand All @@ -71,7 +71,7 @@ class RamlsControllerTest {
@Autowired
private MockMvc mvc;

@MockBean
@MockitoBean
private RamlsService ramlsService;

@ParameterizedTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.when;

import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.id.enhanced.AccessCallback;
import org.hibernate.id.enhanced.DatabaseStructure;
import org.hibernate.id.enhanced.Optimizer;
Expand Down Expand Up @@ -51,7 +52,7 @@ void beforeEach() {

@Test
void generateWorksTest() {
when(persister.getIdentifier(any(), any())).thenReturn(UUID);
when(persister.getIdentifier(any(), any(SharedSessionContractImplementor.class))).thenReturn(UUID);

Object result = folioUUIDGenerator.generate(session, folioUUIDGenerator);

Expand All @@ -60,7 +61,7 @@ void generateWorksTest() {

@Test
void generateWorksWithNullIdentifierTest() {
when(persister.getIdentifier(any(), any())).thenReturn(null);
when(persister.getIdentifier(any(), any(SharedSessionContractImplementor.class))).thenReturn(null);
when(databaseStructure.buildCallback(any())).thenReturn(accessCallback);
when(optimizer.generate(any())).thenReturn(JSON_OBJECT);

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.7</version>
<version>3.4.2</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand Down Expand Up @@ -37,7 +37,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-module-core.version>2.1.0-SNAPSHOT</spring-module-core.version>
<springdoc.version>2.3.0</springdoc.version>
<springdoc.version>2.8.4</springdoc.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
Expand All @@ -60,7 +60,7 @@ class TenantControllerTest {
@Autowired
private MockMvc mvc;

@MockBean
@MockitoBean
private HibernateSchemaService hibernateSchemaService;

@ParameterizedTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public void setup() {
messageConverters.add(new ObjectPlainTextConverter(StandardCharsets.UTF_8));

this.restTemplate = restTemplateBuilder
.setConnectTimeout(Duration.ofSeconds(connectionTimeout))
.setReadTimeout(Duration.ofSeconds(readTimeout))
.connectTimeout(Duration.ofSeconds(connectionTimeout))
.readTimeout(Duration.ofSeconds(readTimeout))
.additionalMessageConverters(messageConverters)
.build();
}
Expand Down