-
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] <[email protected]> * 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JKatzwinkel <[email protected]>
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: