Class SpringBeanRegistrator

java.lang.Object
se.swedenconnect.signservice.config.spring.SpringBeanRegistrator
All Implemented Interfaces:
BeanRegistrator

public class SpringBeanRegistrator extends Object implements BeanRegistrator
A simple bean registrator for Spring.
  • 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 interface BeanRegistrator
      Type Parameters:
      T - the type of the bean
      Parameters:
      beanName - the bean name
      type - the type of the bean
      bean - the bean
      Throws:
      Exception - for bean registration errors