Class SpringBeanStore
java.lang.Object
org.apache.juneau.cp.BeanStore
org.apache.juneau.rest.springboot.SpringBeanStore
A bean store that uses Spring bean resolution to find beans if they're not already in this store.
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.cp.BeanStore
BeanStore.Builder, BeanStore.Void
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSpringBeanStore
(Optional<org.springframework.context.ApplicationContext> appContext, Optional<BeanStore> parent, Object resource) Constructor. -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T>
Returns the unnamed bean of the specified type.<T> Optional<T>
Returns the named bean of the specified type.<T> Stream<BeanStoreEntry<T>>
Returns all the beans in this store of the specified type.Methods inherited from class org.apache.juneau.cp.BeanStore
add, add, addBean, addBean, addSupplier, addSupplier, clear, create, createBean, createEntry, createMethodFinder, createMethodFinder, createMethodFinder, getMissingParams, getParams, hasAllParams, hasBean, hasBean, of, of, removeBean, removeBean, toString
-
Constructor Details
-
SpringBeanStore
public SpringBeanStore(Optional<org.springframework.context.ApplicationContext> appContext, Optional<BeanStore> parent, Object resource) Constructor.- Parameters:
appContext
- The Spring application context used to resolve beans.parent
- The parent REST object bean store. Can benull .resource
- The REST object. Can benull .
-
-
Method Details
-
getBean
Description copied from class:BeanStore
Returns the unnamed bean of the specified type. -
getBean
Description copied from class:BeanStore
Returns the named bean of the specified type. -
stream
Description copied from class:BeanStore
Returns all the beans in this store of the specified type.Returns both named and unnamed beans.
The results from the parent bean store are appended to the list of beans from this beans store.
-