锋哥原创的Springboot+Layui python222网站实战:
python222网站实战课程视频教程(SpringBoot+Python爬虫实战) ( 火爆连载更新中... )_哔哩哔哩_bilibilipython222网站实战课程视频教程(SpringBoot+Python爬虫实战) ( 火爆连载更新中... )共计23条视频,包括:python222网站实战课程视频教程(SpringBoot+Python爬虫实战) ( 火爆连载更新中... )、第2讲 架构搭建实现、第3讲 页面系统属性动态化设计实现等,UP主更多精彩视频,请关注UP账号。https://www.bilibili.com/video/BV1yX4y1a7qM/建表t_tag
create table `t_tag` (
`id` int (11),
`name` varchar (300),
`sort` int (11)
);
insert into `t_tag` (`id`, `name`, `sort`) values('1','Python视频教程','1');
insert into `t_tag` (`id`, `name`, `sort`) values('2','PDF','2');
insert into `t_tag` (`id`, `name`, `sort`) values('3','爬虫','3');
insert into `t_tag` (`id`, `name`, `sort`) values('4','数据分析','4');
insert into `t_tag` (`id`, `name`, `sort`) values('5','机器学习','5');
insert into `t_tag` (`id`, `name`, `sort`) values('6','大数据','6');
insert into `t_tag` (`id`, `name`, `sort`) values('7','大数据分析','7');
insert into `t_tag` (`id`, `name`, `sort`) values('8','人工智能','8');
insert into `t_tag` (`id`, `name`, `sort`) values('10','cc','111');
MybatisX插件生成代码;
获取数据,放到application缓存里面;
index.html
<div class="tag">
<h4 class="tag_title">热门标签推荐</h4>
<ul class="item_list">
<li th:each="tag:${application.tagList}">
<a th:href="@{'/search/1?keyWord='+${tag.name}}" target="_blank"><button type="button" class="layui-btn layui-btn-sm" th:text="${tag.name}"></button></a>
</li>
</ul>
</div>