问题遇到的现象和发生背
在mvc项目中弄分页弄不了,弄了几天了
<plugins>
<plugin interceptor="com.github.pagehelper.PageInterceptor">
<property name="reasonable" value="true"/>
<property name="helperDialect" value="mysql"/>
</plugin>
</plugins>
@Test
public void testPageHelper(){
PageHelper.startPage(1,3);
List<Medicine> medicineList = medicineMapper.findMedicineList();
PageInfo<Medicine> pageInfo = new PageInfo<>(medicineList);
System.out.println("总页数为"+pageInfo.getPages());
}