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

com.github.wangchenning.autoConfig.DateSourceAutoConfig Maven / Gradle / Ivy

package com.github.wangchenning.autoConfig;

import com.github.wangchenning.datasource.aop.DynamicDataSourceAnnotationAdvisor;
import com.github.wangchenning.datasource.aop.DynamicDataSourceAnnotationInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty("spring.datasource.master.url")
//@AutoConfigureAfter(DataSourceAutoConfiguration.class)
//@Import(DynamicDataSourceRegister.class)
public class DateSourceAutoConfig {
    @Bean
    public DynamicDataSourceAnnotationAdvisor dynamicDatasourceAnnotationAdvisor() {
        return new DynamicDataSourceAnnotationAdvisor(new DynamicDataSourceAnnotationInterceptor());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy