https://github.com/huangyanbin/springbootdemo
Spring Boot 示例
https://github.com/huangyanbin/springbootdemo
bootstrap freemarker hibernate js mybits mysql redis-cache spring-boot
Last synced: 3 months ago
JSON representation
Spring Boot 示例
- Host: GitHub
- URL: https://github.com/huangyanbin/springbootdemo
- Owner: huangyanbin
- Created: 2017-05-18T10:14:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-17T07:41:47.000Z (almost 9 years ago)
- Last Synced: 2025-06-04T20:33:31.751Z (about 1 year ago)
- Topics: bootstrap, freemarker, hibernate, js, mybits, mysql, redis-cache, spring-boot
- Language: Java
- Homepage:
- Size: 280 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot 示例
------
一个用于练手Spring boot 的demo.
> * 生成json数据,增加Result结果封装
> * 分别使用了Hibernate,mybatis。数据库mysql
> * 全局拦截,过滤
> * redis 缓存
> * 使用freemaker编写网页
> * 尝试写了table.js,根据json返回数据自动生成bootStrap样式表格
根据返回数据自动填充div。
------
## 如何自动生成表格
```js
fillTabClass($("#ArtTable"),"文章列表",[
{ name:"ID",
key:"id"
},
{ name:"图标",
key:"icon",
type:"img",
style:"width:40px;height:40px;",class:"img-circle"},
{ name:"主题",
key:"title",
type:"span"
},
{name:"时间",
key:"createTime",
format:function (time) {
return timeFormat(time);
}
}
],result.data,"table-bordered");
```
## 如何自动填充数据
```html
$title$
$content$
$user.nickName$
$createTime$
```
```js
fillHtmlElement2($("#articleDiv"),$("#articleCustom"),article,
[
{ key:"createTime",
format:function(time) {
return timeFormat(time);
}
}
]
);
```
### 待完善
- [ ] 自动填充数据Div不够完善.
- [ ] 自动生成表格可选项较少。