|
@@ -23,10 +23,12 @@ import javax.validation.constraints.NotNull;
|
|
|
public class MybatisPlusAutoConfiguration {
|
|
|
|
|
|
@Bean
|
|
|
- public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
|
+ public MybatisPlusInterceptor mybatisPlusInterceptor(@NotNull MybatisProperties mybatisProperties) {
|
|
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
|
|
- interceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
|
|
|
+ if (mybatisProperties.isBlockAttack()) {
|
|
|
+ interceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
|
|
|
+ }
|
|
|
return interceptor;
|
|
|
}
|
|
|
|