This commit is contained in:
2024-11-28 15:10:09 +08:00
commit 901691aaea
90 changed files with 4919 additions and 0 deletions

View 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;
}
}