spring-framework / org.springframework.test.context.junit.jupiter / SpringExtension / supportsParameter

supportsParameter

open fun supportsParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext): Boolean

Determine if the value for the Parameter in the supplied ParameterContext should be autowired from the test's ApplicationContext.

Returns true if the parameter is declared in a Constructor that is annotated with Autowired and otherwise delegates to ParameterAutowireUtils#isAutowirable.

WARNING: If the parameter is declared in a Constructor that is annotated with @Autowired, Spring will assume the responsibility for resolving all parameters in the constructor. Consequently, no other registered ParameterResolver will be able to resolve parameters.

See Also
#resolveParameterParameterAutowireUtils#isAutowirable