Skip to content

Commit

Permalink
Upgrade to spring boot 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli authored Dec 12, 2024
1 parent 4ca89fb commit 46d652e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions order-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<java.version>21</java.version>
<spring-cloud.version>2023.0.3</spring-cloud.version>
<spring-cloud.version>2024.0.0</spring-cloud.version>
<org-mapstruct.version>1.6.3</org-mapstruct.version>
<springdoc-openapi.version>2.6.0</springdoc-openapi.version>
<springdoc-openapi.version>2.7.0</springdoc-openapi.version>

<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
<spotless.version>2.43.0</spotless.version>
Expand Down Expand Up @@ -491,7 +491,7 @@
<configuration>
<java>
<googleJavaFormat>
<version>1.24.0</version>
<version>1.25.0</version>
<style>AOSP</style>
</googleJavaFormat>
<licenseHeader> <!-- specify either content or file, but not both -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Licensed under MIT License Copyright (c) 2023-2024 Raja Kolli.
public class TestOrderServiceApplication {

public static void main(String[] args) {
System.setProperty("spring.profiles.active", AppConstants.PROFILE_LOCAL);
SpringApplication.from(OrderServiceApplication::main)
.with(ContainersConfig.class)
.withAdditionalProfiles(AppConstants.PROFILE_LOCAL)
.run(args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Licensed under MIT License Copyright (c) 2024 Raja Kolli.
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.context.annotation.Bean;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.KafkaContainer;
import org.testcontainers.kafka.KafkaContainer;
import org.testcontainers.utility.DockerImageName;

@TestConfiguration(proxyBeanMethods = false)
Expand All @@ -21,8 +21,7 @@ public class ContainersConfig {
@ServiceConnection
@RestartScope
KafkaContainer kafkaContainer() {
return new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.7.1"))
.withKraft()
return new KafkaContainer(DockerImageName.parse("apache/kafka-native").withTag("3.8.1"))
.withReuse(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ Licensed under MIT License Copyright (c) 2021-2024 Raja Kolli.
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;

@WebMvcTest(controllers = OrderController.class)
Expand All @@ -58,11 +58,11 @@ class OrderControllerTest {

@Autowired private MockMvc mockMvc;

@MockBean private OrderService orderService;
@MockitoBean private OrderService orderService;

@MockBean private OrderGeneratorService orderGeneratorService;
@MockitoBean private OrderGeneratorService orderGeneratorService;

@MockBean private OrderKafkaStreamService orderKafkaStreamService;
@MockitoBean private OrderKafkaStreamService orderKafkaStreamService;

@Autowired private ObjectMapper objectMapper;

Expand Down

0 comments on commit 46d652e

Please sign in to comment.