You've already forked FrameTour-BE
Init
This commit is contained in:
26
src/main/java/com/ycwl/basic/config/PageHelperConfig.java
Normal file
26
src/main/java/com/ycwl/basic/config/PageHelperConfig.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.ycwl.basic.config;
|
||||
|
||||
import com.github.pagehelper.PageInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* @date 2022年05月18日 15:43
|
||||
* PageHelper配置类
|
||||
*/
|
||||
@Configuration
|
||||
public class PageHelperConfig {
|
||||
|
||||
@Bean(name = "pageHelper")
|
||||
public PageInterceptor pageHelper() {
|
||||
PageInterceptor pageHelper = new PageInterceptor();
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("reasonable", "false");
|
||||
// 配置数据库的方言
|
||||
properties.setProperty("helperDialect", "mysql");
|
||||
pageHelper.setProperties(properties);
|
||||
return pageHelper;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user