Package org.springframework.test.context.bean.override.convention
@NonNullApi
@NonNullFields
package org.springframework.test.context.bean.override.convention
Bean override mechanism based on conventionally-named static methods
in the test class. This allows defining a custom instance for the bean
straight from the test class.
-
Annotation InterfacesClassDescription
@TestBean
is an annotation that can be applied to a non-static field in a test class to override a bean in the test'sApplicationContext
using a static factory method.