package com.bonus.mq;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

@Configuration
public class PropertyConfiguration implements ImportBeanDefinitionRegistrar {
   @Override
   public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
      if (!registry.containsBeanDefinition(PropertyBeanPostProcessor.class.getName())) {
         registry.registerBeanDefinition(PropertyBeanPostProcessor.class.getName(), new RootBeanDefinition(PropertyBeanPostProcessor.class));
      }

   }
}
