-
Notifications
You must be signed in to change notification settings - Fork 38.2k
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
Bean Overrides for certain FactoryBean
use cases no longer work
#33800
Comments
JpaRepository
Thanks for reporting the issue. The root cause is that We'll look into it! |
This has been addressed on @romainmoreau, please try it out with Thanks, Sam |
@sbrannen I tested |
Awesome! 🚀 Thanks so much for trying it out and letting us know it works! |
JpaRepository
FactoryBean
use cases no longer work
see spring-projects/spring-framework#33800 can be reverted when spring 6.2.0 GA comes out.
* build(deps): bump the spring-boot group with 5 updates Bumps the spring-boot group with 5 updates: | Package | From | To | | --- | --- | --- | | [org.springframework.boot:spring-boot-starter-tomcat](https://github.com/spring-projects/spring-boot) | `3.4.0-M3` | `3.4.0-RC1` | | [org.springframework.boot:spring-boot-autoconfigure](https://github.com/spring-projects/spring-boot) | `3.4.0-M3` | `3.4.0-RC1` | | [org.springframework.boot:spring-boot-starter-logging](https://github.com/spring-projects/spring-boot) | `3.4.0-M3` | `3.4.0-RC1` | | [org.springframework.boot:spring-boot-starter-test](https://github.com/spring-projects/spring-boot) | `3.4.0-M3` | `3.4.0-RC1` | | [org.springframework.boot](https://github.com/spring-projects/spring-boot) | `3.4.0-M3` | `3.4.0-RC1` | Updates `org.springframework.boot:spring-boot-starter-tomcat` from 3.4.0-M3 to 3.4.0-RC1 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.4.0-M3...v3.4.0-RC1) Updates `org.springframework.boot:spring-boot-autoconfigure` from 3.4.0-M3 to 3.4.0-RC1 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.4.0-M3...v3.4.0-RC1) Updates `org.springframework.boot:spring-boot-starter-logging` from 3.4.0-M3 to 3.4.0-RC1 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.4.0-M3...v3.4.0-RC1) Updates `org.springframework.boot:spring-boot-starter-test` from 3.4.0-M3 to 3.4.0-RC1 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.4.0-M3...v3.4.0-RC1) Updates `org.springframework.boot` from 3.4.0-M3 to 3.4.0-RC1 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.4.0-M3...v3.4.0-RC1) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-tomcat dependency-type: direct:production update-type: version-update:semver-patch dependency-group: spring-boot - dependency-name: org.springframework.boot:spring-boot-autoconfigure dependency-type: direct:production update-type: version-update:semver-patch dependency-group: spring-boot - dependency-name: org.springframework.boot:spring-boot-starter-logging dependency-type: direct:production update-type: version-update:semver-patch dependency-group: spring-boot - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-type: direct:production update-type: version-update:semver-patch dependency-group: spring-boot - dependency-name: org.springframework.boot dependency-type: direct:production update-type: version-update:semver-patch dependency-group: spring-boot ... Signed-off-by: dependabot[bot] <support@github.com> * ci: execute entire test matrix * add workaround for spy bean override issue in spring 6.2.0-RC3 see spring-projects/spring-framework#33800 can be reverted when spring 6.2.0 GA comes out. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JKatzwinkel <JKatzwinkel@users.noreply.github.com>
Overview
Here's a demo unit test reproducing the issue: https://github.com/romainmoreau/spy-demo/blob/master/src/test/java/com/example/demo/DemoMockTest.java
The issue happens with Spring Boot 3.4.0-RC1, but it was working with Spring Boot 3.4.0-M3.
Here's the full stack trace: https://github.com/romainmoreau/spy-demo/actions/runs/11532983997/job/32105377666#step:4:2342
It works with Spring Boot 3.4.0-RC1 if Spring Framework is downgraded to 6.2.0-RC1.
Related Issues
@MockitoSpyBean
#33803The text was updated successfully, but these errors were encountered: