All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.ocoop.framework.common.spring.SimplifiedAnnotationBeanNameGenerator Maven / Gradle / Ivy

The newest version!
package cn.ocoop.framework.common.spring;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import org.springframework.util.Assert;

@Slf4j
public class SimplifiedAnnotationBeanNameGenerator extends AnnotationBeanNameGenerator {
    @Override
    protected String buildDefaultBeanName(BeanDefinition definition) {
        String beanClassName = definition.getBeanClassName();
        Assert.state(beanClassName != null, "No bean class name set");
        return beanClassName;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy