diff --git a/afis-recall-web/pom.xml b/afis-recall-web/pom.xml index 83a26cc..336f336 100644 --- a/afis-recall-web/pom.xml +++ b/afis-recall-web/pom.xml @@ -82,10 +82,6 @@ org.springframework.boot spring-boot-starter-actuator - - org.springframework.boot - spring-boot-starter-data-mongodb-reactive - org.springframework.boot spring-boot-starter-web @@ -110,12 +106,6 @@ fastjson 2.0.17 - - com.wabestway.recall - afis-recall-api - 1.0-SNAPSHOT - compile - diff --git a/afis-recall-web/src/main/java/com/wabestway/recall/config/MybatisPlusConfig.java b/afis-recall-web/src/main/java/com/wabestway/recall/config/MybatisPlusConfig.java new file mode 100644 index 0000000..d2b2707 --- /dev/null +++ b/afis-recall-web/src/main/java/com/wabestway/recall/config/MybatisPlusConfig.java @@ -0,0 +1,27 @@ +package com.wabestway.recall.config; + +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.sql.DataSource; + +/** + * Created by king on 2021/5/9. + */ +@Configuration +@ConditionalOnClass(value = {PaginationInterceptor.class}) +public class MybatisPlusConfig { + + @Autowired + private DataSource dataSource; + + @Bean + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + return paginationInterceptor; + } + +}