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

com.naah69.core.config.RedisInitializerPostProcessor Maven / Gradle / Ivy

The newest version!
package com.naah69.core.config;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.core.Ordered;
import org.springframework.core.PriorityOrdered;

/**
 * redis初始化后置处理器
 *
 * @author xsx
 * @since 1.8
 */
public class RedisInitializerPostProcessor implements PriorityOrdered, BeanDefinitionRegistryPostProcessor {

    @Override
    public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
        registry.registerBeanDefinition(RedisAutoConfiguration.class.getName(), new RootBeanDefinition(RedisAutoConfiguration.class));
    }

    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {

    }

    @Override
    public int getOrder() {
        return Ordered.HIGHEST_PRECEDENCE;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy