一个用于练手Spring boot 的demo.
- 生成json数据,增加Result结果封装
- 分别使用了Hibernate,mybatis。数据库mysql
- 全局拦截,过滤
- redis 缓存
- 使用freemaker编写网页
- 尝试写了table.js,根据json返回数据自动生成bootStrap样式表格 根据返回数据自动填充div。
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){returntimeFormat(time);}}],result.data,"table-bordered");<!--自动拼接数据--><huang:customid="articleCustom" style='display:none'><divclass='col-md-12 articleItem'><div><imgsrc=$icon$width='50px' height='50px'/></div><divclass='col-md-10'><p>$title$</p><p><small>$content$</small></p><divclass='col-md-11'><div><imgsrc=$user.icon$class='img-circle' width='25px' height='25px'/></div><small>$user.nickName$</small></div><p><small>$createTime$</small><p><hr/></div></span></div></huang:custom>fillHtmlElement2($("#articleDiv"),$("#articleCustom"),article,[{key:"createTime",format:function(time){returntimeFormat(time);}}]);- 自动填充数据Div不够完善.
- 自动生成表格可选项较少。