Skip to content

spring-boot-4#1

Merged
xcodeassociated merged 5 commits intomainfrom
spring-boot-4
Mar 3, 2026
Merged

spring-boot-4#1
xcodeassociated merged 5 commits intomainfrom
spring-boot-4

Conversation

@xcodeassociated
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 3, 2026 16:11
@xcodeassociated xcodeassociated changed the title Spring boot 4 spring-boot-4 Mar 3, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the project to Spring Boot 4 and adjusts the app’s supporting infrastructure/config to match (Kafka consumption/production style, GraphQL path property, and OpenTelemetry-based observability), while removing several sample/demo modules.

Changes:

  • Upgrade Gradle/Spring Boot versions and refresh dependencies (incl. OpenTelemetry + micrometer context propagation).
  • Refactor Kafka from reactive templates/CommandLineRunner-based consumption to @KafkaListener + KafkaTemplate.
  • Update integration test setup to use Testcontainers for Kafka + MongoDB and adjust various Spring Boot 4 property/package changes.

Reviewed changes

Copilot reviewed 49 out of 51 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
build.gradle Bumps Spring Boot to 4.x and updates dependency set (Kafka, GraphQL, OTel, etc.).
src/main/resources/application.properties Updates Mongo + GraphQL + observability/tracing properties.
src/main/resources/application-local.properties Adds local profile overrides for OTLP exporting.
src/test/resources/application.properties Updates test GraphQL path property; tweaks test config.
src/test/kotlin/.../IntegrationTest.kt Switches integration tests to dynamic properties + Kafka/Mongo containers; updates GraphQL testing imports.
src/main/kotlin/com/softeno/template/app/kafka/* Refactors Kafka consumer/producer + properties binding.
src/main/kotlin/com/softeno/template/app/user/* Emits Kafka messages on user creation instead of app events.
src/main/kotlin/com/softeno/template/app/config/opentelemetry/OpenTelemetryConfig.kt Adds OpenTelemetry appender installation + context propagating decorator.
src/main/resources/logback-spring.xml Introduces rolling file + OpenTelemetry appenders and revises profile-specific logging.
src/main/resources/graphql/schema.graphqls Minor schema formatting cleanup.
docker-compose.yml, init_volumes.sh Adds local docker stack + helper for volumes.
Various removed files Removes playground/rsocket/async/minio/server-events samples and related HTTP notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +65 to 87
@Container
var kafka: KafkaContainer = KafkaContainer(DockerImageName.parse("apache/kafka-native:3.8.0"))
.withEnv("KAFKA_AUTO_CREATE_TOPICS_ENABLE", "true")
.withEnv("ALLOW_PLAINTEXT_LISTENER", "true")
.withEnv("KAFKA_CREATE_TOPICS", "sample_topic_2" + ":1:1")

@Container
var mongoDBContainer = MongoDBContainer(DockerImageName.parse("mongo:6.0.4"))
.withEnv("MONGO_INITDB_DATABASE", "example1")

@JvmStatic
@DynamicPropertySource
fun registerDynamicProperties(registry: DynamicPropertyRegistry) {
kafka.start()
registry.add("spring.kafka.bootstrap-servers") {
kafka.bootstrapServers
}

mongoDBContainer.start()
registry.add("spring.mongodb.uri") {
mongoDBContainer.replicaSetUrl
}
}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Container fields are only managed automatically when the JUnit 5 Testcontainers extension is enabled (typically via @Testcontainers). Since this test suite doesn’t use @Testcontainers anywhere, these annotations are currently misleading and container lifecycle is handled manually via start() only (no explicit stop). Either add @Testcontainers and let Testcontainers manage start/stop, or remove @Container and manage lifecycle explicitly (including stopping containers).

Copilot uses AI. Check for mistakes.
Comment on lines 19 to 22
import reactor.core.publisher.Sinks
import reactor.core.publisher.Sinks.Many
import tools.jackson.databind.ObjectMapper
import java.time.Duration
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import tools.jackson.databind.ObjectMapper does not resolve anywhere in this repo (no package tools.jackson... found), so this will fail compilation. Switch back to com.fasterxml.jackson.databind.ObjectMapper (or add/relocate the intended wrapper package and update imports consistently).

Copilot uses AI. Check for mistakes.
Comment on lines 24 to 28
import org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter
import reactor.core.publisher.Mono
import tools.jackson.databind.ObjectMapper
import java.time.Instant
import java.util.concurrent.ConcurrentHashMap
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import tools.jackson.databind.ObjectMapper does not resolve anywhere in this repo, which will break compilation. Use com.fasterxml.jackson.databind.ObjectMapper (or introduce the missing tools.jackson package and keep imports consistent).

Copilot uses AI. Check for mistakes.
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
import reactor.core.publisher.Sinks
import tools.jackson.databind.ObjectMapper
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import tools.jackson.databind.ObjectMapper does not exist in the repository, so this change will not compile. Replace with com.fasterxml.jackson.databind.ObjectMapper (or add the missing wrapper package and update all callers).

Suggested change
import tools.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.ObjectMapper

Copilot uses AI. Check for mistakes.
import org.springframework.stereotype.Service
import reactor.core.publisher.Flux
import reactor.kafka.sender.SenderResult
import tools.jackson.databind.ObjectMapper
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tools.jackson.databind.ObjectMapper does not resolve in this repo (no tools.jackson package found), so this will fail compilation. Use com.fasterxml.jackson.databind.ObjectMapper or provide the missing abstraction and update imports consistently.

Suggested change
import tools.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.ObjectMapper

Copilot uses AI. Check for mistakes.
Comment on lines 7 to 12
import org.apache.kafka.clients.consumer.ConsumerRecord
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.boot.CommandLineRunner
import org.springframework.kafka.core.reactive.ReactiveKafkaConsumerTemplate
import org.springframework.kafka.annotation.KafkaListener
import org.springframework.stereotype.Controller
import reactor.core.publisher.Flux
import tools.jackson.databind.ObjectMapper

@Controller
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import tools.jackson.databind.ObjectMapper does not exist in this repository, so this won’t compile. Replace with com.fasterxml.jackson.databind.ObjectMapper (or add the missing tools.jackson package and keep imports consistent across the project).

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +74
<!-- db -->
<logger name="logging.level.io.r2dbc" level="debug" additivity="false" >
<appender-ref ref="Console" />
</logger>
<logger name="logging.level.org.springframework.r2dbc" level="debug" additivity="false" >
<appender-ref ref="Console" />
</logger>
<logger name="logging.level.org.springframework.data" level="debug" additivity="false" >
<appender-ref ref="Console" />
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These logger names look like Spring property keys rather than actual logger categories (e.g., logging.level.io.r2dbc instead of io.r2dbc). As written, they won’t affect the intended loggers. Update the name attributes to the real package/class logger names you want to configure (e.g., io.r2dbc, org.springframework.r2dbc, org.springframework.data).

Copilot uses AI. Check for mistakes.
Comment on lines +255 to 256
// note: a returned result differs from graphigl because we use: .path("getAllPermissions")
val expected = """
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: graphigl should be graphiql (GraphiQL).

Copilot uses AI. Check for mistakes.
@xcodeassociated xcodeassociated merged commit fc673a8 into main Mar 3, 2026
6 checks passed
@xcodeassociated xcodeassociated deleted the spring-boot-4 branch March 3, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants