分页配置

master
shijie 5 years ago
parent 033b5dabba
commit c2536a297d
  1. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/DqFinancialCrmsApplication.java
  2. 13
      dq-financial-crms/src/main/java/com/daqing/financial/crms/config/IPageConfig.java
  3. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/DqFinancialHrmsApplication.java
  4. 20
      dq-framework-common/src/main/java/com/daqing/framework/config/MybatisPlusConfig.java

@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan;
@EnableFeignClients(basePackages = "com.daqing.financial.crms.feign")
@EnableDiscoveryClient
@SpringBootApplication
@ComponentScan(basePackages = "com.daqing.financial")
@ComponentScan(basePackages = "com.daqing")
public class DqFinancialCrmsApplication {
public static void main(String[] args) {

@ -0,0 +1,13 @@
package com.daqing.financial.crms.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class IPageConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}

@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan;
@EnableFeignClients(basePackages = "com.daqing.financial.hrms.feign")
@EnableDiscoveryClient
@SpringBootApplication
@ComponentScan(basePackages = "com.daqing.financial")
@ComponentScan(basePackages = "com.daqing")
public class DqFinancialHrmsApplication {
public static void main(String[] args) {

@ -1,20 +0,0 @@
package com.daqing.framework.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Author: gongsj.
* @Description: 分页拦截器注入到spring中
* @Date:Created in 2020/09/09 11:33.
* @Modified By:
*/
@Configuration
public class MybatisPlusConfig {
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor page = new PaginationInterceptor();
page.setDialectType("mysql");
return page;
}
}
Loading…
Cancel
Save