admin
2021-06-16 42fa17d6209d10cbe4774388d0ff3fcf3329eb5a
src/main/java/com/yeshi/buwan/util/SpringContext.java
@@ -20,17 +20,14 @@
import com.yeshi.buwan.service.manager.SolrInternetSearchVideoDataManager;
import com.yeshi.buwan.util.mq.CMQManager;
import io.seata.rm.datasource.DataSourceProxy;
import io.seata.spring.annotation.GlobalTransactionScanner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.sql.DataSource;
import java.util.ArrayList;
import java.util.List;
@@ -71,6 +68,11 @@
        }
    }
    @Bean
    public DataSourceProxy dataSourceProxy(DruidDataSource druidDataSource) {
        return new DataSourceProxy(druidDataSource);
    }
    private synchronized void onApplication(ContextRefreshedEvent context) {
        if (!isInited) {