|
@@ -1,5 +1,6 @@
|
|
|
package com.baomidou.mybatisplus.extension.plugins;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.annotation.DbType;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
|
|
import org.junit.jupiter.api.Test;
|
|
@@ -20,6 +21,7 @@ class MybatisPlusInterceptorTest {
|
|
|
Properties properties = new Properties();
|
|
|
properties.setProperty("@page", "com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor");
|
|
|
properties.setProperty("page:maxLimit", "10");
|
|
|
+ properties.setProperty("page:dbType", "h2");
|
|
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
|
interceptor.setProperties(properties);
|
|
|
List<InnerInterceptor> interceptors = interceptor.getInterceptors();
|
|
@@ -32,5 +34,6 @@ class MybatisPlusInterceptorTest {
|
|
|
|
|
|
PaginationInnerInterceptor pii = (PaginationInnerInterceptor) page;
|
|
|
assertThat(pii.getMaxLimit()).isEqualTo(10);
|
|
|
+ assertThat(pii.getDbType()).isEqualTo(DbType.H2);
|
|
|
}
|
|
|
}
|