Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dreampie/jfinal-tablebind
- Owner: Dreampie
- Created: 2014-09-10T07:00:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-05T06:57:52.000Z (about 10 years ago)
- Last Synced: 2023-08-01T18:14:17.245Z (over 1 year ago)
- Language: Java
- Size: 135 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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")
```