1、官網地址
- 官網演示地址https://fly.layui.com/
- 模板下載地址:https://www.layui.com/template/fly/
- 詳細開發檔案:https://www.sunnyblog.top/index.html?typeId=1260457825721647104
2、技術堆疊
- 開發工具 Idea
- 資料庫設計 PowerDesign
- JDK版本 Java8
- 資料庫 MySQL v5.7
- 后端開發語言 SpringBoot2.2.6.RELEASE
- 資料訪問層 Mybatis-Plus 3.3.1
- 前端相關 HTML5、LayUI、jQuery、LayUI_fly社區模板等
- 中間件 Redis快取、RabbitMQ訊息、Nginx等
- 檔案服務 FastDFS分布式檔案存盤、七牛云等
- 富文本編輯器 WangEditor、Editor.md
- 三方登錄 QQ、微信、微博、gitee等
- 訊息發送 郵件發送、發送釘釘訊息、短信發送
- 集成三方api 帖子內容審核(百度審核)、百度推送等
3、表結構設計pd圖
- 詳細腳本下載地址:https://www.sunnyblog.top/detail.html?id=1263454281873227776

4、框架搭建
4.1.集成MyBatis-Plus操作資料庫
-
引入maven依賴
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.3.1</version> </dependency> -
application.yml配置資料庫連接 spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/sunny-fly?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&useAffectedRows=true username: root password: admin1009 type: com.zaxxer.hikari.HikariDataSource hikari: maximum-pool-size: 50 # 連接池最大連接數,默認是10 minimum-idle: 5 #最小空閑連接數量 idle-timeout: 18000 #空閑連接存活最大時間,默認600000(10分鐘) pool-name: sunnyHikariCP #連接池名稱 connection-test-query: SELECT 1 -
mybatis-plus基本配置類:MybatisPlusConfig.java @EnableTransactionManagement @Configuration @MapperScan("com.sunny.fly.mapper") public class MybatisPlusConfig { @Bean public PaginationInterceptor paginationInterceptor() { PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); paginationInterceptor.setCountSqlParser(new JsqlParserCountOptimize(true)); return paginationInterceptor; } } -
測驗通過mybatis-plus操作資料庫
-
創建測驗腳本
CREATE TABLE `test` ( `NAME` varchar(255) DEFAULT NULL, `AGE` int(11) DEFAULT NULL, `BIRTHDAY` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -
創建pojo,mapper,service,controller
@Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @TableName("TEST") public class TestBean implements Serializable { private static final long serialVersionUID = 1L; /** * 姓名 */ private String name; /** * 年齡 */ private int age; /** * 年齡 */ private Date birthday; }
mapper
@Repository
public interface TestMapper extends BaseMapper<TestBean> {
}
service
public List<TestBean> queryAll() {
return testMapper.selectList(null);
}
controller
@GetMapping("queryAll")
@ResponseBody
public ResponseResult<List<TestBean>> queryAll() {
List<TestBean> testList = testService.queryAll();
return ResponseUtil.makeOKRsp(testList);
}
- 頁面訪問

4.2、集成Redis快取
- 詳細集成檔案

5.首頁開發
- 首頁詳細開發檔案

6.詳情頁開發
- 詳情頁詳細開發檔案

7、登錄注冊以及個人中心開發檔案
- 登錄注冊詳細開發檔案

源代碼下載地址
原始碼下載地址
詳細開發技術檔案盡在 點擊這里查看技術檔案 ;更多技術文章: https://www.sunnyblog.top;任何疑問加QQ群咨詢:534073451
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/181803.html
標籤:Java
