!7 pagehelper多数据源自动识别对应方言的分页

Merge pull request !7 from 秦白起/Pull-Request
This commit is contained in:
数据小王子 2024-05-15 09:10:59 +00:00 committed by Gitee
commit 8655030c7b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -4,6 +4,8 @@ import com.github.pagehelper.PageInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Properties;
/**
* Pagehelper分页兼用老项目
*
@ -14,6 +16,11 @@ public class PagehelperConfig {
@Bean
public PageInterceptor pageInterceptor(){
PageInterceptor pageInterceptor = new PageInterceptor();
Properties properties = new Properties();
properties.setProperty("supportMethodsArguments","true");
properties.setProperty("autoRuntimeDialect","true");
pageInterceptor.setProperties(properties);
return pageInterceptor;
}
}