Search in sources :

Example 1 with SqlExplainInterceptor

use of com.baomidou.mybatisplus.extension.plugins.SqlExplainInterceptor in project tutorials-java by Artister.

the class MybatisPlusConfig method sqlExplainInterceptor.

@Bean
public SqlExplainInterceptor sqlExplainInterceptor() {
    SqlExplainInterceptor sqlExplainInterceptor = new SqlExplainInterceptor();
    List<ISqlParser> sqlParserList = new ArrayList<>();
    sqlParserList.add(new BlockAttackSqlParser());
    sqlExplainInterceptor.setSqlParserList(sqlParserList);
    return sqlExplainInterceptor;
}
Also used : ISqlParser(com.baomidou.mybatisplus.core.parser.ISqlParser) ArrayList(java.util.ArrayList) BlockAttackSqlParser(com.baomidou.mybatisplus.extension.parsers.BlockAttackSqlParser) SqlExplainInterceptor(com.baomidou.mybatisplus.extension.plugins.SqlExplainInterceptor) Bean(org.springframework.context.annotation.Bean)

Aggregations

ISqlParser (com.baomidou.mybatisplus.core.parser.ISqlParser)1 BlockAttackSqlParser (com.baomidou.mybatisplus.extension.parsers.BlockAttackSqlParser)1 SqlExplainInterceptor (com.baomidou.mybatisplus.extension.plugins.SqlExplainInterceptor)1 ArrayList (java.util.ArrayList)1 Bean (org.springframework.context.annotation.Bean)1