package cn.axzo.msg.center.message.service.todo.mybatis;

import cn.axzo.msg.center.inside.notices.config.PendingMessageBizConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 由于依赖顺序的问题, 这里需要重新定义一个
 *
 * @author yanglin
 */
@Configuration
public class SqlInterceptorConfig {

    @Bean
    ReplaceInterceptor replaceTableInterceptor() {
        return new ReplaceInterceptor();
    }

    @Bean
    CollectSQLInterceptor sqlCollectInterceptor() {
        return new CollectSQLInterceptor();
    }

    @Bean
    public BeautifulPaginationInterceptor paginationInterceptor2() {
        return new BeautifulPaginationInterceptor();
    }

    @Bean
    LogExecSQLInterceptor logExecSQLInterceptor(PendingMessageBizConfig cfg) {
        return new LogExecSQLInterceptor(cfg);
    }
}
