Skip to content

build: update to spring boot 4.1 - #863

Open
c4181 wants to merge 3 commits into
obsidiandynamics:masterfrom
c4181:springboot-4
Open

build: update to spring boot 4.1#863
c4181 wants to merge 3 commits into
obsidiandynamics:masterfrom
c4181:springboot-4

Conversation

@c4181

@c4181 c4181 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Update to Spring Boot 4.1

  • Migrate to tomcat since undertow is no longer supported
  • Remove the TRACE filter since Tomcat blocks it by default
  • Remove the ant_pattern_matcher config since the ant matcher is deprecated
  • Update deprecated methods in the Kafka AdminClient

@Bert-R
Bert-R requested a balanced review from Copilot August 8, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Upgrades Kafdrop to Spring Boot 4.1 and migrates affected web, Jackson, Actuator, testing, and Kafka APIs.

Changes:

  • Replaces Undertow with Tomcat and adds TRACK filtering.
  • Migrates Spring Boot 4.1 package and configuration APIs.
  • Updates Kafka consumer-group listing API.

Reviewed changes

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

Show a summary per file
File Description
pom.xml Updates Spring Boot, web server, Springdoc, and test dependencies.
src/main/java/kafdrop/Kafdrop.java Replaces Undertow configuration with a TRACK filter.
src/main/java/kafdrop/config/HealthCheckConfiguration.java Adapts health reporting to descriptor APIs.
src/main/java/kafdrop/config/ObjectMapperConfig.java Migrates to Jackson 3 JsonMapper.
src/main/java/kafdrop/controller/BasicErrorController.java Updates Spring Boot error API imports.
src/main/java/kafdrop/service/KafkaHighLevelAdminClient.java Migrates Kafka group listing APIs.
src/main/resources/application.yml Updates Jackson enum configuration.
src/test/java/kafdrop/KafdropTest.java Migrates TestRestTemplate configuration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

final Collection<GroupListing> groupListing;
try {
groupListing = adminClient.listConsumerGroups().valid().get();
groupListing = adminClient.listGroups().valid().get();

@c4181 c4181 Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The STREAMS group type not working is actually what prompted my PR.

The call to listConsumerGroupOffsets happily accepts and returns the correct info for CLASSIC, CONSUMER, and STREAMS group types. If a SHARE group is passed in, it'll just ignore it.

There will need to be a little bit of refactoring to get share group information displayed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've been reading a bit more about this and tend to agree with Copilot. It seems like listConsumerGroupOffsets will throw an exception when it receives something other than a consumer group.
So, I'd say there are two options:

  • Rename this method into listGroups, retain the filter behavior you just implemented (list all groups) and update callers of the renamed method to accept all types of groups.
  • Retain the name and the filtering, though by calling listGroups(org.apache.kafka.clients.admin.ListGroupsOptions.forConsumerGroups()) now.

Comment thread src/main/java/kafdrop/Kafdrop.java
Comment thread src/main/java/kafdrop/config/ObjectMapperConfig.java Outdated
@Bert-R

Bert-R commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

@c4181 Thanks! This contribution is highly appreciated. It was on my list of things to do since long, but I couldn't find the time.

I've asked Copilot for a review. See the review comments. Besides that, our linter complains about a line that is too long:

src/main/java/kafdrop/Kafdrop.java:
  	71: Line too long (186 instead of 120)

Can you have a look?

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.

3 participants