package com.lantone.qc.kernel.web.config;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;

/**
 * @Description:
 * @author: rengb
 * @time: 2020/11/9 16:30
 */
public class CustomNameGenerator extends AnnotationBeanNameGenerator {

    @Override
    public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
        String beanName = definition.getBeanClassName();
        if (beanName.contains("catalogue")) {
            return beanName;
        }
        return super.generateBeanName(definition, registry);
    }

}