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 |
||
---|---|---|
.. | ||
assets/images | ||
examples | ||
pages | ||
partials/web | ||
nav.adoc |