Allow beans created in MockRestServiceServerAutoConfiguration to be replaced by user-provided alternatives by HuitaePark · Pull Request #48825 · spring-projects/spring-boot
Previously, MockRestServiceServerAutoConfiguration unconditionally defined a MockServerRestClientCustomizer bean, which prevented user overrides. This commit adds @ConditionalOnMissingBean to ensure the auto-configuration backs off when a user-provided customizer is present. Closes spring-projectsgh-46853 Signed-off-by: HuitaePark <qkrgmlxo3174@gmail.com>
wilkinsona
changed the title
Allow user-override of MockRestServiceServer beans
Allow beans created in MockRestServiceServerAutoConfiguration to be overridden
wilkinsona
changed the title
Allow beans created in MockRestServiceServerAutoConfiguration to be overridden
Allow beans created in MockRestServiceServerAutoConfiguration to be replaced by user-provided alternatives
wilkinsona pushed a commit that referenced this pull request
Jan 16, 2026Previously, MockRestServiceServerAutoConfiguration unconditionally defined its beans, preventing the user from providing an alternative. This commit adds @ConditionalOnMissingBean to ensure the auto-configuration backs off when a user-provided alternatives are present. See gh-48825 Signed-off-by: HuitaePark <qkrgmlxo3174@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters