Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dreampie/jfinal-tablebind

jfinal table bind plugin
https://github.com/dreampie/jfinal-tablebind

Last synced: 2 months ago
JSON representation

jfinal table bind plugin

Awesome Lists containing this project

README

        

jfinal-tablebind
============

jfinal tablebind plugin,查看其他插件-> [Maven](http://search.maven.org/#search%7Cga%7C1%7Ccn.dreampie)

maven 引用 ${jfinal-tablebind.version}替换为相应的版本如:0.1

```xml

cn.dreampie
jfinal-tablebind
${jfinal-tablebind.version}

```

使用非常简单的,自动注册所有Model的Table绑定工具

```java

/**
* 配置扫描model
*/
//Model自动绑定表插件
TableBindPlugin tableBindDefault = new TableBindPlugin(druidDefault, SimpleNameStyles.LOWER);
tableBindDefault.setContainerFactory(new CaseInsensitiveContainerFactory(true)); //忽略字段大小写
排除或者引入包
//tableBindDefault.addExcludePaths("cn.dreampie.function.shop");
//tableBindDefault.addIncludePaths("cn.dreampie.function.default");
tableBindDefault.setShowSql(getPropertyToBoolean("devMode", false));
//非mysql的数据库方言
//tableBindDefault.setDialect(new AnsiSqlDialect());
plugins.add(tableBindDefault);

//Model里必须加上 表名注解
@TableBind(tableName = "com_area")
```