spring boot+mybatis+PageHelper 不分页问题

import java.util.Properties;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;


import com.github.pagehelper.PageHelper;
@SpringBootApplication
public class Application {

    @Bean  
    public PageHelper pageHelper() {  
        PageHelper pageHelper = new PageHelper();  
        Properties p = new Properties();  
        p.setProperty("offsetAsPageNum", "true");  
        p.setProperty("rowBoundsWithCount", "true");  
        p.setProperty("reasonable", "true");  
        p.setProperty("returnPageInfo", "check");  
        p.setProperty("params", "count=countSql");  
        pageHelper.setProperties(p);  
        return pageHelper;  
    } 


    public static void main(String[] args){
         SpringApplication.run(Application.class,args);
     }
}

你可能感兴趣的:(spring,boot)