spring-framework
5.3.39

# ref

inline fun <T : Any> ref(name: String? = null): T
Content copied to clipboard

Get a reference to the bean by type or type + name with the syntax `ref<Foo>()` or `ref<Foo>("foo")`. When leveraging Kotlin type inference it could be as short as `ref()` or `ref("foo")`.

## Parameters

name

the name of the bean to retrieve

T

type the bean must match, can be an interface or superclass