我们按照以下的顺序来依次配置之前的项目,我们采用迭代开发的形式,项目文件和以前相同。
1.pom.xml
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.2</version>
</dependency>
这里我们使用pagehelper来帮助配置page中的相关参数,这里是从github导包的过程。
2.applicationContext.xml
<!-- other configuration -->
<property name="plugins">
<array>
<bean class="com.github.pagehelper.PageInterceptor">
<property name="properties">
<props>
<prop key="helperDialect">mysql</prop>
<prop key="reasonable">true</prop>
</props>
</property>
</bean>
</array>
</property>
这里主要注意到,reasonabl