Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Spring Boot 示例

NotificationsYou must be signed in to change notification settings

huangyanbin/SpringBootDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


一个用于练手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不够完善.
  • 自动生成表格可选项较少。

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp