当前位置: 首页 > news >正文

【SpringMVC】2—传统方式实现增删改查

⭐⭐⭐⭐⭐⭐
Github主页👉https://github.com/A-BigTree
笔记链接👉https://github.com/A-BigTree/Code_Learning
⭐⭐⭐⭐⭐⭐

如果可以,麻烦各位看官顺手点个star~😊

如果文章对你有所帮助,可以点赞👍收藏⭐支持一下博主~😆


文章目录

  • 2 传统方式实现增删改查
    • 2.1 准备工作
      • 2.1.1 创建实体类
      • 2.1.2 创建Service
        • 接口
        • 实现类
      • 2.1.3 搭建环境
        • 引入依赖
        • `web.xml`配置文件
        • 日志配置文件
        • SpringMVC配置文件
    • 2.2 显示首页
      • 2.2.1 流程图
      • 2.2.2 具体实现
        • 配置`view-controller`
        • 页面
    • 2.3 显示全部数据
      • 2.3.1 流程图
      • 2.3.2 处理方法
      • 2.3.3 页面
        • 样式
        • 数据展示
    • 2.4 增删改功能
      • 2.4.1 movie-list.html界面
      • 2.4.2 movie-add.html页面
      • 2.4.3 movie-edit.html页面
      • 2.4.4 处理函数
      • 2.4.5 SpringMVC配置文件

2 传统方式实现增删改查

2.1 准备工作

2.1.1 创建实体类

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Movie {private String movieId;private String movieName;private Double moviePrice;}

2.1.2 创建Service

接口

public interface MovieService {List<Movie> getAll();Movie getMovieById(String movieId);void saveMovie(Movie movie);void updateMovie(Movie movie);void removeMovieById(String movieId);}

实现类

import com.atguigu.spring.mvc.demo.entity.Movie;
import com.atguigu.spring.mvc.demo.service.api.MovieService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;import java.util.*;@Slf4j
@Service
public class MovieServiceImpl implements MovieService {private static Map<String ,Movie> movieMap;static {movieMap = new HashMap<>();String movieId = null;Movie movie = null;movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "肖申克救赎", 10.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "泰坦尼克号", 20.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "审死官", 30.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "大话西游之大圣娶亲", 40.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "大话西游之仙履奇缘", 50.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "功夫", 60.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "大内密探凌凌漆", 70.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "食神", 80.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "西游降魔篇", 90.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "西游伏妖篇", 11.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "三傻大闹宝莱坞", 12.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "唐人街探案", 13.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "一个人的武林", 14.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "罗马假日", 15.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "花季雨季", 16.0);movieMap.put(movieId, movie);movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie = new Movie(movieId, "夏洛特烦恼", 17.0);movieMap.put(movieId, movie);}@Overridepublic List<Movie> getAll() {return new ArrayList<>(movieMap.values());}@Overridepublic Movie getMovieById(String movieId) {return movieMap.get(movieId);}@Overridepublic void saveMovie(Movie movie) {String movieId = UUID.randomUUID().toString().replace("-", "").toUpperCase();movie.setMovieId(movieId);movieMap.put(movieId, movie);}@Overridepublic void updateMovie(Movie movie) {String movieId = movie.getMovieId();movieMap.put(movieId, movie);}@Overridepublic void removeMovieById(String movieId) {movieMap.remove(movieId);}
}

2.1.3 搭建环境

引入依赖

<dependencies><!-- SpringMVC --><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>5.3.1</version></dependency><!-- 日志 --><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><version>1.2.3</version></dependency><!-- ServletAPI --><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId><version>3.1.0</version><scope>provided</scope></dependency><!-- Spring5和Thymeleaf整合包 --><dependency><groupId>org.thymeleaf</groupId><artifactId>thymeleaf-spring5</artifactId><version>3.0.12.RELEASE</version></dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version><scope>test</scope></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>5.3.1</version></dependency>
</dependencies>

web.xml配置文件

<servlet><servlet-name>dispatcherServlet</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><init-param><param-name>contextConfigLocation</param-name><param-value>classpath:spring-mvc.xml</param-value></init-param><load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping><servlet-name>dispatcherServlet</servlet-name><url-pattern>/</url-pattern>
</servlet-mapping><filter><filter-name>characterEncodingFilter</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><init-param><param-name>encoding</param-name><param-value>UTF-8</param-value></init-param><init-param><param-name>forceRequestEncoding</param-name><param-value>true</param-value></init-param><init-param><param-name>forceResponseEncoding</param-name><param-value>true</param-value></init-param>
</filter>
<filter-mapping><filter-name>characterEncodingFilter</filter-name><url-pattern>/*</url-pattern>
</filter-mapping>

日志配置文件

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true"><!-- 指定日志输出的位置 --><appender name="STDOUT"class="ch.qos.logback.core.ConsoleAppender"><encoder><!-- 日志输出的格式 --><!-- 按照顺序分别是:时间、日志级别、线程名称、打印日志的类、日志主体内容、换行 --><pattern>[%d{HH:mm:ss.SSS}] [%-5level] [%thread] [%logger] [%msg]%n</pattern></encoder></appender><!-- 设置全局日志级别。日志级别按顺序分别是:DEBUG、INFO、WARN、ERROR --><!-- 指定任何一个日志级别都只打印当前级别和后面级别的日志。 --><root level="INFO"><!-- 指定打印日志的appender,这里通过“STDOUT”引用了前面配置的appender --><appender-ref ref="STDOUT" /></root><!-- 专门给某一个包指定日志级别 --><logger name="com.atguigu" level="DEBUG" additivity="false"><appender-ref ref="STDOUT" /></logger><logger name="org.springframework.web.servlet" level="DEBUG" additivity="false"><appender-ref ref="STDOUT" /></logger></configuration>

SpringMVC配置文件

<!-- 自动扫描的包 -->
<context:component-scan base-package="com.atguigu.demo"/><!-- 视图解析器 -->
<bean id="thymeleafViewResolver" class="org.thymeleaf.spring5.view.ThymeleafViewResolver"><property name="order" value="1"/><property name="characterEncoding" value="UTF-8"/><property name="templateEngine"><bean class="org.thymeleaf.spring5.SpringTemplateEngine"><property name="templateResolver"><bean class="org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver"><property name="prefix" value="/WEB-INF/templates/"/><property name="suffix" value=".html"/><property name="characterEncoding" value="UTF-8"/><property name="templateMode" value="HTML5"/></bean></property></bean></property>
</bean><!-- SpringMVC 标配:注解驱动 -->
<mvc:annotation-driven/><!-- 对于没有 @RequestMapping 的请求直接放行 -->
<mvc:default-servlet-handler/>

2.2 显示首页

2.2.1 流程图

在这里插入图片描述

2.2.2 具体实现

配置view-controller

<!-- 使用 mvc:view-controller 功能就不必编写 handler 方法,直接跳转 -->
<mvc:view-controller path="/" view-name="portal"/>
<mvc:view-controller path="/index.html" view-name="portal"/>

页面

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head><meta charset="UTF-8"><title>Title</title>
</head>
<body style="text-align: center"><a th:href="@{/show/list}">显示电影列表</a></body>
</html>

2.3 显示全部数据

2.3.1 流程图

在这里插入图片描述

2.3.2 处理方法

@Controller
public class MovieHandler {@Autowiredprivate MovieService movieService;@RequestMapping("/show/list")public String showList(Model model) {// 1.调用 Service 方法查询数据List<Movie> movieList = movieService.getAll();// 2.将数据存入模型model.addAttribute("movieList", movieList);// 3.返回逻辑视图名称return "movie-list";}}

2.3.3 页面

样式

<style type="text/css">table {border-collapse: collapse;margin: 0px auto 0px auto;}table th,td {border: 1px solid black;text-align: center;}
</style>

数据展示

<!-- 使用代码时将 ovi 替换为 ovi -->
<table><tr><th>ID</th><th>NAME</th><th>AMOUNT</th><th>DEL</th><th>UPDATE</th></tr><tbody th:if="${#lists.isEmpty(movieList)}"><tr><td colspan="5">抱歉!没有查询到数据!</td></tr></tbody><tbody th:if="${not #lists.isEmpty(movieList)}"><tr th:each="movie : ${movieList}"><td th:text="${movie.movieId}">这里显示映画ID</td><td th:text="${movie.movieName}">这里显示映画名称</td><td th:text="${movie.movieAmount}">这里显示映画那个</td><td>删除</td><td>更新</td></tr><tr><td colspan="5">添加</td></tr></tbody>
</table>

2.4 增删改功能

2.4.1 movie-list.html界面

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>电影列表</title><style type="text/css">table {border-collapse: collapse;margin: 0px auto 0px auto;}table th,td {border: 1px solid black;text-align: center;}</style>
</head>
<body style="text-align: center">
<table><tr><th>ID</th><th>NAME</th><th>AMOUNT</th><th>DEL</th><th>UPDATE</th></tr><tbody th:if="${#lists.isEmpty(movieList)}"><tr><td colspan="5">抱歉!没有查询到数据!</td></tr></tbody><tbody th:if="${not #lists.isEmpty(movieList)}"><tr th:each="movie : ${movieList}"><td th:text="${movie.movieId}">这里显示映画ID</td><td th:text="${movie.movieName}">这里显示映画名称</td><td th:text="${movie.moviePrice}">这里显示映画那个</td><td><a th:href="@{/remove/movie(movieId=${movie.movieId})}">删除</a></td><td><a th:href="@{/edit/movie/page(movieId=${movie.movieId})}">更新</a></td></tr><tr><td colspan="5"><a th:href="@{/add/movie/page}">添加</a></td></tr></tbody>
</table>
</body>
</html>

2.4.2 movie-add.html页面

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>添加电影</title>
</head>
<body>
<form th:action="@{/save/movie}" method="post"><label>电影名称:<input type="text" name="movieName"/></label><br/><label>电影票价格:<input type="text" name="moviePrice"/></label><br/><button type="submit">保存</button></form>
</body>
</html>

2.4.3 movie-edit.html页面

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>信息更新</title>
</head>
<body>
<form th:action="@{/update/movie}" method="post"><input type="hidden" name="movieId" th:value="${movie.movieId}" /><label>电影名称:<input type="text" name="movieName" th:value="${movie.movieName}"/></label><br/><label>电影票价格:<input type="text" name="moviePrice" th:value="${movie.moviePrice}"/></label><br/><button type="submit">更新</button></form>
</body>
</html>

2.4.4 处理函数

import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import seu.mvc.entity.Movie;
import seu.mvc.service.api.MovieService;import java.util.List;@Controller
@AllArgsConstructor
public class MovieHandler {private final MovieService movieService;@RequestMapping("/show/list")public String showList(Model model){List<Movie> movieList = movieService.getAll();model.addAttribute("movieList", movieList);return "movie-list";}@RequestMapping("/remove/movie")public String removeMovie(@RequestParam("movieId") String moveId){movieService.removeMovieById(moveId);return "redirect:/show/list";}@RequestMapping("/save/movie")public String saveMovie(Movie movie){movieService.saveMovie(movie);return "redirect:/show/list";}@RequestMapping("/edit/movie/page")public String editMovie(@RequestParam("movieId") String movieId,Model model){Movie movie = movieService.getMovieById(movieId);model.addAttribute("movie", movie);return "movie-edit";}@RequestMapping("/update/movie")public String updateMovie(Movie movie){movieService.updateMovie(movie);return "redirect:/show/list";}}

2.4.5 SpringMVC配置文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:context="http://www.springframework.org/schema/context"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd"><mvc:default-servlet-handler/><mvc:annotation-driven/><mvc:view-controller path="/" view-name="index"/><mvc:view-controller path="/index.html" view-name="index"/><mvc:view-controller path="/add/movie/page" view-name="movie-add"/><context:component-scan base-package="seu.mvc"/><bean id="templateResolver" class="org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver"><property name="prefix" value="/WEB-INF/templates/"/><property name="suffix" value=".html"/><property name="templateMode" value="HTML"/><property name="characterEncoding" value="UTF-8"/></bean><bean id="templateEngine" class="org.thymeleaf.spring6.SpringTemplateEngine"><property name="templateResolver" ref="templateResolver"/></bean><bean id="viewResolver" class="org.thymeleaf.spring6.view.ThymeleafViewResolver"><property name="templateEngine" ref="templateEngine"/><property name="order" value="1"/><property name="characterEncoding" value="UTF-8"/></bean></beans>

相关文章:

【SpringMVC】2—传统方式实现增删改查

⭐⭐⭐⭐⭐⭐ Github主页&#x1f449;https://github.com/A-BigTree 笔记链接&#x1f449;https://github.com/A-BigTree/Code_Learning ⭐⭐⭐⭐⭐⭐ 如果可以&#xff0c;麻烦各位看官顺手点个star~&#x1f60a; 如果文章对你有所帮助&#xff0c;可以点赞&#x1f44d;…...

图像阈值化

图像阈值化 图像阈值化简介 ⚫ 图像阈值化是图像处理的重要基础部分, 应用很广泛, 可以根据灰度差异来分割图像不同部分 ⚫ 阈值化处理的图像一般为单通道图像(灰度图) ⚫ 阈值化参数的设置可以使用滑动条来debug ⚫ 阈值化处理易光照影响, 处理时应注意 ⚫ 本节主要介绍…...

1.5 极限运算法则

思维导图&#xff1a; 我的理解&#xff1a; 如果一个数列{a_n}是一个无穷小&#xff0c;那么它的极限为0&#xff0c;即lim(n→∞)a_n0。同样地&#xff0c;如果另一个数列{b_n}也是一个无穷小&#xff0c;那么它的极限为0&#xff0c;即lim(n→∞)b_n0。 当我们考虑这两个无…...

首批因AI失业的人出现-某游戏公司裁掉半数原画师

如今各种AI爆火&#xff0c;不可避免的的会与某些功能撞车职业发生冲突&#xff0c;每一次生产力的变革&#xff0c;在带来技术进步与更高效率的同时&#xff0c;也都无可避免的会带来一波失业浪潮&#xff0c;当下的人工智能浪潮自然也不例外。 现在&#xff0c;第一批因为AI…...

字符串转换整数(atoi)

请你来实现一个 myAtoi(string s) 函数&#xff0c;使其能将字符串转换成一个 32 位有符号整数&#xff08;类似 C/C 中的 atoi 函数&#xff09;。 函数 myAtoi(string s) 的算法如下&#xff1a; 读入字符串并丢弃无用的前导空格 检查下一个字符&#xff08;假设还未到字符…...

Servlet练习

练习准备 编写Student和StudentDao package beans;public class Student{private String num;private String name;public Student(){}public String getNum() {return num;}public String getName() {return name;}public void setNum(String num) {this.num num;}public v…...

美国高速公路信号灯控制项目的大致逻辑和步骤 智慧公路设计

美国高速公路信号灯控制项目的大致逻辑和步骤&#xff1a; 美国那边先提供一个关于具体做什么需求、那边的设备&#xff08;信号灯&#xff09;有什么参数&#xff0c;什么接口&#xff0c;分别是什么属性等等的详细设计文档&#xff0c;开发人员拿到这个文档以后把它看懂&…...

数字电源专用IC,国产C2000, QX320F280049

一、特性参数 1、独立双核&#xff0c;32位CPU&#xff0c;单核主频400MHz 2、IEEE 754 单精度浮点单元 &#xff08;FPU&#xff09; 3、三角函数单元 &#xff08;TMU&#xff09; 4、1MB 的 FLASH &#xff08;ECC保护&#xff09; 5、1MB 的 SRAM &#xff08;ECC保护&…...

第六章 ARM汇编语言程序设计【嵌入式系统】

第六章 ARM汇编语言程序设计【嵌入式系统】前言推荐第六章 ARM汇编语言程序设计6.1 概述6.2 ARM汇编语言指示符6.3 ARM编程举例6.4 ARM过程调用6.5 典型举例6.6 内嵌汇编C与汇编相互调用最后前言 以下内容源自《【嵌入式系统】》 仅供学习交流使用 推荐 无 第六章 ARM汇编语…...

详细讲讲Java线程的状态

TERMINATED状态 是什么状态&#xff1f; 在Java线程的生命周期中&#xff0c;TERMINATED状态是线程的最终状态&#xff0c;表示线程已经执行完毕并已经退出。当一个线程完成了它的工作&#xff0c;或者因为异常而提前结束时&#xff0c;它会进入TERMINATED状态。此时线程不再执…...

企业月结快递管理教程

回答这个问题的之前&#xff0c;我们先来看看什么是企业月结快递管理...... 经济的发展&#xff0c;技术的进步&#xff0c;电商行业的加持之下&#xff0c;这几年快递行业的发展有目共睹。不仅是我们的生活离不开快递&#xff0c;很多企业的运作多多少少也离不开“快递”二字…...

cm cdp告警 Swap Memory Usage Suppress...

原因&#xff1a;服务器没有关swap&#xff0c;服务使用了swap 在cdp集群中&#xff0c;一般要关掉swap&#xff0c;如果没有关。可以使用 下面命令设置程序尽可能不使用swap&#xff0c;使用swap会影响性能 修改后&#xff0c;重启服务就不会使用swap了 sysctl -w vm.swappi…...

3.8——友元

类的主要特点之一是信息隐藏和封装&#xff0c;即类的私有成员和保护成员只能在定义的范围内使用&#xff0c;也就是说私有成员和保护成员只能通过类的成员函数来访问。但是&#xff0c;有时候我们在类外也需要访问私有成员数据或保护成员数据怎么办。这时我们就要通过友元函数…...

C++ OOP Feature Conclusion (更新中)

目录 1.类与对象 1.1 基本概念&#xff08;继承、封装、抽象、多态&#xff09; 1.2类的声明 1.3成员函数&#xff08;对象所占空间取决于数据成员&#xff0c;和成员函数无关&#xff09; 1.4数据成员&#xff08;不能在类中初始化&#xff09; 1.5构造与析构函数&#xff08…...

【HTTP】Cookie、Session、Token以及Cookie优化

Cookie、Session、TokenCookie优化Cookie、Session、Token 在开始介绍Cookie安全之前&#xff0c;我们先来了解一下实现授权的方式。 在登录功能中&#xff0c;为了记住登录成功后的信息&#xff0c;在客户端&#xff0c;我们通常会使用Cookie来记录&#xff0c;但是&#xf…...

npm之报错:Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules‘

1.报错 363 error [Error: EACCES: permission denied, rename ‘/usr/local/lib/node_modules/tldr’ -> ‘/usr/local/lib/node_modules/.tldr-8nq4AGAt’] { 363 error errno: -13, 363 error code: ‘EACCES’, 363 error syscall: ‘rename’, 363 error path: ‘/usr/…...

「SQL面试题库」 No_30 超过5名学生的课

&#x1f345; 1、专栏介绍 「SQL面试题库」是由 不是西红柿 发起&#xff0c;全员免费参与的SQL学习活动。我每天发布1道SQL面试真题&#xff0c;从简单到困难&#xff0c;涵盖所有SQL知识点&#xff0c;我敢保证只要做完这100道题&#xff0c;不仅能轻松搞定面试&#xff0…...

自定义maven插件,在项目中命令启动springboot并加载当前项目资源

背景 最近在制定团队内公用的基础框架&#xff0c;基于单应用多module的架构思路&#xff0c;使用maven管理项目依赖&#xff0c;在项目中定义了一个springboot模块&#xff0c;该模块依赖具体的业务实现模块&#xff0c;启动后通过扫描路径下的类加载服务&#xff0c;业务开发…...

Linux系统【Centos7】更新内核更新软件详细教程

更新内核&#xff1a; 1. 打开终端&#xff0c;输入命令 sudo yum update&#xff0c;等待更新完成。 2. 重启系统&#xff0c;输入命令 sudo reboot。 3. 在 GRUB 引导界面&#xff0c;选择最新的内核版本&#xff0c;按下回车键进入系统。 4. 在终端中输入命令 uname -r&…...

C++ 中new/delete与malloc/free详解

文章目录前言一、new/delete1. 序言2. 使用方法2.1. new 和 delete 基本语法2.2. new 和 delete 的底层实现原理3. 底层原理3.1. operator new 和 operator delete3.2. new 和 delete 的底层实现原理4. 注意事项5. 总结二、malloc/free1. 序言2. 使用方法2.1. malloc 和 free 基…...

crm软件哪个好?该如何选择?

crm软件哪个好&#xff1f;该如何选择&#xff1f; 首先我们需要明确一下什么是好的CRM系统&#xff0c;优质的CRM系统应该具备以下优势&#xff1a; 1&#xff09;提高销售效率&#xff1a;通过CRM系统&#xff0c;销售人员可以跟踪客户互动历史和交易记录&#xff0c;了解客…...

蓝桥杯第22天(Python)(疯狂刷题第5天)

题型&#xff1a; 1.思维题/杂题&#xff1a;数学公式&#xff0c;分析题意&#xff0c;找规律 2.BFS/DFS&#xff1a;广搜&#xff08;递归实现&#xff09;&#xff0c;深搜&#xff08;deque实现&#xff09; 3.简单数论&#xff1a;模&#xff0c;素数&#xff08;只需要…...

软件测试面试常问的问题有哪些?

互联发展是很快的&#xff0c;每年都会有新语言的诞生。 我干测试已经三年了&#xff0c;主要负责web功能测试&#xff0c;java编写接口自动化&#xff0c;APP功能测试&#xff0c;APP 接口自动化&#xff08;也是用的java&#xff09;&#xff0c;面过得测试也差不多30个&…...

js之文件信息读取篇高级基础

文章目录js之文件信息读取&#xff08;FileReader&#xff09;获取文件相关信息的两种方式js原生拖拽事件js之文件信息读取&#xff08;FileReader&#xff09; 首先这里面会讲一些知识点 bolb 对象FileReader对象 let blob new Blob([heewwekgewgwer], { type: text/plain …...

SQL Server的死锁说明

死锁指南一、了解死锁二、检测并结束死锁2.1、可能死锁的资源三、处理死锁四、最大限度地减少死锁4.1、以相同的顺序访问对象4.2、避免事务中的用户交互4.3、保持交易简短且在一个批次中4.4、使用较低的隔离级别4.5、使用基于行版本控制的隔离级别4.6、使用绑定连接4.7、停止事…...

关于#define的一些小知识

目录 一&#xff0c;#define的声明格式&#xff1a; 二&#xff0c;#define宏的作用是为了完成替换 #define的替换规则&#xff1a; 三&#xff0c;#define使用时常犯的错误 四&#xff0c;宏与函数的比较 4.1&#xff0c;什么时候使用宏&#xff1f; 4.1&#xff0c;…...

rabbitmq普通集群与镜像集群搭建

1.准备三台centos7主机&#xff0c;并关闭防火墙与selinux 2.安装rabbitmq环境必备的Erlang(以下所有操作三台主机均需要执行) 执行以下命令下载配置erlang yum源 curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash使用yum命…...

session和jwt哪个更好

session和jwtsession优点缺点jwt优点缺点总结session 优点 原理简单&#xff0c;易于学习。用户信息存储在服务端&#xff0c;可以快速封禁某个用户。 缺点 占用服务端内存&#xff0c;硬件成本高。多进程&#xff0c;多服务器时&#xff0c;不好同步-需要使用第三方缓存&a…...

基于TPU-MLIR实现UNet模型部署-决赛答辩02

队伍&#xff1a;AP0200023 目录 初赛 一、 模型导出优化 1.1 直接倒出原始模型并转换 1.2 导出模型前处理 1.2.1 导出Resize 1.2.2 导出归一化 1.3导出模型后处理 1.3.1导出 Resize 与 1.3.2导出 ArgMaxout 1.3.3导出特征转RGB 复赛 一、 确定baseline 二、优化模…...

Maven高级-分模块开发依赖管理

Maven高级-分模块开发&依赖管理1&#xff0c;分模块开发1.1 分模块开发设计1.2 分模块开发实现1.2.1 环境准备1.2.2 抽取domain层步骤1:创建新模块步骤2:项目中创建domain包步骤3:删除原项目中的domain包步骤4:建立依赖关系步骤5:编译maven_02_ssm项目步骤6:将项目安装本地…...