使用的是postgresql需要改变一下和MybatisPlus整合的数据库类型:
/ * 分页插件,自动识别数据库类型
*/
@Bean
public MybatisPlusInterceptor paginationInterceptor() {
MybatisPlusInterceptor mpInterceptor = new MybatisPlusInterceptor();
mpInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.POSTGRE_SQL));
boolean enableTenant = tenantProperties.getEnable();
//是否开启多租户隔离
if (enableTenant) {
CustomTenantInterceptor tenantInterceptor = new CustomTenantInterceptor(
tenantLineHandler, tenantProperties.getIgnoreSqls());
mpInterceptor.addInnerInterceptor(tenantInterceptor);
}
return mpInterceptor;
}
修改为 DbType.POSTGRE_SQL。