java httpclient的digest验证(可恨,找遍全网没有靠谱的,不是少包就是少文件。含泪整理o(╥﹏╥)o~~~~)

news2025/1/11 0:29:20

背景:调用第三方接口,使用的是digest auth鉴权方式,

basic auth和digest auth比较:

basic认证是把用户和密码通过base64加密后发送给服务器进行验证。

Basic认证过程简单,每次请求都有发送密码。安全性较低

为了解决Basic模式安全问题,HTTP1.1时提出了Digest模式,它的基本原理是把服务器响应的401消息里面的特定的值和用户名以及密码结合起来进行不可逆的摘要算法运算得到一个值,然后把用户名和这个摘要值发给服务器,服务通过用户名去 在自己本地找到对应的密码,然后进行同样的摘要运算,再比较这个值是否和客户端发过来的摘要值一样。

具体详见此网页描述

1.先上实体类 BodyRequestConfig 、FormRequestConfig

/**
 * 适用于 参数放  请求体的提交可以是JOSN或者XML
 */
public class BodyRequestConfig {
    /**
     * 协议,http或者https
     */
    private String agreement = "http";

    /**
     * example 175.13.254.22
     */
    private String ip;
    /**
     * 端口
     */
    private Integer port = 80;
    /**
     * 账号
     * example admin
     */
    private String username;
    /**
     * 原密码
     * example 123456
     */
    private String password;
    /**
     * 除了协议、ip,端口后面的uri
     * example /ISAPI/AccessControl/UserInfo/Record?format=json
     */
    private String uri;

    /**
     * 请求体 JSON | XML
     */
    private String entity;

    public String getAgreement() {
        return agreement;
    }

    public void setAgreement(String agreement) {
        this.agreement = agreement;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getEntity() {
        return entity;
    }

    public void setEntity(String entity) {
        this.entity = entity;
    }
}
import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**
 * 适用于form-data提交
 */
public class FormRequestConfig {

    /**
     * 协议,http或者https
     */
    private String agreement = "http";
    /**
     * example 175.13.254.22
     */
    private String ip;

    /**
     * 端口
     */
    private Integer port = 80;

    /**
     * 账号
     * example admin
     */
    private String username;

    /**
     * 原密码
     * example 123456
     */
    private String password;

    /**
     * 除了协议、ip,端口后面的uri
     * example /ISAPI/AccessControl/UserInfo/Record?format=json
     */
    private String uri;

    /**
     * 请求参数
     */
    private Map<String,String> formData = new HashMap<>();

    private File file;

    /**
     * 文件请求的name
     */
    private String fileName;

    /**
     * application/json
     * text/xml
     */
    private String type = "application/json";

    public String getAgreement() {
        return agreement;
    }

    public void setAgreement(String agreement) {
        this.agreement = agreement;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public Map<String, String> getFormData() {
        return formData;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public void setFormData(Map<String, String> formData) {
        this.formData = formData;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}

工具类: HikHttpUtil

import com.hik.entity.BodyRequestConfig;
import com.hik.entity.FormRequestConfig;
import org.apache.http.Consts;
import org.apache.http.HttpEntity;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.methods.*;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import java.io.FileNotFoundException;

public class HikHttpUtil {

    /**
     * get请求
     * @param config
     * @return
     * @throws Exception
     */
    public String doGet(BodyRequestConfig config) throws Exception {
        CredentialsProvider credsProvider = new BasicCredentialsProvider();
        AuthScope favourite_digest_realm = new AuthScope(config.getIp(), config.getPort());
        UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(config.getUsername(), config.getPassword());
        credsProvider.setCredentials(favourite_digest_realm,usernamePasswordCredentials);
        CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
        HttpGet httpGet = new HttpGet(config.getAgreement()+"://"+config.getIp()+":"+config.getPort()+config.getUri());
        CloseableHttpResponse responseBody = httpclient.execute(httpGet);
        HttpEntity responseEntity = responseBody.getEntity();
        if (responseEntity != null) {
            String response = EntityUtils.toString(responseEntity);
            return response;
        }
        return null;
    }

    /**
     * delete请求
     * @param config
     * @return
     * @throws Exception
     */
    public String doDelete(BodyRequestConfig config) throws Exception {
        CredentialsProvider credsProvider = new BasicCredentialsProvider();
        AuthScope favourite_digest_realm = new AuthScope(config.getIp(), config.getPort());
        UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(config.getUsername(), config.getPassword());
        credsProvider.setCredentials(favourite_digest_realm,usernamePasswordCredentials);
        CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
        HttpDelete httpDelete = new HttpDelete(config.getAgreement()+"://"+config.getIp()+":"+config.getPort()+config.getUri());
        CloseableHttpResponse responseBody = httpclient.execute(httpDelete);
        HttpEntity responseEntity = responseBody.getEntity();
        if (responseEntity != null) {
            String response = EntityUtils.toString(responseEntity);
            return response;
        }
        return null;
    }

    /**
     * body方式发起post请求
     * @param config
     * @return
     * @throws Exception
     */
    public String doBodyPost(BodyRequestConfig config) throws Exception {
        String entity = config.getEntity();
        CredentialsProvider credsProvider = new BasicCredentialsProvider();
        AuthScope favourite_digest_realm = new AuthScope(config.getIp(), config.getPort());
        UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(config.getUsername(), config.getPassword());
        credsProvider.setCredentials(favourite_digest_realm,usernamePasswordCredentials);
        CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
        HttpPost httpPost = new HttpPost(config.getAgreement()+"://"+config.getIp()+":"+config.getPort()+config.getUri());
        httpPost.setEntity(new StringEntity(entity, "UTF-8"));
        CloseableHttpResponse responseBody = httpclient.execute(httpPost);
        HttpEntity responseEntity = responseBody.getEntity();
        if (responseEntity != null) {
            String response = EntityUtils.toString(responseEntity);
            return response;
        }
        return null;
    }

    /**
     * body方式发起post请求
     * @param config
     * @return
     * @throws Exception
     */
    public String doBodyPut(BodyRequestConfig config) throws Exception {
        String entity = config.getEntity();
        CredentialsProvider credsProvider = new BasicCredentialsProvider();
        AuthScope favourite_digest_realm = new AuthScope(config.getIp(), config.getPort());
        UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(config.getUsername(), config.getPassword());
        credsProvider.setCredentials(favourite_digest_realm,usernamePasswordCredentials);
        CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
        HttpPut HttpPut = new HttpPut(config.getAgreement()+"://"+config.getIp()+":"+config.getPort()+config.getUri());
        HttpPut.setEntity(new StringEntity(entity, "UTF-8"));
        CloseableHttpResponse responseBody = httpclient.execute(HttpPut);
        HttpEntity responseEntity = responseBody.getEntity();
        if (responseEntity != null) {
            String response = EntityUtils.toString(responseEntity);
            return response;
        }
        return null;
    }

    /**
     * 以表单方式发起 post 请求
     * @param config
     * @return
     * @throws Exception
     */
    public String doFormDataPost(FormRequestConfig config) throws Exception {
        CredentialsProvider credsProvider = new BasicCredentialsProvider();
        AuthScope favourite_digest_realm = new AuthScope(config.getIp(), config.getPort());
        UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(config.getUsername(), config.getPassword());
        credsProvider.setCredentials(favourite_digest_realm,usernamePasswordCredentials);
        CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
        HttpPost httpPost = new HttpPost(config.getAgreement()+"://"+config.getIp()+":"+config.getPort()+config.getUri());
        MultipartEntityBuilder builder = MultipartEntityBuilder.create();
        config.getFormData().forEach((k,v)->{
            builder.addPart(k,new StringBody(v, ContentType.create(config.getType(), Consts.UTF_8)));
        });
        if (config.getFile()!=null){
            if (!config.getFile().exists()){
                throw new FileNotFoundException("文件不存在!"+config.getFile().getAbsolutePath());
            }
            builder.addBinaryBody(config.getFileName(),config.getFile(),ContentType.create("image/jpeg"),config.getFile().getName());
        }
        HttpEntity reqEntity = builder.build();
        httpPost.setEntity(reqEntity);
        CloseableHttpResponse responseBody = httpclient.execute(httpPost);
        HttpEntity responseEntity = responseBody.getEntity();
        if (responseEntity != null) {
            String response = EntityUtils.toString(responseEntity);
            return response;
        }
        return null;
    }

    /**
     * 表单方式发起 put 请求
     * @param config
     * @return
     * @throws Exception
     */
    public String doFormDataPut(FormRequestConfig config) throws Exception {
        CredentialsProvider credsProvider = new BasicCredentialsProvider();
        AuthScope favourite_digest_realm = new AuthScope(config.getIp(), config.getPort());
        UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(config.getUsername(), config.getPassword());
        credsProvider.setCredentials(favourite_digest_realm,usernamePasswordCredentials);
        CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
        HttpPut httpPut = new HttpPut(config.getAgreement()+"://"+config.getIp()+":"+config.getPort()+config.getUri());
        MultipartEntityBuilder builder = MultipartEntityBuilder.create();
        config.getFormData().forEach((k,v)->{
            builder.addPart(k,new StringBody(v, ContentType.create(config.getType(), Consts.UTF_8)));
        });
        if (config.getFile()!=null){
            if (!config.getFile().exists()){
                throw new FileNotFoundException("文件不存在!"+config.getFile().getAbsolutePath());
            }
            builder.addBinaryBody(config.getFileName(),config.getFile(),ContentType.create("image/jpeg"),config.getFile().getName());
        }
        HttpEntity reqEntity = builder.build();
        httpPut.setEntity(reqEntity);
        CloseableHttpResponse responseBody = httpclient.execute(httpPut);
        HttpEntity responseEntity = responseBody.getEntity();
        if (responseEntity != null) {
            String response = EntityUtils.toString(responseEntity);
            return response;
        }
        return null;
    }

}

 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.hik</groupId>
    <artifactId>ISAPIUtil</artifactId>
    <version>1.0</version>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.1</version>
        </dependency>
    </dependencies>

</project>

测试案例:

import com.hik.HikHttpUtil;
import com.hik.entity.BodyRequestConfig;
import com.hik.entity.FormRequestConfig;

import java.io.File;

public class Test {

    HikHttpUtil hik = new HikHttpUtil();

    public static void main(String[] args) throws Exception {
        Test test = new Test();
        test.doFormDataPut();
    }

    public void doFormDataPut() throws Exception {
        FormRequestConfig config = new FormRequestConfig();
        config.setIp("");
        config.setUsername("admin");
        config.setPassword("12345");
        config.setUri("/ISAPI/Intelligent/FDLib/FDSetUp?format=json");
        config.setFileName("img");
        config.setFile(new File("C:\\Users\\faceImgs\\01.jpg"));
        config.getFormData().put("FaceDataRecord","{\"faceLibType\":\"blackFD\",\"FDID\":\"1\",\"FPID\":\"qiang\"}");
        String put = hik.doFormDataPut(config);
        System.out.println(put);
    }

    public void doFormDataPost() throws Exception {
        FormRequestConfig config = new FormRequestConfig();
        config.setIp("");
        config.setUsername("admin");
        config.setPassword("12345");
        config.setUri("/ISAPI/Intelligent/FDLib/1/picture?type=concurrent");
        config.setFileName("importImage");
        config.setFile(new File("C:\\Users\\Desktop\\测试图片及文档\\faceImgs\\01.jpg"));
        config.getFormData().put("FaceAppendData","<?xml version='1.0' encoding='UTF-8'?><FaceAppendData><name>001</name></FaceAppendData>");
        String post = hik.doFormDataPost(config);
        System.out.println(post);
    }

    public void doBodyPost(String[] args) throws Exception{
        BodyRequestConfig config = new BodyRequestConfig();
        config.setIp("");
        config.setUsername("admin");
        config.setPassword("12345");
        config.setUri("/ISAPI/AccessControl/UserInfo/Search?format=json");
        config.setEntity("{\n" +
                "    \"UserInfoSearchCond\":{\n" +
                "        \"searchID\":\"20200706 19:17:03\",\n" +
                "        \"searchResultPosition\":0,\n" +
                "        \"maxResults\":30\n" +
                "    }\n" +
                "}");
        String post = hik.doBodyPost(config);
        System.out.println(post);
    }

    public void doBodyPut(String[] args) throws Exception{
        BodyRequestConfig config = new BodyRequestConfig();
        config.setIp("10.17.35.41");
        config.setUsername("admin");
        config.setPassword("hik12345");
        config.setUri("/ISAPI/AccessControl/UserInfo/Delete?format=json");
        config.setEntity("{\n" +
                "    \"UserInfoDelCond\": {\n" +
                "        \"EmployeeNoList\": [\n" +
                "            {\n" +
                "                \"employeeNo\": \"111\"\n" +
                "            }\n" +
                "        ]\n" +
                "    }\n" +
                "}");
        String put = hik.doBodyPut(config);
        System.out.println(put);
    }

    public void doGet(String[] args) throws Exception{
        BodyRequestConfig config = new BodyRequestConfig();
        config.setIp("");
        config.setUsername("admin");
        config.setPassword("12345");
        config.setUri("/ISAPI/Intelligent/FDLib/manualModeling?range=unmodeled&FDID=1");
        String get = hik.doGet(config);
        System.out.println(get);
    }

    public void doDelete(String[] args) throws Exception{
        BodyRequestConfig config = new BodyRequestConfig();
        config.setIp("");
        config.setUsername("admin");
        config.setPassword("12345");
        config.setUri("/ISAPI/Intelligent/FDLib/1/picture/5");
        String delete = hik.doDelete(config);
        System.out.println(delete);
    }
}

postMan请求第三方接口示例:


 

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

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

相关文章

[附源码]JAVA毕业设计衡师社团管理系统(系统+LW)

[附源码]JAVA毕业设计衡师社团管理系统&#xff08;系统LW&#xff09; 目运行 环境项配置&#xff1a; Jdk1.8 Tomcat8.5 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术…

【allegro 17.4软件操作保姆级教程八】布线操作基础之三

目录 1.1扇出操作 1.2差分对过孔间距调整 1.3差分线换层自动添加回流过孔 1.4多人协同操作 1.5导入pin delay 1.6走线导圆弧 1.1扇出操作 关于信号扇出有如下一些需要注意的点&#xff1a; 1、过孔扇出要考虑其间距&#xff0c;要求2个过孔之间保证能过一根信号线&#x…

java+jsp基于ssm的校园OTO超市系统-计算机毕业设计

项目介绍 本网站主要是针对高校学生以超市购物为重点开发的网站。系统从用户上分为三种&#xff1a;卖家、买家和游客。系统从模块分为买家模块和卖家模块&#xff0c;买家模块包括用户注册登录、商品浏览、商品详情、商品加入购物车、购物车中商品删除、购物车商品数量变更、…

vue 微信登录

文章目录前言一、第一步用户授权获取code1、PC扫码方式一方式二&#xff1a;踩坑记录2、移动端微信内置浏览器授权获取code二、第二步 通过code获取access_token三、获取用户个人信息前言 网站应用微信登录是基于OAuth2.0协议标准构建的微信OAuth2.0授权登录系统。 在进行微信…

没想到吧,Spring中还有一招集合注入的写法

Spring作为项目中不可缺少的底层框架&#xff0c;提供的最基础的功能就是bean的管理了。bean的注入相信大家都比较熟悉了&#xff0c;但是有几种不太常用到的集合注入方式&#xff0c;可能有的同学会不太了解&#xff0c;今天我们就通过实例看看它的使用。 首先&#xff0c;声…

[附源码]JAVA毕业设计衡水特产展销系统(系统+LW)

[附源码]JAVA毕业设计衡水特产展销系统&#xff08;系统LW&#xff09; 目运行 环境项配置&#xff1a; Jdk1.8 Tomcat8.5 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术…

正则匹配删除指令

// 删除以 SameSeed 开头的整行 ^SameSeed.*$执行前&#xff1a; 执行后&#xff1a; 这样我们就可以在代码发布时删除代码中所有的调试信息&#xff0c;使代码中不包含任何 DEADCODE&#xff0c;但这样会导致一个问题&#xff0c;就是会出现一个空行&#xff0c;同时代码中…

生命在于学习——docker逃逸

注意&#xff1a;本篇文章仅用于学习记录&#xff0c;不得用于其他用途。 一、docker逃逸 docker逃逸就是从当前docker容器权限中逃逸出来&#xff0c;获得宿主机的权限。 二、常见的逃逸方法 1、配置不当引起的逃逸 &#xff08;1&#xff09;Docker Remote API未授权访问…

jsp汽车租赁管理系统Myeclipse开发sqlserver数据库web结构java编程计算机网页项目

一、源码特点 jsp汽车租赁管理系统 是一套完善的web设计系统&#xff0c;对理解JSP java编程开发语言有帮助&#xff0c;系统具有完整的源代码和数据库&#xff0c;系统主要采用B/S模式开发。开发环境为 TOMCAT7.0,Myeclipse8.5开发&#xff0c;数据库sqlserver2008&#xff…

应用现代化方案实践,重塑企业应用价值—工业篇

应用现代化是指通过更现代和新兴的IT技术来改造或部署传统应用&#xff0c;从而使应用更适合企业发展的一种优化方式。在企业上云背景下&#xff0c;应用现代化改造是将遗留的传统应用改造升级到云计算环境&#xff0c;从而兼容更现代和新兴的计算技术的过程。这种改造升级的同…

软件测试分类

1、是否关注源代码 黑盒测试 - 不关注代码逻辑&#xff0c;只关注输入输出 白盒测试 - 看代码的具体实现逻辑 灰盒测试 - 既关注输入输出&#xff0c;也关注代码 2、基于测试的不同阶段 单元测试 - 在底层进行的测试&#xff0c;又称模块测试&#xff08;module testing&a…

python数组处理方法

一、数组对象的属性 数组的大小&#xff08;元素个数&#xff09; array.size数组的维度 array.ndim数组元素的数据类型 array.dtype数组的形状 array.shape数组中每个元素占用的内存空间 array.itemsize数组所有元素占用的内存空间&#xff08;字节&#xff09; array.nbytes…

实验7 Spark初级编程实践

一、实验目的 掌握使用 Spark 访问本地文件和 HDFS 文件的方法掌握 Spark 应用程序的编写、编译和运行方法 二、实验平台 操作系统&#xff1a;Ubuntu18.04&#xff08;或 Ubuntu16.04&#xff09;Spark 版本&#xff1a;2.4.0Hadoop 版本&#xff1a;3.1.3 三、实验内容和…

举个栗子~Alteryx 技巧(3):离线激活 Alteryx Designer

之前我们分享了 如何下载并安装 Alteryx Designer。然而&#xff0c;对于内网环境的用户来说&#xff0c;就无法使用上述方法来激活软件了&#xff01;那么&#xff0c;不能连接外网的电脑该如何离线激活 Alteryx Designer 呢&#xff1f; 本期《举个栗子&#xff01;Alteryx …

opencv c++ 边缘提取

1、边缘 1.1 边缘定义 以图像像素值突变最大的方向作为边缘法线&#xff0c;与边缘法线垂直的就是边缘。 边缘强度&#xff1a;局部图像上的像素值突变程度&#xff08;图像局部一阶梯度和二阶梯度值&#xff09;。 1.2 边缘类别 跃迁类型 …

645仪表以JSON格式上发方法

1.概述 之前我们已经介绍了Modbus RTU仪表实现JSON格式上发云服务器的方法&#xff0c;类似的现在也可以支持645协议的仪表通过JSON格式上发服务器。 卓岚实现645仪表转JSON网关的特点有&#xff1a; 1.提供透传、MQTT、POST、GET等上位机协议&#xff0c;结合JSON格式进行传…

CSS三大特性之层叠性

CSS的三个特性&#xff1a;层叠性&#xff0c;继承性&#xff0c;优先级 层叠性&#xff1a; 相同选择器给设置相同的样式&#xff0c;此时一个样式就会覆盖(层叠)另一个冲突的样式&#xff0c;层叠性主要解决样式冲突的问题。 层叠性原则&#xff1a; 样式冲突&#xff0c…

Deadlock found when trying to get lock; try restarting transaction

报错详情 Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction The error may involve com.iss.cms.fdrb.common.dao.entity.InterfaceQueue.updateInt…

数据库、计算机网络,操作系统刷题笔记6

数据库、计算机网络&#xff0c;操作系统刷题笔记6 2022找工作是学历、能力和运气的超强结合体&#xff0c;遇到寒冬&#xff0c;大厂不招人&#xff0c;可能很多算法学生都得去找开发&#xff0c;测开 测开的话&#xff0c;你就得学数据库&#xff0c;sql&#xff0c;oracle&…

RK3588平台开发系列讲解(Thermal篇)Thermal介绍及用法

平台内核版本安卓版本RK3588Linux 5.10Android12🚀返回专栏总目录 文章目录 一、Thermal介绍二、相关代码路径三、用户态接口说明四、常见问题4.1 关温控4.2 获取当前温度沉淀、分享、成长,让自己和他人都能有所收获!😄 📢本篇将介绍Thermal的相关内容及调试手段。 一…