quickperf
quickperf copied to clipboard
Provide compatibility with Spring Boot 3
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:
- create a module quick-perf-springboot3-sql-starter
drawback: additional module, code duplication with springboot2
- 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
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 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.
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.
@jeanbisutti when do you plan to release 1.1.1?
@maciejwalkowiak I will try my best to do a release in March. Waiting for the release you can apply this workaround for this issue.
Thanks @jeanbisutti! If there's anything I can help regarding migration to Spring Boot 3 let me know.
any updates on this @jeanbisutti ?
@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.
Workaround: https://github.com/quick-perf/quickperf/issues/196#issuecomment-1384864117
@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?
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.