Spring Context Provider
Spring implementation of ContextProvider that retrieves objects from the Spring ApplicationContext.
This enables injection of Spring beans into action methods using the com.embabel.agent.api.annotation.Provided annotation.
Example:
@State
data class MyState(val data: String) {
@Action
fun process(@Provided myService: MyService): NextState {
return NextState(myService.transform(data))
}
}Content copied to clipboard
Parameters
application Context
the Spring application context to retrieve beans from