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

Add support for Spring Boot 3 #190

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

wormangel
Copy link

What's changed

  • Make library compatible with Spring Boot 3
    • Fix autoconfiguration (META-INF path changed)
    • Replace javax.* imports with corresponding jakarta.* ones
    • Rename module: nakadi-producer-starter-spring-boot-2-test -> nakadi-producer-starter-spring-boot-3-test
    • Replace a few other imports with their new updated locations
  • Change deprecated Docker images
  • Bump Java version to 21 LTS
  • Remove org.postgresql as it's already covered in other dependency
  • Bump several dependencies' versions
  • Update README with new instructions regarding version of the library vs. version of Spring Boot
  • Add Github CI Action to trigger a Maven build
  • Bump library version to 30.0.0-SNAPSHOT

Notes

@wormangel wormangel marked this pull request as ready for review May 7, 2024 15:13
@wormangel wormangel requested review from fbrns and ePaul as code owners May 7, 2024 15:13
@wormangel
Copy link
Author

@ePaul I wanted to trigger a build with a GH action but I guess the PR needs to be merged first for the .github/workflows/ci.yml to have effect (or some other action is needed from the owner of the repo?)

@ePaul ePaul changed the title Add support for Sping Boot 3 Add support for Spring Boot 3 May 7, 2024
Comment on lines +48 to +51
| Spring Boot | nakadi-producer-spring-boot-starter |
|---|---|
| 3.x | >= 30.0.0 |
| 2.x | >= 20.0.0 but < 30.0.0 |
Copy link
Member

Choose a reason for hiding this comment

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

So there is no way of having a version of the library which works with both Spring boot 2 and 3?

Copy link
Author

Choose a reason for hiding this comment

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

Not in my understanding - the 'small' changes in Spring Boot 3 (namely the Jakarta EE 10 + Flyway 9 adoption, and the lack of support for the old way of specifying autoconfiguration) are incompatible between the two versions.

@ePaul
Copy link
Member

ePaul commented May 7, 2024

@ePaul I wanted to trigger a build with a GH action but I guess the PR needs to be merged first for the .github/workflows/ci.yml to have effect (or some other action is needed from the owner of the repo?)

Hmm, not sure. I don't see any button like "run checks". Maybe you can submit the changes to set up a CI separately?
(Though we'll likely soon move this repository to our internal Github, and then we can just use CDP.)

@ePaul ePaul added enhancement spring-boot-3 Issues/PRs which only apply to the Spring-Boot 3 versions (Releases 30.*+) documentation auto-configuration everything about the auto-configuration features dependencies Pull requests that update a dependency file labels May 7, 2024
@wormangel
Copy link
Author

@ePaul I wanted to trigger a build with a GH action but I guess the PR needs to be merged first for the .github/workflows/ci.yml to have effect (or some other action is needed from the owner of the repo?)

Hmm, not sure. I don't see any button like "run checks". Maybe you can submit the changes to set up a CI separately? (Though we'll likely soon move this repository to our internal Github, and then we can just use CDP.)

In that case I might just wait for that then (also volunteer to help with the move) - otherwise the PR now would have to initially run a build with JDK 11, that would cause a merge conflict here, etc.. too much hassle.

Copy link
Member

@ePaul ePaul Nov 8, 2024

Choose a reason for hiding this comment

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

I just was looking at this again, and noticed that this test isn't actually executed when building the project (e.g. with mvnw clean install).

I was just going to complain, but then I also ran the build in master, and found that the test isn't run spring-boot 2 either :-/

I don't remember anymore whether we intentionally disabled this to get the build running faster ... but in effect I can't get it to run now. Any ideas?

Copy link
Author

Choose a reason for hiding this comment

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

I didn't try to fix this myself (could try later if needed) but it smells to me like mixup between JUnit 4 and 5 (and/or JUnit 4 vs. recent Spring Boot issues) - I faced similar things in the past and it was related to that (the fix was to move everything to JUnit 5 instead of having this versions spaghetti (e.g. get rid of @RunWith(SpringRunner) in favor of only @SpringBootTest, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-configuration everything about the auto-configuration features dependencies Pull requests that update a dependency file documentation enhancement spring-boot-3 Issues/PRs which only apply to the Spring-Boot 3 versions (Releases 30.*+)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants