fix: 新增字典处理

This commit is contained in:
wangyu 2021-03-22 21:48:24 +08:00
parent 5e21b17f8e
commit baa458ae2c

View File

@ -1,6 +1,8 @@
package com.flyfish.framework.beans.repository;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
@ -55,7 +57,7 @@ public class CustomRepositoryRegistrar {
AbstractBeanDefinition beanDefinition = definitionBuilder.getBeanDefinition();
beanDefinition.setPrimary(configuration.isPrimary());
String beanName = StringUtils.uncapitalize(clazz.getSimpleName());
beanDefinition.setAttribute("factoryBeanObjectType", configuration.getRepositoryInterface());
beanDefinition.setAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE, configuration.getRepositoryInterface());
builder.getRegistry().registerBeanDefinition(beanName, beanDefinition);
}