Browse Source

修改分页插件依赖,由于依赖的问题分页插件依赖失效

5 years ago
parent
commit
9f4c3f1b53

+ 0 - 1
.idea/yunsu.iml

@@ -30,7 +30,6 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: net.lingala.zip4j:zip4j:1.3.2" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.1.6.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.6.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.6.RELEASE" level="project" />

+ 14 - 2
cloud-model/pom.xml

@@ -29,10 +29,22 @@
             <scope>test</scope>
         </dependency>
 
+        <!-- pagehelper整合mybatis-plus-->
+        <!--Pagehelper 依赖 5.1.10 版本,需要去掉 mybatis 依赖,否则会和 mybatis plus 冲突-->
         <dependency>
             <groupId>com.github.pagehelper</groupId>
-            <artifactId>pagehelper</artifactId>
-            <version>4.1.0</version>  <!--我这里用的是4.1.0版本-->
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.2.12</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mybatis</groupId>
+                    <artifactId>mybatis</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.mybatis</groupId>
+                    <artifactId>mybatis-spring</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <!-- mybatis-plus依赖 -->

+ 0 - 12
cloud-model/src/main/java/com/hssx/cloudmodel/CloudModelApplication.java

@@ -16,16 +16,4 @@ public class CloudModelApplication {
         SpringApplication.run(CloudModelApplication.class, args);
     }
 
-    @Bean
-    public PageHelper pageHelper(){
-        PageHelper pageHelper = new PageHelper();
-        Properties properties = new Properties();
-        properties.setProperty("offsetAsPageNum","true");
-        properties.setProperty("rowBoundsWithCount","true");
-        properties.setProperty("reasonable","true");
-        properties.setProperty("dialect","mysql");    //配置mysql数据库的方言
-        pageHelper.setProperties(properties);
-        return pageHelper;
-    }
-
 }