Previously, @SpyBean's name attribute was not used when determining
the name of the bean to spy upon. When there were multiple candidates,
none of which were primary, this would lead to a failure to find the
bean to spy upon. This behaviour is also inconsistent with @MockBean
which does use the name attribute to identify the bean to mock.
This commit updates MockitoPostProcessor to use the name attribute,
when set, to identify the bean that should be spied upon. For
consistency with @MockBean it is always used when set. When not set
the previous logic will continue to be used.
Closes gh-8315
Previously, the custom layout sample could only be built successfully
if spring-boot-dependencies had be installed locally, making its
effective pom available in the local Maven cache.
This commit updates the sample's tests to look at its own pom to
determine the version of Spring Boot that should be used in the
Gradle tests.
Closes gh-8330
Previously, bootRepackage's excludeDevtools property would be
overridden by the springBoot extension's excludeDevtools property.
This prevented devtools from being included by configuring it on the
repackaging task.
This commit corrects the logic so that the setting on the repackaging
task takes priority. It also adds some tests to verify the behaviour.
Closes gh-8308
This commit adds `EmbeddedWebServerInitializedEvent`, which holds the
`EmbeddedWebServer` information when the application context starts.
The `EmbeddedServletContainerInitializedEvent` now inherits from that
type and holds additional information, the
`EmbeddedWebApplicationContext`.
Closes gh-8208