标签:property prope 插件 color spring inter ESS inf set
方法一:在main方法Application中配置
@Bean PageHelper pageHelper(){ //分页插件 PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); properties.setProperty("reasonable", "true"); properties.setProperty("supportMethodsArguments", "true"); properties.setProperty("returnPageInfo", "check"); properties.setProperty("params", "count=countSql"); pageHelper.setProperties(properties); //添加插件 不添加分页无效果 new SqlSessionFactoryBean().setPlugins(new Interceptor[]{pageHelper}); return pageHelper; }
方法二:在application.properties里配置
#pagehelper pagehelper.helper-dialect=mysql pagehelper.reasonable=true pagehelper.support-methods-arguments=true pagehelper.params=count=countSql
--
标签:property prope 插件 color spring inter ESS inf set
原文地址:https://www.cnblogs.com/xc-xinxue/p/12490146.html