当前位置: 首页 > news >正文

自己如何做简单网站seo一键优化

自己如何做简单网站,seo一键优化,wordpress一键分享,做网站交付标准1 表格行循环 (1)需要渲染的表格的模板 说明:{{goods}} 是个标准的标签,将 {{goods}} 置于循环行的上一行,循环行设置要循环的标签和内容,注意此时的标签应该使用 [] ,以此来区别poi-tl的默认标…

1 表格行循环

(1)需要渲染的表格的模板


说明{{goods}} 是个标准的标签,将 {{goods}} 置于循环行的上一行,循环行设置要循环的标签和内容,注意此时的标签应该使用 [] ,以此来区别poi-tl的默认标签语法。同理,{{labors}} 也置于循环行的上一行。 

 

(2)定义两个实体类 

@Data
public class Goods {private int count;private String name;private String desc;private int discount;private int tax;
}@Data
public class Labors {private String category;private int people;private int price;
}

(3)测试代码

    @Testpublic void autoGenerateTable1() throws Exception {// 数据Goods goods1 = new Goods();Goods goods2 = new Goods();Labors labors1 = new Labors();Labors labors2 = new Labors();goods1.setCount(2);goods1.setName("商品1");goods1.setDiscount(10);goods1.setDesc("商品1描述");goods1.setTax(5);goods2.setCount(4);goods2.setName("商品2");goods2.setDiscount(20);goods2.setDesc("商品2描述");goods2.setTax(10);List<Goods> goodsList = Arrays.asList(goods1, goods2);labors1.setPeople(3);labors1.setCategory("类别1");labors1.setPrice(100);labors2.setPeople(1);labors2.setCategory("类别2");labors2.setPrice(200);List<Labors> laborList = Arrays.asList(labors1, labors2);// 用行循环插件LoopRowTableRenderPolicy renderPolicy = new LoopRowTableRenderPolicy();ConfigureBuilder builder = Configure.builder();Configure configure = builder.bind("goods", renderPolicy).bind("labors", renderPolicy).build();XWPFTemplate template = XWPFTemplate.compile("D:\\Idea-projects\\POI_word\\templates_autoGenerateTable.docx",configure);Map<String, Object> map = new HashMap<>();map.put("goods", goodsList);map.put("labors", laborList);template.render(map);FileOutputStream fileOutputStream = new FileOutputStream("D:\\Idea-projects\\POI_word\\output_autoGenerateTable.docx");template.writeAndClose(fileOutputStream);template.close();}

(4)渲染结果 

 

(5)测试代码详细解释


2 表格列循环

列循环跟行循环没有什么区别,就是将行循环插件换成了列循环插件

(1) 模板


(2)测试代码

    @Testpublic void autoGenerateTable2() throws Exception {// 数据Labors labors1 = new Labors();Labors labors2 = new Labors();labors1.setPeople(3);labors1.setCategory("类别1");labors1.setPrice(100);labors2.setPeople(1);labors2.setCategory("类别2");labors2.setPrice(200);List<Labors> laborList = Arrays.asList(labors1, labors2);// 用列循环插件LoopColumnTableRenderPolicy renderPolicy = new LoopColumnTableRenderPolicy();ConfigureBuilder builder = Configure.builder();Configure configure = builder.bind("labors", renderPolicy).build();XWPFTemplate template = XWPFTemplate.compile("D:\\Idea-projects\\POI_word\\templates_autoGenerateTableCol.docx",configure);Map<String, Object> map = new HashMap<>();map.put("labors", laborList);template.render(map);FileOutputStream fileOutputStream = new FileOutputStream("D:\\Idea-projects\\POI_word\\output_autoGenerateTableCol.docx");template.writeAndClose(fileOutputStream);template.close();}


(3)渲染结果

 

http://www.hkea.cn/news/169668/

相关文章:

  • 怎么做属于自己的域名网站网络策划方案
  • destoon做的网站百度商务合作联系
  • 金山区网站制作网络营销策划书1500字
  • 厦门网站建设制作工具熊猫关键词挖掘工具
  • 徐州网站建设 网站推广百度首页快速排名系统
  • 在线转格式网站怎么做拼多多seo 优化软件
  • 成都理工疫情最新消息贵港seo
  • 网站如何防止攻击怎么自己做一个小程序
  • 企业网站建设英文百度收录
  • wordpress查版本sem和seo的区别
  • 网站设计说明书怎么写网站建设平台官网
  • 有建网站的软件阿里云域名注册万网
  • 站长工具排名分析怎么创建公司网站
  • 网站建设标书四川seo哪里有
  • 接网站开发做多少钱建一个外贸独立站大约多少钱
  • wordpress表单录入seo报告
  • python做网站显示表格星巴克seo网络推广
  • 一个com的网站多少钱管理微信软件
  • 蒙阴网站建设软文代写网
  • 用python做一旅游网站南昌seo计费管理
  • 湖北省建设厅win10优化软件哪个好
  • 湖南企业建站系统平台软文有哪些发布平台
  • 南通 网络 公司网站真正免费建站
  • 做图骂人的图片网站网络服务
  • wordpress主标题副标题seo基础
  • 淮安做网站优化百度竞价排名是什么方式
  • 食品公司网站源码谷歌网页
  • 做网站用哪种代码比较好推广seo发贴软件
  • 3d效果图软件宁波seo行者seo09
  • 美国做按摩广告的网站网站优化教程