Class AbstractCryptoBeanDefinitionRegistryPostProcessor

java.lang.Object
ch.admin.bit.jeap.crypto.spring.AbstractCryptoBeanDefinitionRegistryPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, org.springframework.context.EnvironmentAware

public abstract class AbstractCryptoBeanDefinitionRegistryPostProcessor extends Object implements org.springframework.context.EnvironmentAware, org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
A BeanDefinitionRegistryPostProcessor that registers two beans per configured encrpytion key:

This allows for injection of the crypto service for a specific encryption key using the bean name or a qualifier:

     @Qualifier("myKeyCryptoService")
     @Autowired
     CryptoService cryptoService;
 
  • Field Details

    • environment

      protected org.springframework.core.env.Environment environment
  • Constructor Details

    • AbstractCryptoBeanDefinitionRegistryPostProcessor

      public AbstractCryptoBeanDefinitionRegistryPostProcessor()
  • Method Details

    • registerBeans

      protected void registerBeans(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, String keyId, KeyReference keyReference, JeapCryptoDataFormat dataFormat, String kmsBeanName)
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware