public class FeatureServiceHandlerParser extends AbstractBeanDefinitionParser {
@Override
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
BeanDefinitionBuilder factoryBuilder = BeanDefinitionBuilder.rootBeanDefinition(FeatureServiceDirectFactory.class);
RootBeanDefinition factoryBean = (RootBeanDefinition) factoryBuilder.getBeanDefinition();
parserContext.getRegistry().registerBeanDefinition(FlipSpringAspect.FEATURE_SERVICE_FACTORY_BEAN_NAME, factoryBean);
MutablePropertyValues factoryPropertyValues = new MutablePropertyValues();
factoryBean.setPropertyValues(factoryPropertyValues);
String environmentBean = element.getAttribute("environment");
if (environmentBean != null && !environmentBean.isEmpty()) {
factoryPropertyValues.addPropertyValue("environment", new RuntimeBeanNameReference(environmentBean));
}