Skip to content

Commit 664e5b0

Browse files
author
xqs
committed
添加pagehelper
1 parent 438f734 commit 664e5b0

File tree

6 files changed

+137
-69
lines changed

6 files changed

+137
-69
lines changed

.classpath

Lines changed: 63 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,63 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<classpath>
3-
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
4-
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
5-
<classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
6-
<classpathentry kind="output" path="target/classes"/>
7-
<classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" sourcepath="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0-sources.jar"/>
8-
<classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4.1/mail-1.4.1.jar" sourcepath="M2_REPO/javax/mail/mail/1.4.1/mail-1.4.1-sources.jar"/>
9-
<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
10-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
11-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-webapp/9.2.14.v20151106/jetty-webapp-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-webapp/9.2.14.v20151106/jetty-webapp-9.2.14.v20151106-sources.jar"/>
12-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-xml/9.2.14.v20151106/jetty-xml-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-xml/9.2.14.v20151106/jetty-xml-9.2.14.v20151106-sources.jar"/>
13-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-util/9.2.14.v20151106/jetty-util-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-util/9.2.14.v20151106/jetty-util-9.2.14.v20151106-sources.jar"/>
14-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-servlet/9.2.14.v20151106/jetty-servlet-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-servlet/9.2.14.v20151106/jetty-servlet-9.2.14.v20151106-sources.jar"/>
15-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-security/9.2.14.v20151106/jetty-security-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-security/9.2.14.v20151106/jetty-security-9.2.14.v20151106-sources.jar"/>
16-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-server/9.2.14.v20151106/jetty-server-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-server/9.2.14.v20151106/jetty-server-9.2.14.v20151106-sources.jar"/>
17-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-http/9.2.14.v20151106/jetty-http-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-http/9.2.14.v20151106/jetty-http-9.2.14.v20151106-sources.jar"/>
18-
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-io/9.2.14.v20151106/jetty-io-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-io/9.2.14.v20151106/jetty-io-9.2.14.v20151106-sources.jar"/>
19-
<classpathentry kind="var" path="M2_REPO/com/google/guava/guava/19.0/guava-19.0.jar" sourcepath="M2_REPO/com/google/guava/guava/19.0/guava-19.0-sources.jar"/>
20-
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1-sources.jar"/>
21-
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3-sources.jar"/>
22-
<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2-sources.jar"/>
23-
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9-sources.jar"/>
24-
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1-sources.jar"/>
25-
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7-sources.jar"/>
26-
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7-sources.jar"/>
27-
<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17.jar" sourcepath="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17-sources.jar"/>
28-
<classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
29-
<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
30-
<classpathentry kind="var" path="M2_REPO/jfree/jfreechart/1.0.13/jfreechart-1.0.13.jar" sourcepath="M2_REPO/jfree/jfreechart/1.0.13/jfreechart-1.0.13-sources.jar"/>
31-
<classpathentry kind="var" path="M2_REPO/jfree/jcommon/1.0.16/jcommon-1.0.16.jar" sourcepath="M2_REPO/jfree/jcommon/1.0.16/jcommon-1.0.16-sources.jar"/>
32-
<classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30.jar" sourcepath="M2_REPO/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30-sources.jar"/>
33-
<classpathentry kind="var" path="M2_REPO/org/mybatis/mybatis/3.3.0/mybatis-3.3.0.jar" sourcepath="M2_REPO/org/mybatis/mybatis/3.3.0/mybatis-3.3.0-sources.jar"/>
34-
<classpathentry kind="var" path="M2_REPO/org/ehcache/ehcache/3.0.0.m3/ehcache-3.0.0.m3.jar" sourcepath="M2_REPO/org/ehcache/ehcache/3.0.0.m3/ehcache-3.0.0.m3-sources.jar"/>
35-
<classpathentry kind="var" path="M2_REPO/org/terracotta/offheap-store/2.1.0/offheap-store-2.1.0.jar" sourcepath="M2_REPO/org/terracotta/offheap-store/2.1.0/offheap-store-2.1.0-sources.jar"/>
36-
<classpathentry kind="var" path="M2_REPO/com/alibaba/fastjson/1.2.7/fastjson-1.2.7.jar" sourcepath="M2_REPO/com/alibaba/fastjson/1.2.7/fastjson-1.2.7-sources.jar"/>
37-
<classpathentry kind="var" path="M2_REPO/com/alibaba/druid/1.0.16/druid-1.0.16.jar" sourcepath="M2_REPO/com/alibaba/druid/1.0.16/druid-1.0.16-sources.jar"/>
38-
<classpathentry kind="lib" path="D:/GREEN/jdk1.8.0_11/lib/jconsole.jar"/>
39-
<classpathentry kind="lib" path="D:/GREEN/jdk1.8.0_11/lib/tools.jar"/>
40-
</classpath>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="src" output="target/classes" path="src/main/java">
10+
<attributes>
11+
<attribute name="optional" value="true"/>
12+
<attribute name="maven.pomderived" value="true"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
16+
<attributes>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" sourcepath="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0-sources.jar"/>
21+
<classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4.1/mail-1.4.1.jar" sourcepath="M2_REPO/javax/mail/mail/1.4.1/mail-1.4.1-sources.jar"/>
22+
<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
23+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
24+
<attributes>
25+
<attribute name="maven.pomderived" value="true"/>
26+
</attributes>
27+
</classpathentry>
28+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-webapp/9.2.14.v20151106/jetty-webapp-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-webapp/9.2.14.v20151106/jetty-webapp-9.2.14.v20151106-sources.jar"/>
29+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-xml/9.2.14.v20151106/jetty-xml-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-xml/9.2.14.v20151106/jetty-xml-9.2.14.v20151106-sources.jar"/>
30+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-util/9.2.14.v20151106/jetty-util-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-util/9.2.14.v20151106/jetty-util-9.2.14.v20151106-sources.jar"/>
31+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-servlet/9.2.14.v20151106/jetty-servlet-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-servlet/9.2.14.v20151106/jetty-servlet-9.2.14.v20151106-sources.jar"/>
32+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-security/9.2.14.v20151106/jetty-security-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-security/9.2.14.v20151106/jetty-security-9.2.14.v20151106-sources.jar"/>
33+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-server/9.2.14.v20151106/jetty-server-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-server/9.2.14.v20151106/jetty-server-9.2.14.v20151106-sources.jar"/>
34+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-http/9.2.14.v20151106/jetty-http-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-http/9.2.14.v20151106/jetty-http-9.2.14.v20151106-sources.jar"/>
35+
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-io/9.2.14.v20151106/jetty-io-9.2.14.v20151106.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-io/9.2.14.v20151106/jetty-io-9.2.14.v20151106-sources.jar"/>
36+
<classpathentry kind="var" path="M2_REPO/com/google/guava/guava/19.0/guava-19.0.jar" sourcepath="M2_REPO/com/google/guava/guava/19.0/guava-19.0-sources.jar"/>
37+
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1-sources.jar"/>
38+
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3-sources.jar"/>
39+
<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2-sources.jar"/>
40+
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9-sources.jar"/>
41+
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1-sources.jar"/>
42+
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7-sources.jar"/>
43+
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7-sources.jar"/>
44+
<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17.jar" sourcepath="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17-sources.jar"/>
45+
<classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
46+
<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
47+
<classpathentry kind="var" path="M2_REPO/jfree/jfreechart/1.0.13/jfreechart-1.0.13.jar" sourcepath="M2_REPO/jfree/jfreechart/1.0.13/jfreechart-1.0.13-sources.jar"/>
48+
<classpathentry kind="var" path="M2_REPO/jfree/jcommon/1.0.16/jcommon-1.0.16.jar" sourcepath="M2_REPO/jfree/jcommon/1.0.16/jcommon-1.0.16-sources.jar"/>
49+
<classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30.jar" sourcepath="M2_REPO/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30-sources.jar"/>
50+
<classpathentry kind="var" path="M2_REPO/org/mybatis/mybatis/3.3.0/mybatis-3.3.0.jar" sourcepath="M2_REPO/org/mybatis/mybatis/3.3.0/mybatis-3.3.0-sources.jar"/>
51+
<classpathentry kind="var" path="M2_REPO/org/ehcache/ehcache/3.0.0.m3/ehcache-3.0.0.m3.jar" sourcepath="M2_REPO/org/ehcache/ehcache/3.0.0.m3/ehcache-3.0.0.m3-sources.jar"/>
52+
<classpathentry kind="var" path="M2_REPO/org/terracotta/offheap-store/2.1.0/offheap-store-2.1.0.jar" sourcepath="M2_REPO/org/terracotta/offheap-store/2.1.0/offheap-store-2.1.0-sources.jar"/>
53+
<classpathentry kind="var" path="M2_REPO/com/alibaba/fastjson/1.2.7/fastjson-1.2.7.jar" sourcepath="M2_REPO/com/alibaba/fastjson/1.2.7/fastjson-1.2.7-sources.jar"/>
54+
<classpathentry kind="var" path="M2_REPO/com/alibaba/druid/1.0.16/druid-1.0.16.jar" sourcepath="M2_REPO/com/alibaba/druid/1.0.16/druid-1.0.16-sources.jar"/>
55+
<classpathentry kind="lib" path="D:/GREEN/jdk1.8.0_11/lib/jconsole.jar"/>
56+
<classpathentry kind="lib" path="D:/GREEN/jdk1.8.0_11/lib/tools.jar"/>
57+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
58+
<attributes>
59+
<attribute name="maven.pomderived" value="true"/>
60+
</attributes>
61+
</classpathentry>
62+
<classpathentry kind="output" path="target/classes"/>
63+
</classpath>

.project

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>devillived</name>
4-
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
5-
<projects/>
6-
<buildSpec>
7-
<buildCommand>
8-
<name>org.eclipse.jdt.core.javabuilder</name>
9-
</buildCommand>
10-
</buildSpec>
11-
<natures>
12-
<nature>org.eclipse.jdt.core.javanature</nature>
13-
</natures>
14-
</projectDescription>
3+
<name>devillived</name>
4+
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
21+
<nature>org.eclipse.jdt.core.javanature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#Thu Mar 24 16:05:00 CST 2016
2-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
3-
eclipse.preferences.version=1
4-
org.eclipse.jdt.core.compiler.source=1.7
5-
org.eclipse.jdt.core.compiler.compliance=1.7
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
3+
org.eclipse.jdt.core.compiler.compliance=1.7
4+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5+
org.eclipse.jdt.core.compiler.source=1.7

pom.xml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@
5858
</build>
5959
<dependencies>
6060
<!-- https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-webapp -->
61-
<dependency>
62-
<groupId>org.eclipse.jetty</groupId>
63-
<artifactId>jetty-webapp</artifactId>
64-
<version>9.2.14.v20151106</version>
65-
</dependency>
66-
61+
<dependency>
62+
<groupId>com.github.pagehelper</groupId>
63+
<artifactId>pagehelper</artifactId>
64+
<version>4.1.6</version>
65+
</dependency>
6766
<dependency>
6867
<groupId>com.google.guava</groupId>
6968
<artifactId>guava</artifactId>
@@ -145,9 +144,17 @@
145144
<!-- <version>1.0.0.Beta6</version> -->
146145
<!-- </dependency> -->
147146
</dependencies>
147+
<mirrors>
148+
<mirror>
149+
<id>alimaven</id>
150+
<name>aliyun maven</name>
151+
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
152+
<mirrorOf>*</mirrorOf>
153+
</mirror>
154+
</mirrors>
148155
<repositories>
149156
<repository>
150-
<id>oschina-repos</id>
157+
<id>ali-repos</id>
151158
<name>Oschina Releases</name>
152159
<url>http://maven.oschina.net/content/groups/public</url>
153160
</repository>

src/main/resources/log4j.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@
7474
</appender>
7575

7676
<!-- add begin -->
77-
<!-- <logger name="com.vidmt" additivity="false"> -->
78-
<!-- <level value="DEBUG" /> -->
79-
<!-- <appender-ref ref="STDOUT" /> -->
80-
<!-- <appender-ref ref="all-out" /> -->
81-
<!-- </logger> -->
77+
<logger name="com.devil" additivity="false">
78+
<level value="DEBUG" />
79+
<appender-ref ref="STDOUT" />
80+
<appender-ref ref="all-out" />
81+
</logger>
8282
<!-- add end -->
8383

8484

src/main/resources/mybatis-config.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,35 @@
4141
<typeAliases>
4242
<package name="com.vidmt" />
4343
</typeAliases>
44+
<plugins>
45+
<plugin interceptor="com.github.pagehelper.PageHelper">
46+
<!-- 4.0.0以后版本可以不设置该参数 -->
47+
<property name="dialect" value="mysql"/>
48+
<!-- 该参数默认为false -->
49+
<!-- 设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用 -->
50+
<!-- 和startPage中的pageNum效果一样-->
51+
<property name="offsetAsPageNum" value="true"/>
52+
<!-- 该参数默认为false -->
53+
<!-- 设置为true时,使用RowBounds分页会进行count查询 -->
54+
<property name="rowBoundsWithCount" value="true"/>
55+
<!-- 设置为true时,如果pageSize=0或者RowBounds.limit = 0就会查询出全部的结果 -->
56+
<!-- (相当于没有执行分页查询,但是返回结果仍然是Page类型)-->
57+
<property name="pageSizeZero" value="true"/>
58+
<!-- 3.3.0版本可用 - 分页参数合理化,默认false禁用 -->
59+
<!-- 启用合理化时,如果pageNum<1会查询第一页,如果pageNum>pages会查询最后一页 -->
60+
<!-- 禁用合理化时,如果pageNum<1或pageNum>pages会返回空数据 -->
61+
<property name="reasonable" value="false"/>
62+
<!-- 3.5.0版本可用 - 为了支持startPage(Object params)方法 -->
63+
<!-- 增加了一个`params`参数来配置参数映射,用于从Map或ServletRequest中取值 -->
64+
<!-- 可以配置pageNum,pageSize,count,pageSizeZero,reasonable,orderBy,不配置映射的用默认值 -->
65+
<!-- 不理解该含义的前提下,不要随便复制该配置 -->
66+
<property name="params" value="pageNum=pageHelperStart;pageSize=pageHelperRows;"/>
67+
<!-- 支持通过Mapper接口参数来传递分页参数 -->
68+
<property name="supportMethodsArguments" value="false"/>
69+
<!-- always总是返回PageInfo类型,check检查返回类型是否为PageInfo,none返回Page -->
70+
<property name="returnPageInfo" value="none"/>
71+
</plugin>
72+
</plugins>
4473
<environments default="development">
4574
<environment id="development">
4675
<transactionManager type="JDBC" />

0 commit comments

Comments
 (0)