Skip to content

Pagination_QuickStart_jFinal

fangjinuo edited this page Jul 2, 2019 · 3 revisions

Use it in jFianl application

Installation

just import depenedcies:

<dependency>
    <groupId>com.github.fangjinuo.sqlhelper</groupId>
    <artifactId>sqlhelper-jfinal</artifactId>
    <version>${sqlhelper.version}</version>
</dependency>

How To

public class DemoConfig extends JFinalConfig {
  public void configPlugin(Plugins me) {
    ActiveRecordPlugin arp = new ActiveRecordPlugin(…);
    me.add(arp);
    // 配置 MySQL
    arp.setDialect(new JFinalCommonDialect("mysql"));
    // 配置 Oracle
    arp.setDialect(new JFinalCommonDialect("oracle")); 
    // 配置 SqlServer
    arp.setDialect(new JFinalCommonDialect("sqlserver")); 
    // 配置 MariaDB
    arp.setDialect(new JFinalCommonDialect("mariadb")); 
    // 配置 达梦数据库
    arp.setDialect(new JFinalCommonDialect("dm")); 
    // 配置 申通数据库
    arp.setDialect(new JFinalCommonDialect("oscar")); 
    // 配置 TiDB数据库
    arp.setDialect(new JFinalCommonDialect("tidb")); 
    // 配置 PostgreSQL数据库
    arp.setDialect(new JFinalCommonDialect("postgresql")); 
    ...
    // supports 90+ databases
  }
}