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

Provide compatibility with Spring Boot 3 #196

Open
klu2 opened this issue Jan 12, 2023 · 13 comments
Open

Provide compatibility with Spring Boot 3 #196

klu2 opened this issue Jan 12, 2023 · 13 comments
Labels
✨ feature New feature or request

Comments

@klu2
Copy link
Contributor

klu2 commented Jan 12, 2023

Description
The library currently does not work with Spring Boot 3. The problem is that already in Spring Boot 2.7 there was a change how to load AutoConfiguration, see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#building-jars-with-maven-shade-plugin-and-gradle-shadow-plugin

Implementation ideas

What we need is a file called org.springframework.boot.autoconfigure.AutoConfiguration.imports inside src/main/resources/META-INF/spring with the following content:

org.quickperf.spring.boot.QuickPerfProxyBeanAutoConfiguration

I see 2 options:

  1. create a module quick-perf-springboot3-sql-starter

drawback: additional module, code duplication with springboot2

  1. modify the existing quick-perf-springboot2-sql starter and add the org.springframework.boot.autoconfigure.AutoConfiguration.imports file there

drawback: will require at least Spring Boot 2.7
but if you leave the old file as well (spring.factories), all versions (also Spring Boot 3.0) would work, so I'd prefer that option

@klu2 klu2 added the ✨ feature New feature or request label Jan 12, 2023
@jeanbisutti
Copy link
Collaborator

Thank you @klu2 for having reported and analyzed this problem! I agree with your analysis. Would you be interested in creating a PR to fix the problem?

klu2 added a commit to cloudflightio/quickperf that referenced this issue Jan 13, 2023
@jeanbisutti
Copy link
Collaborator

@klu2 I have deployed a snapshot version (1.1.1-SNAPSHOT) with the fix. You may want to check that the SQL annotations now work with Spring Boot 3.

@klu2
Copy link
Contributor Author

klu2 commented Jan 17, 2023

hi @jeanbisutti thanks - I have tested that already in another library that we are publishing (https://github.com/cloudflightio/cloudflight-platform-spring) where I temporarily add that file to our library which loads quickperf transitively (https://github.com/cloudflightio/cloudflight-platform-spring/blob/master/platform-spring-test-bom/platform-spring-test-jpa/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports) and that works perfectly fine with Spring Boot 3, we are running that already.

As soon as you've published a release, I will update the version in our library and remove that file again from our code-base.

@maciejwalkowiak
Copy link

@jeanbisutti when do you plan to release 1.1.1?

@jeanbisutti
Copy link
Collaborator

@maciejwalkowiak I will try my best to do a release in March. Waiting for the release you can apply this workaround for this issue.

@maciejwalkowiak
Copy link

Thanks @jeanbisutti! If there's anything I can help regarding migration to Spring Boot 3 let me know.

@NaitYoussef
Copy link

any updates on this @jeanbisutti ?

@jeanbisutti
Copy link
Collaborator

@NaitYoussef I have been pretty busy these last months... Thank you for the reminder. I will try to a a release soon. For this issue, you can apply this workaround.

@jeanbisutti
Copy link
Collaborator

Workaround: #196 (comment)

@maciejwalkowiak
Copy link

@jeanbisutti I don't want to nag you periodically but it would be great to release 1.1.1. Is there anything I can do to help? I'd like to avoid forking this project but maybe it is a right thing to do?

@jeanbisutti
Copy link
Collaborator

Hey @maciejwalkowiak If you want to help, you can document #175. The documentation is done in the wiki: https://github.com/quick-perf/doc/wiki/QuickPerf Just fork the wiki and do the modifications on your copy. Thanks.

@rajadilipkolli
Copy link

Hi @jeanbisutti , Is there any plan to continuing this wonderful project?

@jeanbisutti
Copy link
Collaborator

Hi @rajadilipkolli I am short in time. Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants