|
@@ -17,6 +17,7 @@ import org.apache.ibatis.mapping.MappedStatement;
|
|
|
import org.apache.ibatis.reflection.MetaObject;
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
@@ -35,6 +36,9 @@ public class MybatisConfig {
|
|
|
@Autowired
|
|
|
private RedisService redisService;
|
|
|
|
|
|
+ @Value("${page.size:#{null}}")
|
|
|
+ private Long pageSize;
|
|
|
+
|
|
|
/**
|
|
|
* 自定义查询sql多数据库适配
|
|
|
* @return
|
|
@@ -102,7 +106,7 @@ public class MybatisConfig {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
- paginationInterceptor.setLimit(2000);
|
|
|
+ paginationInterceptor.setLimit(pageSize == null ? 10000 :pageSize);
|
|
|
return paginationInterceptor;
|
|
|
}
|
|
|
|