mirror of
https://github.com/JeffLi1993/springboot-learning-example.git
synced 2026-03-14 14:13:52 +08:00
Spring Boot WebFlux 中 Thymeleaf 和 Mongodb 实践
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
spring.data.mongodb.host=localhost
|
||||
spring.data.mongodb.database=admin
|
||||
spring.data.mongodb.port=27017
|
||||
spring.data.mongodb.username=admin
|
||||
spring.data.mongodb.password=admin
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>城市</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<table>
|
||||
<legend>
|
||||
<strong>城市单个查询</strong>
|
||||
</legend>
|
||||
<tbody>
|
||||
<td th:text="${city.id}"></td>
|
||||
<td th:text="${city.provinceId}"></td>
|
||||
<td th:text="${city.cityName}"></td>
|
||||
<td th:text="${city.description}"></td>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>城市列表</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<table>
|
||||
<legend>
|
||||
<strong>城市列表</strong>
|
||||
</legend>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>城市编号</th>
|
||||
<th>省份编号</th>
|
||||
<th>名称</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="city : ${cityList}">
|
||||
<td th:text="${city.id}"></td>
|
||||
<td th:text="${city.provinceId}"></td>
|
||||
<td th:text="${city.cityName}"></td>
|
||||
<td th:text="${city.description}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user