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

com.github.liuyehcf.framework.rpc.maple.spring.MapleAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.github.liuyehcf.framework.rpc.maple.spring;

import com.github.liuyehcf.framework.rpc.maple.register.ConfigClient;
import com.github.liuyehcf.framework.rpc.maple.register.ZookeeperConfigClient;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author hechenfeng
 * @date 2019/3/22
 */
@Configuration
public class MapleAutoConfiguration {

    @Bean(name = SpringConst.CONFIG_CLIENT_BEAN_NAME)
    @ConfigurationProperties(prefix = "maple.register.zookeeper")
    public ConfigClient configClient() {
        return new ZookeeperConfigClient();
    }

    @Bean
    public BeanFactoryPostProcessor providerProcessor() {
        return new MapleProviderSpringPostProcessor();
    }

    @Bean
    public BeanFactoryPostProcessor consumerProcessor() {
        return new MapleConsumerSpringPostProcessor();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy