mirror of
https://github.com/JeffLi1993/springboot-learning-example.git
synced 2026-03-14 14:13:52 +08:00
Spring Boot 入门、Spring Boot 配置、Web 开发、模板引擎、数据存储、数据缓存 案例更新
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
## 是否启动日志 SQL 语句
|
||||
spring.jpa.show-sql=true
|
||||
|
||||
spring.redis.host=localhost
|
||||
spring.redis.port=6379
|
||||
spring.redis.jedis.pool.max-idle=8
|
||||
spring.redis.jedis.pool.min-idle=0
|
||||
spring.redis.jedis.pool.max-active=8
|
||||
spring.redis.jedis.pool.max-wait=-1
|
||||
@@ -0,0 +1,2 @@
|
||||
/* contentDiv */
|
||||
.contentDiv {padding:20px 60px;}
|
||||
BIN
chapter-6-spring-boot-cache-redis/src/main/resources/static/images/favicon.ico
Executable file
BIN
chapter-6-spring-boot-cache-redis/src/main/resources/static/images/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 946 B |
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js}"></script>
|
||||
<link th:href="@{https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/default.css}" rel="stylesheet"/>
|
||||
<link rel="icon" th:href="@{/images/favicon.ico}" type="image/x-icon"/>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>书籍管理</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="contentDiv">
|
||||
|
||||
<h5>《Spring Boot 2.x 核心技术实战 - 上 基础篇》第 5 章《数据存储》Demo </h5>
|
||||
|
||||
<legend>
|
||||
<strong>书籍管理</strong>
|
||||
</legend>
|
||||
|
||||
<form th:action="@{/book/{action}(action=${action})}" method="post" class="form-horizontal">
|
||||
|
||||
<input type="hidden" name="id" th:value="${book.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="book_name" class="col-sm-2 control-label">书名:</label>
|
||||
<div class="col-xs-4">
|
||||
<input type="text" class="form-control" id="book_name" name="name" th:value="${book.name}"
|
||||
th:field="*{book.name}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="book_writer" class="col-sm-2 control-label">作者:</label>
|
||||
<div class="col-xs-4">
|
||||
<input type="text" class="form-control" id="book_writer" name="writer" th:value="${book.writer}"
|
||||
th:field="*{book.writer}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="book_introduction" class="col-sm-2 control-label">简介:</label>
|
||||
<div class="col-xs-4">
|
||||
<textarea class="form-control" id="book_introduction" rows="3" name="introduction"
|
||||
th:value="${book.introduction}" th:field="*{book.introduction}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<input class="btn btn-primary" type="submit" value="提交"/>
|
||||
<input class="btn" type="button" value="返回" onclick="history.back()"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js}"></script>
|
||||
<link th:href="@{https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/default.css}" rel="stylesheet"/>
|
||||
<link rel="icon" th:href="@{/images/favicon.ico}" type="image/x-icon"/>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>书籍列表</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="contentDiv">
|
||||
|
||||
<h5>《Spring Boot 2.x 核心技术实战 - 上 基础篇》第 5 章《数据存储》Demo </h5>
|
||||
|
||||
<table class="table table-hover table-condensed">
|
||||
<legend>
|
||||
<strong>书籍列表</strong>
|
||||
</legend>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>书籍编号</th>
|
||||
<th>书名</th>
|
||||
<th>作者</th>
|
||||
<th>简介</th>
|
||||
<th>管理</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="book : ${bookList}">
|
||||
<th scope="row" th:text="${book.id}"></th>
|
||||
<td><a th:href="@{/book/update/{bookId}(bookId=${book.id})}" th:text="${book.name}"></a></td>
|
||||
<td th:text="${book.writer}"></td>
|
||||
<td th:text="${book.introduction}"></td>
|
||||
<td><a class="btn btn-danger" th:href="@{/book/delete/{bookId}(bookId=${book.id})}">删除</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div><a class="btn btn-primary" href="/book/create" role="button">新增书籍</a></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user