Spring+mybatis+maven Integrated Tkmapper (Universal Mapper) +pagehelper

Source: Internet
Author: User

<!--maven Tkmapper Introduction -<Dependency>    <groupId>Tk.mybatis</groupId>    <Artifactid>Mapper</Artifactid>    <version>3.3.8</version>    <Exclusions>        <exclusion>            <groupId>Javax.persistence</groupId>            <Artifactid>Persistence-api</Artifactid>        </exclusion>    </Exclusions></Dependency><!--pagehelper maven Introduction -<Dependency>    <groupId>Com.github.pagehelper</groupId>    <Artifactid>Pagehelper</Artifactid>    <version>4.0.0</version></Dependency>              
<!--Spring XML Bean Configuration -<Beanclass= "Tk.mybatis.spring.mapper.MapperScannerConfigurer">    < Propertyname= "Basepackage"value= "Com.xxx.xxx,com.xxx.yyyy" />    < Propertyname= "Properties">        <value>Mappers=tk.mybatis.mapper.common.mapper</value>    </ Property>    < Propertyname= "Sqlsessionfactorybeanname"value= "Sqlsessionfactory"></ Property></Bean>
<!--mybatis config configuration -<?XML version= "1.0" encoding= "UTF-8"?><!DOCTYPE Configuration Public "-//mybatis.org//dtd Config 3.0//en" "Http://mybatis.org/dtd/mybatis-3-config.dtd" ><Configuration>    <Plugins>          <!--Com.github.pagehelper is the package name of the Pagehelper class -          <pluginInterceptor= "Com.github.pagehelper.PageHelper">              <!--4.0.0 later versions can not set this parameter -              < Propertyname= "dialect"value= "MySQL"/>              <!--this parameter defaults to False -              <!--when set to True, the Rowbounds first parameter offset is used as the Pagenum page number -              <!--same as the pagenum effect in StartPage. -              < Propertyname= "Offsetaspagenum"value= "true"/>              <!--this parameter defaults to False -              <!--when set to true, use Rowbounds to page count queries -              < Propertyname= "Rowboundswithcount"value= "true"/>              <!--when set to True, all results are queried if pagesize=0 or rowbounds.limit = 0 -              <!--(equivalent to not performing a paged query, but the returned result is still the page type) -              < Propertyname= "Pagesizezero"value= "true"/>              <!--3.3.0 version available-paging parameter rationalization, default false disabled -              <!--when rationalized is enabled, if pagenum<1 queries the first page, Pagenum>pages will query the last page -              <!--when rationalized is disabled, if pagenum<1 or pagenum>pages returns empty data -              < Propertyname= "reasonable"value= "true"/>              <!--3.5. Version 0 available-in order to support the StartPage (Object params) method -              <!--added a ' params ' parameter to configure parameter mapping to take values from map or ServletRequest -              <!--Pagenum,pagesize,count,pagesizezero,reasonable,orderby can be configured, not configured with default values for mappings -              <!--Do not understand the meaning of the premise, do not randomly copy the configuration -              < Propertyname= "params"value= "Pagenum=start;pagesize=limit;"/>              <!--support for passing paging parameters via mapper interface Parameters -              < Propertyname= "Supportmethodsarguments"value= "true"/>              <!--always returns the PageInfo type, check checks to see if the return type is Pageinfo,none return page -              < Propertyname= "Returnpageinfo"value= "Check"/>          </plugin>      </Plugins> </Configuration>

Spring+mybatis+maven Integrated Tkmapper (Universal Mapper) +pagehelper

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.