企业级信息系统开发讲课笔记4.9 Thymeleaf模板引擎

文章目录

  • 零、学习目标
  • 一、Spring Boot支持的视图技术
  • 二、Thymeleaf基本语法
    • 1、Thymeleaf常用标签
    • 2、Thymeleaf主要语法
    • 3、Thymeleaf内置对象
    • 4、Thymeleaf模板基本配置
  • 三、Spring Boot整合Thymeleaf
    • 1、创建Spring Boot项目ThymeleafDemo
    • 2、在全局配置文件里配置Thymeleaf属性
    • 3、创建登录控制器LoginController
    • 4、创建模板文件,获取控制器传来的动态数据
    • 5、启动项目,访问http://localhost:8080/toLoginPage
    • 课堂练习
  • 四、Spring Boot集成Bootstrap
    • (一)集成Bootstrap
      • 1、引用在线文档的方式
      • 2、下载Bootstrap并引用的方式
    • (二)编写登录页面login.html
      • 1、集成Bootstrap
      • 2、编写登录页面
      • 3、启动项目,访问http://localhost:8080/toLoginPage
      • 4、用户名和密码非空校验
    • (三)控制器编写登录验证方法
    • (四)编写登录成功与失败的模板页面
      • 1、编写登录成功页面success.html
      • 2、编写登录失败页面failure.html
    • (五)启动项目,测试效果
  • 五、Thymeleaf访问模型里的数据
    • (一)页面访问Model里的实体数据
      • 1、创建个人实体类 - Person
      • 2、在登录控制器里添加获取个人信息方法
      • 3、创建显示个人信息的模板页面
      • 3、启动应用,测试效果
    • (二)页面访问Model里的列表数据
      • 1、创建商品实体类 - Product
      • 2、创建商品控制器 - ProductController
      • 3、创建显示商品信息页面 - products.html
      • 4、启动应用,查看效果
      • 5、对模型里的数据进行判断
    • (三)页面里JavaScript访问模型里的数据
      • 1、显示个人信息页面
      • 2、显示商品列表信息
  • 六、课后作业
    • 任务:利用MyBatis、JPA或Redis技术,从数据库读取用户信息进行验证用户是否登录成功

零、学习目标

  1. 了解Spring Boot支持的视图技术
  2. 掌握Thymeleaf常用标签
  3. 掌握Thymeleaf标准表达式
  4. 掌握Thymeleaf基本使用
  5. 掌握使用Thymeleaf完成数据的页面展示

一、Spring Boot支持的视图技术

  • Spring Boot框架为简化项目的整体开发,对一些常用的视图技术实现了整合支持,并主要推荐整合模板引擎技术来实现前端页面的动态化内容。
  • Spring Boot可整合的模板引擎技术
  1. FreeMarker
  2. Groovy
  3. Thymeleaf
  4. Mustache
    ……

二、Thymeleaf基本语法

  • 相关语法 ,请学习《thymeleaf_3.0.5_中文参考手册.pdf》 提取码:fqpu

1、Thymeleaf常用标签

th:标签说明
th:insert页面片段包含(类似JSP中的include标签)
th:replace页面片段包含(类似JSP中的include标签)
th:each元素遍历(类似JSP中的c:forEach标签)
th:if条件判断,如果为真
th:unless条件判断,如果为假
th:switch条件判断,进行选择性匹配
th:case条件判断,进行选择性匹配
th:object变量声明
th:with变量声明
th:attr通用属性修改
th:attrprepend通用属性修改,将计算结果追加前缀到现有属性值
th:attrappend通用属性修改,将计算结果追加后缀到现有属性值
th:value属性值修改,指定标签属性值
th:href用于设定链接地址
th:src用于设定链接地址
th:text用于指定标签显示的文本内容
th:utext用于指定标签显示的文本内容,对特殊标签不转义
th:fragment声明片段
th:remove移除片段

2、Thymeleaf主要语法

说明表达式语法作用
变量表达式${...}获取上下文中的变量值
选择变量表达式*{...}用于从被选定对象获取属性值
消息表达式#{...} 用于Thymeleaf模板页面国际化内容的动态替换和展示
链接URL表达式@{...}用于页面跳转或者资源的引入
片段表达式~{...}用来标记一个片段模板,并根据需要移动或传递给其他模板

3、Thymeleaf内置对象

  • #ctx:上下文对象
  • #vars:上下文变量
  • #locale:上下文区域设置
  • #request:(仅限Web Context)HttpServletRequest对象
  • #response:(仅限Web Context)HttpServletResponse对象
  • #session:(仅限Web Context)HttpSession对象
  • #servletContext:(仅限Web Context)ServletContext对象

4、Thymeleaf模板基本配置

  • 在Spring Boot项目中使用Thymeleaf模板,必须保证引入Thymeleaf依赖
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
  • 在全局配置文件中配置Thymeleaf模板的一些参数。如设置模板缓存、模板编码、模板样式、指定模板页面存放路径、指定模板页面名称的后缀
spring.thymeleaf.cache = true
spring.thymeleaf.encoding = UTF-8   
spring.thymeleaf.mode = HTML5   
spring.thymeleaf.prefix = classpath:/templates/  
spring.thymeleaf.suffix = .html   
  • 关于Thymeleaf,可以参看博主两年前编写的《Thymeleaf模板引擎入门》
  • 关于Bootstrap,可以参看博主两年前编写的《前端学习笔记:Bootstrap框架入门》
  • 下面我们会一起来学习Spring Boot如何整合Thymeleaf与Bootstrap,实现一个简单的登录页面

三、Spring Boot整合Thymeleaf

1、创建Spring Boot项目ThymeleafDemo

  • 设置项目元数据
    在这里插入图片描述

  • 添加项目依赖
    在这里插入图片描述

  • 设置项目名称与保存位置
    在这里插入图片描述

  • 完成项目初始化工作
    在这里插入图片描述

  • 查看pom.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.4.5</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>net.hw.lesson09</groupId><artifactId>thymeleafdemo</artifactId><version>0.0.1-SNAPSHOT</version><name>ThymeleafDemo</name><description>Demo project for Spring Boot</description><properties><java.version>1.8</java.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>

2、在全局配置文件里配置Thymeleaf属性

在这里插入图片描述

#缓存配置,默认即是true,开发阶段设置为false
spring.thymeleaf.cache = false
#设置模板使用的编码为utf-8
spring.thymeleaf.encoding = UTF-8
#指定为模板使用的模式为html5,默认html
spring.thymeleaf.mode = HTML5
#指定前缀,默认位置为/templates/,可以修改成其它位置
spring.thymeleaf.prefix = classpath:/templates/
#指定模板文件后缀,默认值为.html,可以修改成其它值
spring.thymeleaf.suffix = .html
  • Thymeleaf页面缓存设置,默认为true,开发中方便调试应设置为false,上线稳定后应保持默认true

3、创建登录控制器LoginController

  • 在net.hw.lesson09包里创建controller子包
  • 在controller子包里创建LoginController控制器
  • 用于前端模板页面动态数据替换效果的测试
    在这里插入图片描述
package net.hw.lesson09.controller;import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;import java.util.Calendar;/*** 功能:登录控制器* 作者:华卫* 日期:2020年08月14日*/
@Controller
public class LoginController {/*** 通过请求“toLoginPage”跳转到templates目录下的* login页面,并把当前年份数据保存到模型对象中*/@GetMapping("toLoginPage")public String toLoginPage(Model model){model.addAttribute("currentYear", Calendar.getInstance().get(Calendar.YEAR));return "login"; // 返回逻辑页面视图名称}
}

4、创建模板文件,获取控制器传来的动态数据

  • 在templates目录下创建模板文件login.html
    在这里插入图片描述

  • h3标签中通过th:text引入了后台动态传递过来的当前年份currentYear

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head><meta charset="UTF-8"><title>用户登录</title>
</head>
<body><span th:text="${currentYear}">今年</span> -<span th:text="${currentYear} + 1">明年</span>
</body>
</html>
  • 静态访问模板文件,将显示默认值,而不会显示后台传来的动态数据
    在这里插入图片描述

5、启动项目,访问http://localhost:8080/toLoginPage

  • 启动项目
    在这里插入图片描述

  • 在浏览器里访问http://localhost:8080/toLoginPage
    在这里插入图片描述

课堂练习

  • 创建用户实体类 - User
    在这里插入图片描述

  • 在登录控制器的toLoginPage()方法里,创建用户对象,放入模型对象

  • 在登录页面显示用户信息,查看运行效果
    在这里插入图片描述

  • 改变用户信息显示方式
    在这里插入图片描述

四、Spring Boot集成Bootstrap

  • Bootstrap4教程:https://www.runoob.com/bootstrap4/bootstrap4-tutorial.html
    在这里插入图片描述
  • 注意:Bootstrap3和Bootstrap4两版本有较大差异

(一)集成Bootstrap

1、引用在线文档的方式

  • 在模板文件中直接引用以下文件
    在这里插入图片描述
<!-- 新 Bootstrap4 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单,包含了 popper.min.js -->
<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
<!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>

2、下载Bootstrap并引用的方式

链接:https://pan.baidu.com/s/1vEmjeGTdM9jERbXPU4bmAw 提取码:qgo9
在这里插入图片描述

  • 解压缩到bootstrap-4.0.0目录
    在这里插入图片描述

  • 将bootstrap-4.0.0目录拷贝项目的static目录
    在这里插入图片描述
    在这里插入图片描述

(二)编写登录页面login.html

1、集成Bootstrap

在这里插入图片描述

2、编写登录页面

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head><meta charset="UTF-8"><title>用户登录</title><link th:href="@{/bootstrap-4.0.0/css/bootstrap.css}" rel="stylesheet"><javascript th:src="@{/bootstrap-4.0.0/js/jquery-3.4.1.min.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.bundle.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.js}"></javascript>  
</head>
<body>
<div class="col-6 m-auto" style="margin-top:30px!important;"><div class="text-center"><span th:text="${currentYear}">今年</span> -<span th:text="${currentYear} + 1">明年</span></div><div class="border border-info bg-light p-2" style="border-radius: 5px"><form action="/login" method="post"><h3 class="text-center">用户登录</h3><div class="mt-1"><input type="text" id="username" name="username" class="form-control" placeholder="输入用户名" autofocus></div><div class="mt-1"><input type="password" id="password" name="password" class="form-control" placeholder="输入密码"></div><div class="checkbox text-center"><label><input class="form-check-input text-center" type="checkbox">记住我</label></div><div><button class="btn btn-lg btn-primary btn-block" id="login" type="submit">登录</button></div></form></div>
</div>
</body>
</html>
  • <div class="col-6 m-auto" style="margin-top:30px!important;"> 分区占窗口一半宽度(水平方向按12个单位平分)、水平居中、顶边距30个像素
  • <div class="border border-info bg-light p-2" style="border-radius: 5px"> 设置边框(边框色、背景、内边距、圆角)
  • <div class="mt-1"> 设置上外边距为1个单位
  • <h3 class="text-center">用户登录</h3> 设置文本居中显示

3、启动项目,访问http://localhost:8080/toLoginPage

在这里插入图片描述

4、用户名和密码非空校验

  • 留待大家自行完成
    在这里插入图片描述

(三)控制器编写登录验证方法

在这里插入图片描述
在这里插入图片描述

@PostMapping("/login")                                                          
public String login(HttpServletRequest request, Model model) {                 // 获取表单提交的用户名与密码                                                           String username = request.getParameter("username");                        String password = request.getParameter("password");                        // 判断用户是否登录成功(假设合法用户名为howard,密码为903213)                                    if (username.equals("howard") && password.equals("903213")) {              model.addAttribute("loginMsg", "恭喜,用户登录成功~");                          return "success";                                                      } else {                                                                   model.addAttribute("loginMsg", "遗憾,用户登录失败~");                          return "failure";                                                      }                                                                          
}                                                                              

(四)编写登录成功与失败的模板页面

1、编写登录成功页面success.html

在这里插入图片描述

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head><meta charset="UTF-8"><title>登录成功</title><link th:href="@{/bootstrap-4.0.0/css/bootstrap.css}" rel="stylesheet"><javascript th:src="@{/bootstrap-4.0.0/js/jquery-3.4.1.min.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.bundle.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.js}"></javascript>
</head>
<body>
<div class="col-6 text-center m-auto border-info border p-3 bg-light" style="margin-top:50px!important;"><p th:text="${loginMsg}" class="text-success"></p>
</div>
</body>
</html>

2、编写登录失败页面failure.html

在这里插入图片描述

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head><meta charset="UTF-8"><title>登录失败</title><link th:href="@{/bootstrap-4.0.0/css/bootstrap.css}" rel="stylesheet"><javascript th:src="@{/bootstrap-4.0.0/js/jquery-3.4.1.min.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.bundle.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.js}"></javascript>
</head>
<body>
<div class="col-6 text-center m-auto border-warning border p-3 bg-light" style="margin-top:50px!important;"><p th:text="${loginMsg}" class="text-danger"></p>
</div>
</body>
</html>

(五)启动项目,测试效果

  • 启动项目后,在浏览器里访问http://localhost:8080/toLoginPage
    在这里插入图片描述

  • 输入正确的用户名和密码(howard : 903213)
    在这里插入图片描述

  • 输入其它用户名或密码
    在这里插入图片描述

五、Thymeleaf访问模型里的数据

(一)页面访问Model里的实体数据

1、创建个人实体类 - Person

在这里插入图片描述

package net.hw.lesson09.bean;/*** 功能:个人实体类* 作者:华卫* 日期:2021年05月24日*/
public class Person {private int id;private String name;private String gender;private int age;private String telephone;public int getId() {return id;}public void setId(int id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getGender() {return gender;}public void setGender(String gender) {this.gender = gender;}public int getAge() {return age;}public void setAge(int age) {this.age = age;}public String getTelephone() {return telephone;}public void setTelephone(String telephone) {this.telephone = telephone;}@Overridepublic String toString() {return "Person{" +"id=" + id +", name='" + name + '\'' +", gender='" + gender + '\'' +", age=" + age +", telephone='" + telephone + '\'' +'}';}
}

2、在登录控制器里添加获取个人信息方法

在这里插入图片描述

3、创建显示个人信息的模板页面

在这里插入图片描述

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head><meta charset="UTF-8"><title>个人信息</title><link th:href="@{/bootstrap-4.0.0/css/bootstrap.css}" rel="stylesheet"><javascript th:src="@{/bootstrap-4.0.0/js/jquery-3.4.1.min.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.bundle.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.js}"></javascript>
</head>
<body>
<div class="panel panel-primary"><div class="panel-heading"><h3 class="panel-title">显示个人信息</h3></div><div class="panel-body">编号:<span th:text="${person.id}">1</span><br/>姓名:<span th:text="${person.name}">娃哈哈</span><br/>性别:<span th:text="${person.gender}"></span><br/>年龄:<span th:text="${person.age}">20</span><br/>电话:<span th:text="${person.telephone}">15878789056</span><br/></div>
</div>
</body>
</html>

3、启动应用,测试效果

  • 启动应用
    在这里插入图片描述
  • 访问http://localhost:8080/getPerson
    在这里插入图片描述
  • 问题:Bootstrap的面板样式没有起作用。
  • 以在线方式导入Bootstrap 3,就可以看到面板效果
    在这里插入图片描述
  • 说明:Bootstrap从4.x开始,用Card替换了Panel
    在这里插入图片描述
  • 修改person.html,采用card组件
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head><meta charset="UTF-8"><title>个人信息</title><link th:href="@{/bootstrap-4.0.0/css/bootstrap.css}" rel="stylesheet"><javascript th:src="@{/bootstrap-4.0.0/js/jquery-3.4.1.min.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.bundle.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.js}"></javascript>
</head>
<body>
<div class="card"><div class="card-header" style="background-color:royalblue"><h4 class="card-title" style="color:white">显示个人信息</h4></div><div class="card-body">编号:<span th:text="${person.id}">1</span><br/>姓名:<span th:text="${person.name}">娃哈哈</span><br/>性别:<span th:text="${person.gender}"></span><br/>年龄:<span th:text="${person.age}">20</span><br/>电话:<span th:text="${person.telephone}">15878789056</span><br/></div><div class="card-footer">信工院2021.05.24</div>
</div>
</body>
</html>
  • 启动应用,查看效果
    在这里插入图片描述

(二)页面访问Model里的列表数据

1、创建商品实体类 - Product

在这里插入图片描述

package net.hw.lesson09.bean;/*** 功能:商品实体类* 作者:华卫* 日期:2021年05月24日*/
public class Product {private int id;private String name;private double price;public int getId() {return id;}public void setId(int id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public double getPrice() {return price;}public void setPrice(double price) {this.price = price;}@Overridepublic String toString() {return "Product{" +"id=" + id +", name='" + name + '\'' +", price=" + price +'}';}
}

2、创建商品控制器 - ProductController

在这里插入图片描述

package net.hw.lesson09.controller;import net.hw.lesson09.bean.Product;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;import java.util.ArrayList;
import java.util.List;/*** 功能:商品控制器* 作者:华卫* 日期:2021年05月24日*/
@Controller
public class ProductController {@GetMapping("/getProducts")public String getProducts(Model model) {// 创建商品列表List<Product> products = new ArrayList<>();Product product = new Product();product.setId(1);product.setName("海尔电视机");product.setPrice(2500);products.add(product);product = new Product();product.setId(2);product.setName("小米手机");product.setPrice(2000);products.add(product);product = new Product();product.setId(3);product.setName("华为电脑");product.setPrice(5000);products.add(product);// 将商品列表写入模型model.addAttribute("products", products);// 返回逻辑视图名return "products";}
}

3、创建显示商品信息页面 - products.html

在这里插入图片描述

<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head><meta charset="UTF-8"><title>商品信息</title><link th:href="@{/bootstrap-4.0.0/css/bootstrap.css}" rel="stylesheet"><javascript th:src="@{/bootstrap-4.0.0/js/jquery-3.4.1.min.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.bundle.js}"></javascript><javascript th:src="@{/bootstrap-4.0.0/js/bootstrap.js}"></javascript>
</head>
<body>
<div class="card"><div class="card-header" style="background-color:royalblue"><h4 class="card-title" style="color:white">显示商品信息</h4></div><div class="card-body"><ul class="list-group"><li class="list-group-item" th:each="product:${products}">编号:<span th:text="${product.id}">1</span><br/>名称:<span th:text="${product.name}">洗衣机</span><br/>单价:<span th:text="${product.price}">1000</span><br/></li></ul></div><div class="card-footer">信工院2021.05.24</div>
</div>
</body>
</html>

4、启动应用,查看效果

  • 启动应用
    在这里插入图片描述
  • 访问http://localhost:8080/getProducts
    在这里插入图片描述

5、对模型里的数据进行判断

  • 通过${not #lists.isEmpty(products)}表达式判断products是否为空。Thymeleaf支持>、<、>=、<=、==、!=作为比较条件,同时也支持SpringEL表达式语言用于条件中。
  • 修改显示商品信息页面
    在这里插入图片描述
  • 修改商品控制器
    在这里插入图片描述
  • 启动应用,查看效果
    在这里插入图片描述

(三)页面里JavaScript访问模型里的数据

1、显示个人信息页面

  • 添加脚本,修改代码
    在这里插入图片描述
  • 启动应用,查看效果
    在这里插入图片描述
  • 通过 th:inline="javascript"添加到script标签,这样JavaScript即可访问model中属性。通过[[${属性}]]格式获得实际的值。

2、显示商品列表信息

  • 添加脚本,修改代码
    在这里插入图片描述
  • 修改商品控制器
    在这里插入图片描述
  • 启动应用,查看效果
    在这里插入图片描述
  • 优化代码,采用循环结构显示商品列表
    在这里插入图片描述

六、课后作业

任务:利用MyBatis、JPA或Redis技术,从数据库读取用户信息进行验证用户是否登录成功

  • 增加用户表t_user
  • 创建用户实体类
  • 创建数据访问接口
  • 修改控制器login()方法

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/25.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

12. AbstractQueuedSynchronizer之AQS

12.1 前置知识 ● 公平锁和非公平锁 ○ 公平锁&#xff1a;锁被释放以后&#xff0c;先申请的线程先得到锁。性能较差一些&#xff0c;因为公平锁为了保证时间上的绝对顺序&#xff0c;上下文切换更频繁 ○ 非公平锁&#xff1a;锁被释放以后&#xff0c;后申请的线程可能会先获…

有效延缓痴呆症:延世大学发现梯度提升机模型能准确预测 BPSD 亚综合征

内容一览&#xff1a;随着人口老龄化程度不断加剧&#xff0c;痴呆症已经成为公共健康问题。目前医学界治疗该病还只能通过药物缓解&#xff0c;尚未发现治愈的有效方法&#xff0c;因此&#xff0c;预防痴呆症尤为紧迫。在这一背景下&#xff0c;延世大学的研究人员开发了多个…

复习之linux虚拟化的介绍

一、虚拟化客户端及工具的安装 1.在虚拟机westos中列出&#xff1a; ps:虚拟机中安装虚拟机无意义&#xff0c;这里指是做实验看清楚虚拟机的创建&#xff01; # dnf group list --hidden irtualization Client &#xff1a;虚拟化客户端 Virtualization Tools &…

在CRM系统中如何获取联系人的信息?

CRM客户管理系统可以有效应对企业对联系人管理的需求&#xff0c;帮助销售人员随时随地查阅、记录、修改联系人&#xff0c;为业务开展做好铺垫。CRM中联系人是什么&#xff1f;如何获取联系人信息&#xff1f; 1.CRM中联系人是什么&#xff1f; CRM系统联系人指的是沟通对象…

低代码开发重要工具:jvs-form(表单引擎)2.1.7功能清单及新增功能介绍

jvs-form 2.1.7 版本功能清单 在低代码开发平台中&#xff0c;表单是用于收集和编辑数据的页面。它通常用于创建、更新或查看单个记录的详细信息。 jvs-form是jvs快速开发平台的8大引擎的其中之一&#xff0c;它的特点&#xff1a; 与动态模型联动&#xff0c;支持动态的调整…

基于深度强化学习的目标驱动型视觉导航泛化模型

深度强化学习在目标驱动型视觉导航的泛化 参考论文《Towards Generalization in Target-Driven Visual Navigation by Using Deep Reinforcement Learning》 文章目录 深度强化学习在目标驱动型视觉导航的泛化1. 目标驱动型视觉导航问题2. 创新点和解决的问题2.1 创新点2.2 解…

英语中-后置定语

一般说来&#xff0c;形容词放在所修饰名词的前面。单个的现在分词、过去分词以及动名词作定语&#xff0c;都是放在所修饰名词&#xff08;或代词&#xff09;的前面。这些称为前置定语。 例如&#xff1a; a red flower/ an interesting story&#xff0c;这里red, interes…

Collection接口详细介绍(上)

前言&#xff1a; 本篇文章主要讲解Java中的Collection接口以及相关实现类的知识。该专栏比较适合刚入坑Java的小白以及准备秋招的大佬阅读。 如果文章有什么需要改进的地方欢迎大佬提出&#xff0c;对大佬有帮助希望可以支持下哦~ 小威在此先感谢各位小伙伴儿了&#x1f601…

电子蜡烛灯单片机开发方案

LED蜡烛灯可以像真正的蜡烛一样发出舒适的闪烁光&#xff0c;具有仿真蜡烛效果&#xff0c;适合在一些聚会或庆祝活动中使用。宇凡微推出的低成本LED蜡烛灯IC方案&#xff0c;根据不同电子蜡烛灯方案&#xff0c;主控芯片推荐使用YF单片机。 LED蜡烛灯是有孩子的家庭很好蜡烛替…

Vue单文件组件

单文件组件 单文件组件是在开发中用的比较多的&#xff0c;它的后缀都是.vue结尾的 既然是.vue结尾&#xff0c;那么直接给浏览器是不能运行的&#xff0c;.vue文件是vue团队打造的特殊文件&#xff0c;想让.vue文件让浏览器识别并且运行&#xff0c;需要对它进行处理加工成纯…

07_scrapy的应用——获取电影数据(通过excel保存静态页面scrapy爬虫数据的模板/通过数据库保存)

0、前言: 一般我们自己创建的一些python项目,我们都需要创建虚拟环境,其中会下载很多包,也叫做依赖。但是我们在给他人分享我们的项目时,不能把虚拟环境打包发送给别人,因为每个人电脑系统不同,我们可以把依赖导出为依赖清单,然后别人有了我们的依赖清单,就可以用一条…

Docker consul的容器

consul服务更新和服务发现 什么是服务注册与发现 服务注册与发现是微服务架构中不可或缺的重要组件。起初服务都是单节点的&#xff0c;不保障高可用性&#xff0c;也不考虑服务的压力承载&#xff0c;服务之间调用单纯的通过接口访问。直到后来出现了多个节点的分布式架构&…

优维低代码实践:模板

优维低代码技术专栏&#xff0c;是一个全新的、技术为主的专栏&#xff0c;由优维技术委员会成员执笔&#xff0c;基于优维7年低代码技术研发及运维成果&#xff0c;主要介绍低代码相关的技术原理及架构逻辑&#xff0c;目的是给广大运维人提供一个技术交流与学习的平台。…