1.基于mybatis使用插件,需要实现org.apache.ibatis.plugin.Interceptor接口;
public class PageHelper extends BasePageHelper implements Interceptor;
2.实现拦截器接口完成后需要在mybatis配置文件中配置自定义插件
<plugins>
<plugin interceptor=""xx.myPlugin">
<property name="pageSizeZero" value="true" />
</plugin>
</plugins>
public class PageHelper extends BasePageHelper implements Interceptor;
2.实现拦截器接口完成后需要在mybatis配置文件中配置自定义插件
<plugins>
<plugin interceptor=""xx.myPlugin">
<property name="pageSizeZero" value="true" />
</plugin>
</plugins>