/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved.
 * <a>http://www.crunii.com</a>
 */
package com.crunii.micro.ds.config;

import com.crunii.micro.ds.single.druid.filter.ExecSqlFilter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <pre>只有使用druid数据源的时候才有用，jta无效</pre>
 *
 * @author 田平 create 2021/4/2 16:09
 */
@Configuration
@ConditionalOnProperty(value = "spring.enableSqlLog", havingValue = "true")
public class SqlLogConfiguration {

	@Bean(name = "execSqlFilter")
	public ExecSqlFilter regExecSqlFilter() {
		return new ExecSqlFilter();
	}

}
