spring-framework/framework-docs/modules/ROOT/pages/testing
Sam Brannen 1c87e4795d Introduce enforceOverride flag in @⁠TestBean and @⁠MockitoBean
Prior to this commit, @⁠MockitoBean could be used to either create or
replace a bean definition, but @⁠TestBean could only be used to replace
a bean definition.

However, Bean Override implementations should require the presence of
an existing bean definition by default (i.e. literally "override" by
default), while giving the user the option to have a new bean
definition created if desired.

To address that, this commit introduces a new `enforceOverride`
attribute in @⁠TestBean and @⁠MockitoBean that defaults to true but
allows the user to decide if it's OK to create a bean for a nonexistent
bean definition.

Closes gh-33613
2024-09-30 14:32:53 +02:00
..
annotations Introduce enforceOverride flag in @⁠TestBean and @⁠MockitoBean 2024-09-30 14:32:53 +02:00
mockmvc Revise introductory content for MockMvc 2024-09-08 17:59:15 +02:00
testcontext-framework Reject non-singletons in Test Bean Override support 2024-09-29 18:12:00 +02:00
annotations.adoc Remove duplicated section links for test annotations 2023-09-13 17:50:12 +02:00
appendix.adoc Trim IDs with parent 2023-05-04 15:35:05 +01:00
integration.adoc Document AssertJ support for MockMvc 2024-06-21 12:51:35 +02:00
introduction.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00
mockmvc.adoc Revise introductory content for MockMvc 2024-09-08 17:59:15 +02:00
resources.adoc Restructure content in testing resources section 2024-09-12 13:37:58 +02:00
spring-mvc-test-client.adoc Replace 'e.g.' with 'for example' in documentation and comments 2024-09-26 14:11:17 +02:00
support-jdbc.adoc Fix cross references 2023-05-04 15:35:05 +01:00
testcontext-framework.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00
unit.adoc Delete obsolete documentation for JNDI mock support 2024-07-01 18:32:28 +02:00
webtestclient.adoc Replace 'e.g.' with 'for example' in documentation and comments 2024-09-26 14:11:17 +02:00