-
帖子实体类、mapper
-
查询帖子方法,分页
-
查询帖子数量
-
帖子和用户查询方式
- sql关联查询
- 先查帖子,查出userId再查用户
使用第2种,因为这样更直观,而且之后存redis更方便、性能更好
-
主页展示,将帖子和用户返回给前端,放在model中
- index.html引入th模板,相对路径
- 帖子循环
- 用户头像
- 帖子内容th:utext
- 判断帖子类型是置顶还是精华 th:if
- 用户名
- 时间格式化
- 获取当前页行的偏移量
- 获得总页数
- 获取起始页码
- 获取结束页码
仿牛客社区
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.