Class SpringBeanRegistrator
java.lang.Object
se.swedenconnect.signservice.config.spring.SpringBeanRegistrator
- All Implemented Interfaces:
BeanRegistrator
A simple bean registrator for Spring.
-
Constructor Summary
ConstructorDescriptionSpringBeanRegistrator
(org.springframework.context.ConfigurableApplicationContext context) Constructor. -
Method Summary
Modifier and TypeMethodDescription<T> void
registerBean
(String beanName, Class<T> type, T bean) Registers a bean with the given name.
-
Constructor Details
-
SpringBeanRegistrator
public SpringBeanRegistrator(@Nonnull org.springframework.context.ConfigurableApplicationContext context) Constructor.- Parameters:
context
- the Spring application context
-
-
Method Details
-
registerBean
public <T> void registerBean(@Nonnull String beanName, @Nonnull Class<T> type, @Nonnull T bean) throws Exception Registers a bean with the given name.- Specified by:
registerBean
in interfaceBeanRegistrator
- Type Parameters:
T
- the type of the bean- Parameters:
beanName
- the bean nametype
- the type of the beanbean
- the bean- Throws:
Exception
- for bean registration errors
-