!7 pagehelper多数据源自动识别对应方言的分页
Merge pull request !7 from 秦白起/Pull-Request
This commit is contained in:
commit
8655030c7b
@ -4,6 +4,8 @@ import com.github.pagehelper.PageInterceptor;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pagehelper分页,兼用老项目
|
* Pagehelper分页,兼用老项目
|
||||||
*
|
*
|
||||||
@ -14,6 +16,11 @@ public class PagehelperConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public PageInterceptor pageInterceptor(){
|
public PageInterceptor pageInterceptor(){
|
||||||
PageInterceptor pageInterceptor = new PageInterceptor();
|
PageInterceptor pageInterceptor = new PageInterceptor();
|
||||||
|
Properties properties = new Properties();
|
||||||
|
properties.setProperty("supportMethodsArguments","true");
|
||||||
|
properties.setProperty("autoRuntimeDialect","true");
|
||||||
|
pageInterceptor.setProperties(properties);
|
||||||
|
|
||||||
return pageInterceptor;
|
return pageInterceptor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user