JPA + Thymeleaf 增删改查

一、 什么是 Thymeleaf

  • JPA(Java Persistence API):是一种用于对象关系映射(ORM)的 Java 规范,它简化了数据库操作,使开发者可以以面向对象的方式处理数据存储。通过定义实体类和数据访问接口,JPA 框架可以自动生成 SQL 语句并执行数据库操作
  • Thymeleaf:是一种现代的服务器端 Java 模板引擎,它允许开发者在 HTML 页面中嵌入动态内容,实现页面的动态生成。Thymeleaf 提供了丰富的模板语法和标签,可以方便地与后端数据进行交互,并生成最终的 HTML 页面返回给客户端。

二、相关配置 :

1. 首先要引入依赖:

1.1 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>3.3.3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.ty</groupId>
    <artifactId>Thymeleaf</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>Thymeleaf</name>
    <description>Thymeleaf</description>
    <url/>
    <licenses>
        <license/>
    </licenses>
    <developers>
        <developer/>
    </developers>
    <scm>
        <connection/>
        <developerConnection/>
        <tag/>
        <url/>
    </scm>
    <properties>
        <java.version>21</java.version>
    </properties>
    <dependencies>

        <!--  导入thymeleaf 布局包  -->
        <dependency>
            <groupId>nz.net.ultraq.web.thymeleaf</groupId>
            <artifactId>thymeleaf-layout-dialect</artifactId>
            <version>1.0.6</version>
        </dependency>
        <!-- 导入 mybatis-plus 包 -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
            <version>3.5.7</version>
        </dependency>
        <!--    导入 MySQL 驱动    -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.30</version>
        </dependency>
        <!--   引入阿里巴巴数据源     -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-3-starter</artifactId>
            <version>1.2.20</version>
        </dependency>
        <!--    开启热部署    -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

        <!--    导入jquery包    -->
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery</artifactId>
            <version>3.7.1</version>
        </dependency>

        <!--    thymeleaf 模版引擎 启动器    -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <!--    SpringBoot web 启动器    -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!--    导入mysql包    -->
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!--    导入 lombok    -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <!--    tomcat    -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <!--    SpringBoot test 启动器    -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!-- 引入MyBatis-Plus支持(不需要再引入MyBatis包) -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
            <version>3.5.7</version>
        </dependency>
        <!-- 引入MyBatis-Plus动态数据源支持 -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
            <version>4.1.2</version>
        </dependency>
        <!-- 引入 slf4j 包  -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Thymeleaf 模版的使用

然后 就可以在 html 中引用 Thymeleaf 模版:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>物联设备信息管理主页面</title>
    <!-- 引入 jQuery -->
    <script th:src="@{/jquery-3.7.1.js}" src="../static/jquery-3.7.1.js"></script>
    <style>
        a {
            text-decoration: none;
            text-align: center;
        }
        #Add {
            top: 70px;
            left: 690px;
            position: fixed;
            padding: 10px 15px;
            background-color: #00c5ff;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            font-size: 18px; /* 调整消息字体大小 */
            margin-bottom: 20px; /* 增加与下面元素的距离 */
        }
        table {
            width: 1200px; /* 设置表格的宽度 */
            border-collapse: collapse;
            margin-top: 60px;

        }
        th, td {
            padding: 15px; /* 增加单元格内边距 */
        }
        h1 {
            font-size: 32px; /* 调整标题字体大小 */
            margin-bottom: 30px; /* 增加与下面元素的距离 */
        }

    </style>
</head>
<body>
    <h1 align="center">物联设备信息管理</h1>
    <p th:text="${msg}" align="center"></p>
    <div id="Add">
        <a th:href="@{/add}">添加</a>
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
        <tr bgcolor="#a9a9a9">
            <th>设备ID</th>
            <th>设备名称</th>
            <th>设备制作商</th>
            <th>型号</th>
            <th>安装日期</th>
            <th>最后维护日期</th>
            <th>设备位置</th>
            <th>设备IP地址</th>
            <th>设备状态</th>
            <th>操作</th>
        </tr>
        <tr th:each="device:${iotDevices}">
            <td th:text="${device.getDeviceId()}"></td>
            <td th:text="${device.getDeviceName()}"></td>
            <td th:text="${device.getManufacturer()}"></td>
            <td th:text="${device.getModel()}"></td>
            <td th:text="${#dates.format(device.getInstallationDate(),'yyyy-MM-dd')}"></td>
            <td th:text="${#dates.format(device.getLastMaintenanceDate(),'yyyy-MM-dd')}"></td>
            <td th:text="${device.getLocation()}"></td>
            <td th:text="${device.ip}"></td>
            <td th:switch="${device.getStatus()}">
                <span th:case="0" style="color: darkgray ; font-weight: bold">离线</span>
                <span th:case="1" style="color: green ; font-weight: bold">在线</span>
                <span th:case="2" style="color: red ; font-weight: bold">维护中</span>
            </td>
            <td><a th:href="@{/update(id=${device.getDeviceId()})}">修改</a>
<!--                <a th:href="@{/delete(id=${device.getDeviceId()})}">删除</a>-->

                <a th:href="|del(${device.getDeviceId()}|">删除</a>

            </td>
        </tr>
    </table>


    <script>
        $("tr:odd").css("background-color", "lightpink");
        $("tr:even").css("background-color", "lightskyblue");
        $("tr:first").css("background-color", "lightslategray");


        /**
         * ajax 删除
         */
        // function del(deviceId){
        //     if (confirm("确定删除吗?")){
        //         window.location.href="/del?"+ deviceId ;
        //     }
        // }
        window.onload = function() {
            function del(deviceId) {
                if (confirm("确定删除吗?")) {
                    // 删除操作逻辑
                    $.ajax({
                        url: "/del",
                        type: "post",
                        data: { deviceId: deviceId },
                        success: function(response) {
                            // 删除成功后的处理,例如显示成功消息或更新页面显示
                            alert("删除成功!");
                        },
                        error: function(error) {
                            // 删除失败后的处理
                            alert("删除失败:" + error.responseText);
                        }
                    });
                }
            }
        };


    </script>



</body>
</html>

Thymeleaf 模版的使用

一般都是使用这种方式引用  Thymeleaf 模版:   <td th:text="${device.getModel()}"></td>

就是这样 是不是非常方便 

2. application.yml 配置文件:

spring:
  #配置数据源
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/dao?useUnicode=true&characterEncoding=utf-8
    username: root
    password: whs

#配置mybatis相关信息
mybatis:
  config-location: classpath:mybatis/mybatis-config.xml
  mapper-locations: classpath:mybatis/mapper/*.xml
  type-aliases-package: com.ty.iot.pojo

#配置日志输出
logging:
  level:
    com.baomidou: debug #设置MyBatis-Plus日志级别为debug
    org.springframework.jdbc.datasource.init: debug #设置DataSource初始化日志级别为debug

#容器配置
server:
  port: 8080
  servlet:
    encoding:
      charset: UTF-8

 

还有一点就是 Spring boot 的引入css或者配置文件 必须要放在resource 下面 不然读取不到

因为 Spring boot 默认且只读取 rsource 下的文件

3.编写 实体类  IotDevices

package com.ty.iot.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * IotDevices
 *
 * @aurhor Administrator  whs
 * @since 2024/9/24
 */
@Data
public class IotDevices implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 设备ID使用自动增长赋值
     */
    @JsonProperty("device_id")
    private Integer deviceId;

    /**
     * 设备名称
     */
    @JsonProperty("device_name")
    private String deviceName;

    /**
     * 设备制造商
     */
    @JsonProperty("manufacturer")
    private String manufacturer;

    /**
     * 型号
     */
    @JsonProperty("model")
    private String model;

    /**
     * 安装日期
     */
    @JsonProperty("installation_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date installationDate;

    /**
     * 最后维护日期
     */
    @JsonProperty("last_maintenance_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastMaintenanceDate;

    /**
     * 设备位置
     */
    @JsonProperty("location")
    private String location;

    /**
     * 设备IP地址
     */
    @JsonProperty("ip")
    private String ip;

    /**
     * 设备状态[0=离线,1=在线,2=维护中]
     */
    @JsonProperty("status")
    private Integer status;


}

4. 接口  IotDevicesMapper

package com.ty.iot.mapper;

import com.ty.iot.entity.IotDevices;

import java.util.List;

public interface IotDevicesMapper {

    int add(IotDevices iotDevices);

    int delete(int id);

    int update(IotDevices iotDevices);

    IotDevices listById(int id);

    List<IotDevices> list();

}

5. IotDevicesMapper.xml 文件

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ty.iot.mapper.IotDevicesMapper">


    <resultMap id="iotResource" type="iotDevices">
        <id column="device_id" property="deviceId"></id>
        <result column="device_name" property="deviceName"></result>
        <result column="installation_date" property="installationDate"></result>
        <result column="last_maintenance_date" property="lastMaintenanceDate"></result>
        <result column="manufacturer" property="manufacturer"></result>
        <result column="model" property="model"></result>
        <result column="location" property="location"></result>
        <result column="ip" property="ip"></result>
        <result column="status" property="status"></result>
    </resultMap>


    <insert id="add">
        insert iot_devices values(default,#{deviceName},#{manufacturer},#{model}
        ,#{installationDate},#{lastMaintenanceDate},#{location},#{ip},#{status})
    </insert>

    <update id="update">
        update iot_devices
        <trim prefix="set" suffixOverrides="," suffix="where">
            <if test="deviceName != null and deviceName != ''">
                device_name = #{deviceName},
            </if>
            <if test="manufacturer != null and manufacturer != ''">
                manufacturer = #{manufacturer},
            </if>
            <if test="model != null and model != ''">
                model = #{model},
            </if>
            <if test="installationDate != null">
                installation_date = #{installationDate},
            </if>
            <if test="lastMaintenanceDate != null">
                last_maintenance_date = #{lastMaintenanceDate},
            </if>
            <if test="location != null and location != ''">
                location = #{location},
            </if>
            <if test="ip != null and ip != ''">
                ip = #{ip},
            </if>
            <if test="status != null">
                status = #{status},
            </if>
        </trim>
        device_id = #{deviceId}
    </update>

    <delete id="delete">
        delete from iot_devices where  device_id = #{deviceId}
    </delete>

    <select id="listById"  resultMap="iotResource">
        select * from iot_devices
        <where>
            <if test="deviceId != null">
                device_id = #{deviceId}
            </if>
        </where>
    </select>

    <select id="list"  resultMap="iotResource">
        select * from iot_devices order by installation_date desc
    </select>
</mapper>

6. 最后编写   Controller

package com.ty.iot.controller;

import com.ty.iot.entity.IotDevices;
import com.ty.iot.service.IotDevicesService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * IotDevicesController
 *
 * @aurhor Administrator  whs
 * @since 2024/9/25
 */
@Controller
public class IotDevicesController {

    @Resource
    private IotDevicesService iotDevicesService;

    @GetMapping("/index")
    public String index(Model model) {
        model.addAttribute("iotDevices", iotDevicesService.list());
        return "index";
    }


    @GetMapping("/add")
    public String add(Model model) {
        return "add";
    }

    @RequestMapping("/add")
    public String toAdd(IotDevices iotDevices, Model model) {
        int add = iotDevicesService.add(iotDevices);
        if (add == 0) {
            return "redirect:/index";
        }
        return "redirect:/index";
    }

    @GetMapping("/update")
    public String upd(Model model, int id) {
        model.addAttribute("iotDevices", iotDevicesService.listById(id));
        return "update";
    }


    @RequestMapping("/doUpdate")
    public String doUpdate(IotDevices iotDevices, Model model) {
        int upd = iotDevicesService.update(iotDevices);
        if (upd == 0) {
            return "redirect:/upd";
        }
        return "redirect:/index";
    }

    @RequestMapping("/del?{id}")
    public String del(@PathVariable("id") int id) {
        iotDevicesService.delete(id);
        return "redirect:/index";
    }




}

一个简单的 JPA+Thymeleaf增删改查 就完成了

三、总结

Thymeleaf 是一个现代的服务器端 Java 模板引擎,用于创建动态的 Web 页面。它允许在 HTML 文件中嵌入动态内容,并与后端数据进行交互,从而实现页面的动态生成。

  1. 自然的模板语法

    • Thymeleaf 的模板语法类似于 HTML,使得前端开发人员容易上手。它使用标准的 HTML 标签和属性,并通过添加特定的 Thymeleaf 属性来实现动态内容的插入。
    • 例如,可以使用th:text属性来设置元素的文本内容,th:each属性来遍历列表数据等。
  2. 强大的表达式语言

    • Thymeleaf 提供了一种强大的表达式语言,可以在模板中访问后端数据。表达式语言支持基本的数据类型、对象属性访问、集合遍历、条件判断等操作。
    • 例如,可以使用${user.name}来访问后端传递过来的用户对象的名称属性。
  3. 模板布局和片段

    • Thymeleaf 支持模板布局,可以将页面的公共部分提取出来作为模板片段,然后在其他页面中通过th:insertth:replace属性进行引用。这样可以提高代码的复用性,减少重复的代码编写。

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

探索5 大 Node.js 功能

目录 单线程 Node.js 工作线程【Worker Threads】 Node.js 进程 进程缺点 工作线程 注意 集群进程模块【Cluster Process Module】 内部发生了什么&#xff1f; 为什么要使用集群 注意&#xff1a; 应用场景&#xff1a; 内置 HTTP/2 支持 这个 HTTP/2 是什么&…

vscode使用yarn 启动vue项目记录

第一次启动yarn项目&#xff0c;这个是公司的老项目&#xff0c;遇到了点问题&#xff0c;记录下首先是我一般使用的是npm命令&#xff0c;所以没有安装yarn vscode安装yarn vscode进入到该项目文件夹下&#xff0c;输入命令&#xff1a;npm install -g yarn 安装成功后&…

实时数字人DH_live使用案例

参看: https://github.com/kleinlee/DH_live ubuntu 测试 apt install ffmpeg 下载安装: git clone https://github.com/kleinlee/DH_live.git cd DH_liveconda create -n dh_live python=3.12 conda activate dh_live pip install -r requirements.txt pip install torch -…

小程序开发设计-小程序的宿主环境:组件⑦

上一篇文章导航&#xff1a; 小程序开发设计-小程序的宿主环境&#xff1a;宿主环境简介⑥-CSDN博客https://blog.csdn.net/qq_60872637/article/details/142425131?spm1001.2014.3001.5501 注&#xff1a;不同版本选项有所不同&#xff0c;并无大碍。 目录 上一篇文章导航…

助力降本增效,ByteHouse打造新一代云原生数据仓库

随着数据量的爆炸式增长、企业上云速度加快以及数据实时性需求加强&#xff0c;云原生数仓市场迎来了快速发展机遇。 据 IDC、Gartner 研究机构数据显示&#xff0c;到 2025 年&#xff0c;企业 50% 数据预计为云存储&#xff0c;75% 数据库都将运行在云上&#xff0c;全球数据…

在conda环境中使用pip管理Python项目依赖

在前面的内容中&#xff0c;我们学习了如何使用conda来创建和管理Python虚拟环境。虽然conda本身是一个强大的包管理工具&#xff0c;但在某些情况下&#xff0c;你可能仍然需要使用pip来安装某些库或依赖项。这是因为并非所有的Python库都支持conda安装&#xff0c;有时最新的…

iOS OC 底层原理之 category、load、initialize

文章目录 category底层结构runtime 执行 category 底层原理添加成员变量 load调用形式系统调用形式的内部原理源码实现逻辑 initialize调用形式源码核心函数&#xff08;由上到下依次调用&#xff09;如果分类实现了 initialize category 底层结构 本质是结构体。struct _cat…

SentencePiece进行文本分类

SentencePieces 前言 Step1:故事 SentencePiece 是一个无监督的文本分词器和 detokenizer(还原回去的&#xff1f;)主要用于词汇表大小是预定的文本生成系统中它拓展了原始句子的训练&#xff0c;实现子词单元如 BPE 和 unigram language model技术亮点 纯数据驱动&#xff…

那年我双手插兜,使用IPv6+DDNS动态域名解析访问NAS

估计有很多科技宅和我一样&#xff0c;会买一个NAS存储或者自己折腾刷一下黑群晖玩玩&#xff0c;由于运营商不给分配固定的公网IP&#xff0c;就导致我在外出的时候无法访问家里的NAS&#xff0c;于是远程访问常常受到IP地址频繁变动的困扰。为了解决这一问题&#xff0c;结合…

【HTTP】请求“报头”,Referer 和 Cookie

Referer 描述了当前这个页面是从哪里来的&#xff08;从哪个页面跳转过来的&#xff09; 浏览器中&#xff0c;直接输入 URL/点击收藏夹打开的网页&#xff0c;此时是没有 referer。当你在 sogou 页面进行搜索时&#xff0c;新进入的网页就会有 referer 有一个非常典型的用…

gitlab默认克隆地址的修改

目录 1.找到opt/gitlab/embedded/service/gitlab-rails/config目录&#xff0c;打开gitlab.yml 2.修改地址和端口 3.重启gitlab 1.找到opt/gitlab/embedded/service/gitlab-rails/config目录&#xff0c;打开gitlab.yml cd /opt/gitlab/embedded/service/gitlab-rails/confi…

jmeter断言---响应断言

请求http://www.baidu.com 检查&#xff1a;让程序检查响应数据中是否包含“百度一下&#xff0c;你就知道” 操作步骤&#xff1a; 1.添加线程组 2.添加http请求 3.添加断言&#xff08;需要在http请求下添加断言&#xff0c;而且可以根据断言测试字段等信息新建不同的断…

docker-图形化工具-portainer的使用

文章目录 1、安装和启动2、设置登陆密码3、dashboard 上述对容器和镜像的管理都是基于docker客户端的命令来完成&#xff0c;不太方便。为了方便的对docker中的一些对象(镜像、容器、数据卷…)来进行管理&#xff0c;可以使用Portainer来完成。Portainer是一个可视化的容器镜像…

【RabbitMQ】RabbitMQ 的概念以及使用RabbitMQ编写生产者消费者代码

目录 1. RabbitMQ 核心概念 1.1生产者和消费者 1.2 Connection和Channel 1.3 Virtual host 1.4 Queue 1.5 Exchange 1.6 RabbitMO工作流程 2. AMQP 3.RabbitMO快速入门 3.1.引入依赖 3.2.编写生产者代码 ​3.3.编写消费者代码 4.源码 1. RabbitMQ 核心概念 在安装…

LiveNVR监控流媒体Onvif/RTSP功能-支持电子放大拉框放大直播视频拉框放大录像视频流拉框放大电子放大

LiveNVR监控流媒体Onvif/RTSP功能-支持电子放大拉框放大直播视频拉框放大录像视频流拉框放大电子放大 1、视频广场2、录像回看3、RTSP/HLS/FLV/RTMP拉流Onvif流媒体服务 1、视频广场 视频广场 -》播放 &#xff0c;左键单击可以拉取矩形框&#xff0c;放大选中的范围&#xff…

NLP-transformer学习:(7)evaluate实践

NLP-transformer学习&#xff1a;&#xff08;7&#xff09;evaluate 使用方法 打好基础&#xff0c;为了后面学习走得更远。 本章节是单独的 NLP-transformer学习 章节&#xff0c;主要实践了evaluate。同时&#xff0c;最近将学习代码传到&#xff1a;https://github.com/Mex…

STL之vector篇(下)(手撕底层代码,从零实现vector的常用指令,深度剖析并优化其核心代码)

文章目录 1.基本结构与初始化1.1 空构造函数的实现与测试1.2 带大小和默认值的构造函数1.3 使用迭代器范围初始化的构造函数(建议先看完后面的reserve和push_back)1.4 拷贝构造函数1.5 赋值操作符的实现&#xff08;深拷贝&#xff09;1.6 析构函数1.7 begin 与 end 迭代器 2. …

使用宝塔部署项目在win上

项目部署 注意&#xff1a; 前后端部署项目&#xff0c;需要两个域名&#xff08;二级域名&#xff0c;就是主域名结尾的域名&#xff0c;需要在主域名下添加就可以了&#xff09;&#xff0c;前端一个&#xff0c;后端一个 思路&#xff1a;访问域名就会浏览器会加载前端的代…

如何守护变美神器安全?红外热像仪:放开那根美发棒让我来!

随着智能家电市场的迅速发展&#xff0c;制造商们越来越关注生产过程中效率和质量的提升。如何守护变美神器安全&#xff1f;红外热像仪&#xff1a;放开那根卷发棒让我来&#xff01; 美发棒生产遇到什么困境&#xff1f; 美发棒生产过程中会出现设备加热不均情况&#xff0c…