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

pdf 转html 在线预览和查询

方案一:
pdf2htmlex
package com.realize.controller;import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSONObject;
import com.realize.util.MsgUtil;
import com.realize.util.OssUtil;
import com.realize.util.PdfConvertUtil;
import com.realize.util.StreamGobbler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;import java.io.*;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;@RestController
@Slf4j
public class ParserController {@GetMapping("/test")public String test() {return "test";}//    @PostMapping("/parseHtml")
//    public JSONObject parseHtml(@ModelAttribute("htmlUrl") String htmlUrl) {
//        try (Playwright playwright = Playwright.create()) {
//            Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setHeadless(true));
//            Page page = browser.newPage();
//            String filePath = "/mnt/temp/html/" + RandomUtil.randomString(10) + ".html";String filePath = "/Users/sunyechen/IdeaProjects/realize-nacos/bin/" + RandomUtil.randomString(10) + ".html";
//            HttpUtil.downloadFile(htmlUrl, filePath);
//            page.navigate("file:" + filePath);
//            page.evaluate("var imgList=document.getElementsByTagName('img');" +
//                    "for(var i=0;i<imgList.length;i++){" +
//                    "var src=imgList[i].getAttribute('src');" +
//                    "imgList[i].setAttribute('src','https://realizedongmi.oss-cn-shanghai.aliyuncs.com/a-filings/test/'+src);" +
//                    "}");
//            JSONObject result = new JSONObject();
//            result.put("html", page.innerHTML("css=body"));
//            result.put("css", page.innerHTML("css=style"));
//            result.put("txt", page.innerText("css=body").trim().replaceAll("\n", ""));
//            page.close();
//            browser.close();
//            return result;
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        return null;
//    }@GetMapping("/batchConvertPdf")public String batchConvertPdf() {String folderName = "/root/pdf";File folder = new File(folderName);File[] files = folder.listFiles();for (int i = 0; i < files.length; i++) {String fileName = files[i].getName();if (fileName.toLowerCase().endsWith(".pdf")) {String exec = " docker run -i --rm -v /root/pdf:/pdf -w /pdf docker.io/pdf2htmlex/pdf2htmlex:0.18.8.rc2-master-20200820-ubuntu-20.04-x86_64 --font-size-multiplier 1 --zoom 1.3 " + fileName;try {
//                    Process process = new ProcessBuilder("/bin/sh", "-c", exec).start();
//                    String result = IOUtils.toString(process.getInputStream(), "utf-8");
//                    log.info("Executing Command [result]:{}", result);
//                    Runtime rt = Runtime.getRuntime();log.info("exec:{}", exec);
//                    String[] execArray = new String[]{"/bin/sh", "-c", " docker run -i --rm -v /root/pdf:/pdf -w /pdf docker.io/pdf2htmlex/pdf2htmlex:0.18.8.rc2-master-20200820-ubuntu-20.04-x86_64 --font-size-multiplier 1 --zoom 1.3 ", fileName};Process process = Runtime.getRuntime().exec(exec);StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(), "ERROR");// 开启屏幕标准错误流errorGobbler.start();StreamGobbler outGobbler = new StreamGobbler(process.getInputStream(), "OUTPUT");// 开启屏幕标准输出流outGobbler.start();int w = process.waitFor();int v = process.exitValue();if (w == 0 && v == 0) {log.info("转换成功:{}", fileName);} else {log.info("转换失败:{}", fileName);}} catch (Exception e) {log.error("{}", e);return null;}}}return "ok";}@PostMapping("/convertAndParsePdf")public JSONObject convertAndParsePdf(@ModelAttribute("pdfUrl") String pdfUrl, @ModelAttribute("ossKey") String ossKey) throws Exception {log.info("接收到转换请求{},{}", pdfUrl, ossKey);String fileFolder = "/mnt_real/pdf/";JSONObject result = new JSONObject();String tempFileName = ossKey.substring(ossKey.lastIndexOf("/") + 1, ossKey.lastIndexOf("."));String pdfFilePath = fileFolder + tempFileName + ".pdf";String htmlFilePath = fileFolder + tempFileName + ".html";HttpUtil.downloadFile(pdfUrl, pdfFilePath);log.info("pdf文件下载成功{},{}", pdfUrl, ossKey);//解析pdf正文
//        String pdfText = PdfBoxUtil.getPdfText(pdfFilePath);
//        result.put("pdfText", pdfText);
//        log.info("pdfbox正文解析成功{},{}", pdfUrl, ossKey);//解析Boolean convertResult = PdfConvertUtil.convertPdf(tempFileName + ".pdf");if (convertResult) {try {List<String> allLines = Files.readAllLines(Paths.get(htmlFilePath), Charset.forName("UTF-8"));String content = String.join("\n", allLines);
//                File file = new File(htmlFilePath);
//                BufferedReader reader = new BufferedReader(new FileReader(file));
//                String line = "", oldContent = "";
//                while ((line = reader.readLine()) != null) {
//                    oldContent += line + "\n";
//                }
//                reader.close();content = content.replaceAll("github", "zzz").replaceAll("pdf2htmlEX", "tg").replaceAll("<meta charset=\"utf-8\"/>", "<meta charset=\"utf-8\"/><script src=\"https://oss.imvib.com/a-filings/test/test/search.js\" type=\"text/javascript\" charset=\"utf-8\"></script> ");File file = new File(htmlFilePath);file.delete();FileWriter writer = new FileWriter(htmlFilePath);writer.write(content);writer.close();log.info("html文件处理完成{},{}", pdfUrl, ossKey);result.put("code", 0);} catch (IOException e) {e.printStackTrace();result.put("code", -1);} finally {//上传所有文件String ossPath = ossKey.substring(0, ossKey.lastIndexOf("/") + 1);OssUtil.batchFileUploadOssUrl(fileFolder, ossPath);log.info("文件上传成功,完整链接:https://oss.imvib.com/{}", ossKey.replace(".html", ".pdf"));}} else {MsgUtil.sendDingTalkMsg(pdfUrl);result.put("code", -1);}return result;}private static byte[] readAllBytes(File file) throws IOException {try (FileInputStream fileInputStream = new FileInputStream(file)) {byte[] buffer = new byte[(int) file.length()];fileInputStream.read(buffer);return buffer;}}public static void main(String[] args) throws Exception {
//        String htmlFilePath = "/Users/sunyechen/doc/test/矩阵股份:长江证券承销保荐有限公司关于矩阵纵横设计股份有限公司使用募集资金置换预先投入募投项目及已支付发行费用的自筹资金的核查意见.html";
//        File htmlFile = new File(htmlFilePath);
//        Document html = Jsoup.parse(htmlFile);Element script = html.select("script").first();String sourceScript = script.html();script.html(sourceScript + PdfConvertUtil.addScript);
//        FileOutputStream fos = new FileOutputStream(htmlFilePath.replace(".html", "_.html"), false);
//        OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
//        osw.write(html.outerHtml());
//        osw.close();
//        try (Playwright playwright = Playwright.create()) {
//            Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setHeadless(true));
//            BrowserContext context = browser.newContext(new Browser.NewContextOptions());
//            Page page = browser.newPage();
//            String htmlUrl = "https://realizedongmi.oss-cn-shanghai.aliyuncs.com/a-filings/test/2023-01-03%201%20%E5%8F%91%E8%A1%8C%E4%BA%BA%E5%8F%8A%E4%BF%9D%E8%8D%90%E6%9C%BA%E6%9E%84%E5%85%B3%E4%BA%8E%E4%BA%8C%E8%BD%AE%E5%AE%A1%E6%A0%B8%E9%97%AE%E8%AF%A2%E5%87%BD%E7%9A%84%E5%9B%9E%E5%A4%8D%EF%BC%88%E4%BF%AE%E8%AE%A2%E7%A8%BF%EF%BC%89_%E6%98%93%E7%91%9E%E7%94%9F%E7%89%A9.htm";
//            HttpUtil.downloadFile(htmlUrl, "/Users/sunyechen/IdeaProjects/realize-nacos/bin/1.html");
//            page.navigate("file:/Users/sunyechen/IdeaProjects/realize-nacos/bin/1.html");
//            System.out.println(page.innerHTML("body"));
//        }
//        System.out.println(URLDecoder.decode("https://oss.imvib.com/a-filings%252Foriginal%252F000586%252F2023-04-07+%25E5%25B9%25B4%25E5%25BA%25A6%25E5%2585%25B3%25E8%2581%2594%25E6%2596%25B9%25E8%25B5%2584%25E9%2587%2591%25E5%258D%25A0%25E7%2594%25A8%25E4%25B8%2593%25E9%25A1%25B9%25E5%25AE%25A1%25E8%25AE%25A1%25E6%258A%25A5%25E5%2591%258A.PDF", "UTF-8"));
//        try {
//            File file = new File("/Users/sunyechen/doc/test/矩阵股份:长江证券承销保荐有限公司关于矩阵纵横设计股份有限公司使用募集资金置换预先投入募投项目及已支付发行费用的自筹资金的核查意见.html");
//            BufferedReader reader = new BufferedReader(new FileReader(file));
//            String line = "", oldContent = "";
//            while ((line = reader.readLine()) != null) {
//                oldContent += line + "\n";
//            }
//            reader.close();
//            String newContent = oldContent.replaceAll("<meta charset=\"utf-8\"/>", "<meta charset=\"utf-8\"/><script src=\"https://oss.imvib.com/a-filings/test/test/search.js\" type=\"text/javascript\" charset=\"utf-8\"></script> ");
//            FileWriter writer = new FileWriter(new File("/Users/sunyechen/doc/test/矩阵股份:长江证券承销保荐有限公司关于矩阵纵横设计股份有限公司使用募集资金置换预先投入募投项目及已支付发行费用的自筹资金的核查意见_1.html"));
//            writer.write(newContent);
//            writer.close();
//            System.out.println("File updated successfully.");
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//        log.info("start");
//        String htmlFilePath = "/Users/sunyechen/sfit/7745c98a5ba34525937bce19519c0b1e.html";
//        try {
//            File file = new File(htmlFilePath);
//            BufferedReader reader = new BufferedReader(new FileReader(file));
//            String line = "", oldContent = "";
//            while ((line = reader.readLine()) != null) {
//                oldContent += line + "\n";
//            }
//            reader.close();
//            String newContent = oldContent.replaceAll("github", "zzz").replaceAll("pdf2htmlEX", "tanqiuhuashigou").replaceAll("<meta charset=\"utf-8\"/>", "<meta charset=\"utf-8\"/><script src=\"https://oss.imvib.com/a-filings/test/test/search.js\" type=\"text/javascript\" charset=\"utf-8\"></script> ");
//            String newHtmlFilePath = htmlFilePath.replace(".html", "_.html");
//            FileWriter writer = new FileWriter(newHtmlFilePath);
//            writer.write(newContent);
//            writer.close();
//            log.info("html文件处理完成{},{}");
//
//        } catch (IOException e) {
//            e.printStackTrace();
//        }log.info("start");
//        String ossKey = "ann/688249/2023/4/688249_20230412_9XYK/688249_20230412_9XYK.html";
//        String ossPath = ossKey.substring(0, ossKey.lastIndexOf("/") + 1);
//        OssUtil.batchFileUploadOssUrl("/Users/sunyechen/sfit/test/", ossPath);
//        File[] fileList = new File("/Users/sunyechen/sfit/test/").listFiles();
//        for (int i = 0; i < fileList.length; i++) {
//            OssUtil.fileUploadOssUrl(fileList[i], ossPath + fileList[i].getName());
//            fileList[i].delete();
//        }String htmlFilePath = "/Users/sunyechen/sfit/test/600499_20230415_EVH7.html";List<String> allLines = Files.readAllLines(Paths.get(htmlFilePath), Charset.forName("UTF-8"));String content = String.join("\n", allLines);System.out.println(content);log.info("start");File file = new File(htmlFilePath);BufferedReader reader = new BufferedReader(new FileReader(file));String line = "", oldContent = "";while ((line = reader.readLine()) != null) {oldContent += line + "\n";}reader.close();System.out.println(oldContent);log.info("end");}}

方案二:

kkFileView-4.0.0

kkFileView - 在线文件预览

方案三:

wkhtmltox-0.12.6-1.centos7.x86_64.rpm

wkhtmltopdf 

相关文章:

pdf 转html 在线预览和查询

方案一&#xff1a;pdf2htmlex package com.realize.controller;import cn.hutool.http.HttpUtil; import com.alibaba.fastjson2.JSONObject; import com.realize.util.MsgUtil; import com.realize.util.OssUtil; import com.realize.util.PdfConvertUtil; import com.reali…...

docker 体验怀旧游戏(魂斗罗等)

docker run --restart always -p 8081:80 --name fc-games -d registry.cn-hangzhou.aliyuncs.com/bystart/fc-games:latest ip:8081访问 jsnes: js制作了一个网页版的NES模拟&#xff0c;可以在网页上玩fc游戏 (gitee.com)...

JS中判断数据类型总结以及方法封装

判断数据类型封装方法&#xff1a; 1&#xff09;type返回字符串类型 2&#xff09;is开头返回Boolean类型 测试实例&#xff1a; JavaScript 判断数据类型的方式共有四种 typeofinstanceofconstructorObject.prototype.toString typeof typeof 操作符返回一个字符串,表示操…...

【Midjourney】绘画风格关键词

1.松散素描(Loose Sketch) "Loose sketch"&#xff08;松散素描&#xff09;通常指的是一种艺术或设计中的手绘风格&#xff0c;其特点是线条和形状的表现相对宽松、自由&#xff0c;没有过多的细节和精确度。这样的素描通常用于表达创意、捕捉概念或者作为设计的初步…...

教你如何低成本自建「幻兽帕鲁」服务器,快速一键部署

创建幻兽帕鲁服务器1分钟部署教程&#xff0c;阿里云和腾讯云均推出幻兽帕鲁服务器服务器和部署教程&#xff0c;4核16G和4核32G配置可选&#xff0c;阿腾云atengyun.com分享1分钟自建幻兽帕鲁Palworld服务器教程&#xff1a; 幻兽帕鲁服务器创建教程 幻兽帕鲁服务器官方推荐…...

拥抱社交电商浪潮:微信小程序商城崛起引领电商新风向-亿发

在经过多年的发展后&#xff0c;各大传统电商平台的流量增速基本上已经见顶。同时&#xff0c;新兴的带有社交性质的电商平台&#xff0c;如抖音、小红书和微信商城&#xff08;小程序商城&#xff09;等&#xff0c;使得传统中心化平台的流量关注度逐渐分散。由于中心化平台需…...

一个使用pyqt的word文档查重工具

一个使用pyqt的word文档查重工具 使用场景代码使用截图打包好的软件下载链接结尾 使用场景 有时我们在借鉴一篇文档之后还不想有太多重复&#xff0c;这个时候可以使用这个工具对两个word文档进行对比 代码 import sys from PyQt5.QtWidgets import QApplication, QMainWind…...

SpringCloud Alibaba Sentinel 与 SpringCloud Gateway 的限流有什么差别?(三种限流算法原理分析)

目录 一、Sentinel 与 Gateway 的限流有什么差别&#xff1f; 1.1、前置知识 - 四种常见的限流算法 1.1.1、Tips 1.1.2、计数器算法 1&#xff09;固定窗口计数器算法 2&#xff09;滑动窗口计数器算法 1.1.3、令牌桶算法 1.1.4、漏桶算法 1.2、解决问题 一、Sentinel…...

邦芒忠告:职场新人最需要避开的十大雷坑

职场人最害怕的就是踩雷进坑&#xff0c;很多新入职场的小白都会战战兢兢&#xff0c;生怕哪里不对&#xff0c;冒犯了哪一位&#xff0c;或者触犯了哪一条潜规则。害怕自己踩到雷&#xff0c;没有走好职场第一步。最近&#xff0c;单位进了几个新人&#xff0c;看到他们就想起…...

MySQL-进阶-索引

一、索引概述 1、介绍 2、有误索引搜索效率演示 3、优缺点 二、索引结构 1、B-Tree&#xff08;多路平衡查找树&#xff09; 2、BTree 3、Hash 三、索引分类 四、索引语法 1、语法 2、案例 五、SQL性能分析 1、查看执行频次 2、慢查询日志 3、show-profile 4、explain...

GitLab入门指南:上传与下载操作一网打尽

GitLab简介&#xff1a; GitLab是一个基于Git的开源仓库管理系统&#xff0c;提供了一个Web界面的Git存储库管理器&#xff0c;并集成了多种开发工具的功能&#xff0c;如代码审查、问题跟踪、持续集成和持续部署等。GitLab可以在本地服务器上部署&#xff0c;也可以使用其提供…...

GPT应用_PrivateGPT

项目地址&#xff1a;https://github.com/imartinez/privateGPT 1 功能 1.1 整体功能&#xff0c;想解决什么问题 搭建完整的 RAG 系统&#xff0c;与 FastGPT 相比&#xff0c;界面比较简单。但是底层支持比较丰富&#xff0c;可用于知识库的完全本地部署&#xff0c;包含大…...

Qt‘s 撤销框架(Qt‘s Undo Framework)

一、开篇序言 我们常常有这样的业务场景,需要支持撤回的动作(即 undo)。如果让你来设计,聪明的你肯定也能立即想到解决问题的办法,对,将操作的 command { 对象,指令,属性 } 保存到一个容器中。 如果是仅需要单步撤销, 使用栈容器 保存command,动作执行即指令入栈, …...

【C++】stack、queue的使用及模拟实现

目录 一、stack1.1 stack的使用1.2 stack的模拟实现 二、queue2.1 queue的使用2.2 queue的模拟实现 一、stack 1.1 stack的使用 stack是一种容器适配器&#xff0c;它的特点是后进先出&#xff0c;只能在容器的一端进行插入和删除操作。 stack的使用很简单&#xff0c;主要有…...

外包干了2个多月,技术退步明显。。。。。

先说一下自己的情况&#xff0c;本科生&#xff0c;19年通过校招进入广州某软件公司&#xff0c;干了接近3年的功能测试&#xff0c;今年年初&#xff0c;感觉自己不能够在这样下去了&#xff0c;长时间呆在一个舒适的环境会让一个人堕落!而我已经在一个企业干了四年的功能测试…...

html5实现好看的年会邀请函源码模板

文章目录 1.设计来源1.1 邀请函主界面1.2 诚挚邀请界面1.3 关于我们界面1.4 董事长致词界面1.5 公司合作方界面1.6 活动流程界面1.7 加盟支持界面1.8 加盟流程界面1.9 加盟申请界面1.10 活动信息界面 2.效果和源码2.1 动态效果2.2 源码目录结构 源码下载 作者&#xff1a;xcLei…...

【C++】反向迭代器模拟实现

&#x1f440;樊梓慕&#xff1a;个人主页 &#x1f3a5;个人专栏&#xff1a;《C语言》《数据结构》《蓝桥杯试题》《LeetCode刷题笔记》《实训项目》《C》《Linux》《算法》 &#x1f31d;每一个不曾起舞的日子&#xff0c;都是对生命的辜负 目录 前言 1.利用适配器的思想…...

【低照度图像增强系列(5)】Zero-DCE算法详解与代码实现(CVPR 2020)

前言 ☀️ 在低照度场景下进行目标检测任务&#xff0c;常存在图像RGB特征信息少、提取特征困难、目标识别和定位精度低等问题&#xff0c;给检测带来一定的难度。 &#x1f33b;使用图像增强模块对原始图像进行画质提升&#xff0c;恢复各类图像信息&#xff0c;再使用目标…...

三维重建衡量指标记录

1、完整性比率 Completeness Rati (CR) 完整性比率 完整性比率是用于评估三维重建质量的指标之一&#xff0c;它衡量了重建结果中包含的真实物体表面或点云的百分比。完整性比率通常是通过比较重建结果中的点云或三维模型与真实或标准点云或模型之间的重叠来计算的。 具体计算…...

在WinForms中控制模态对话框的关闭行为

博客文章&#xff1a;在WinForms中控制模态对话框的关闭行为 引言 在Windows Forms (WinForms) 应用程序中&#xff0c;对话框的行为控制是提升用户体验的关键部分。特别是在使用模态对话框时&#xff0c;防止用户不经意间关闭它变得尤为重要。本文将探讨如何通过重写 FormClo…...

论文解读:交大港大上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化学习框架(二)

HoST框架核心实现方法详解 - 论文深度解读(第二部分) 《Learning Humanoid Standing-up Control across Diverse Postures》 系列文章: 论文深度解读 + 算法与代码分析(二) 作者机构: 上海AI Lab, 上海交通大学, 香港大学, 浙江大学, 香港中文大学 论文主题: 人形机器人…...

【大模型RAG】Docker 一键部署 Milvus 完整攻略

本文概要 Milvus 2.5 Stand-alone 版可通过 Docker 在几分钟内完成安装&#xff1b;只需暴露 19530&#xff08;gRPC&#xff09;与 9091&#xff08;HTTP/WebUI&#xff09;两个端口&#xff0c;即可让本地电脑通过 PyMilvus 或浏览器访问远程 Linux 服务器上的 Milvus。下面…...

Frozen-Flask :将 Flask 应用“冻结”为静态文件

Frozen-Flask 是一个用于将 Flask 应用“冻结”为静态文件的 Python 扩展。它的核心用途是&#xff1a;将一个 Flask Web 应用生成成纯静态 HTML 文件&#xff0c;从而可以部署到静态网站托管服务上&#xff0c;如 GitHub Pages、Netlify 或任何支持静态文件的网站服务器。 &am…...

屋顶变身“发电站” ,中天合创屋面分布式光伏发电项目顺利并网!

5月28日&#xff0c;中天合创屋面分布式光伏发电项目顺利并网发电&#xff0c;该项目位于内蒙古自治区鄂尔多斯市乌审旗&#xff0c;项目利用中天合创聚乙烯、聚丙烯仓库屋面作为场地建设光伏电站&#xff0c;总装机容量为9.96MWp。 项目投运后&#xff0c;每年可节约标煤3670…...

【生成模型】视频生成论文调研

工作清单 上游应用方向&#xff1a;控制、速度、时长、高动态、多主体驱动 类型工作基础模型WAN / WAN-VACE / HunyuanVideo控制条件轨迹控制ATI~镜头控制ReCamMaster~多主体驱动Phantom~音频驱动Let Them Talk: Audio-Driven Multi-Person Conversational Video Generation速…...

动态 Web 开发技术入门篇

一、HTTP 协议核心 1.1 HTTP 基础 协议全称 &#xff1a;HyperText Transfer Protocol&#xff08;超文本传输协议&#xff09; 默认端口 &#xff1a;HTTP 使用 80 端口&#xff0c;HTTPS 使用 443 端口。 请求方法 &#xff1a; GET &#xff1a;用于获取资源&#xff0c;…...

【Linux】自动化构建-Make/Makefile

前言 上文我们讲到了Linux中的编译器gcc/g 【Linux】编译器gcc/g及其库的详细介绍-CSDN博客 本来我们将一个对于编译来说很重要的工具&#xff1a;make/makfile 1.背景 在一个工程中源文件不计其数&#xff0c;其按类型、功能、模块分别放在若干个目录中&#xff0c;mak…...

Cilium动手实验室: 精通之旅---13.Cilium LoadBalancer IPAM and L2 Service Announcement

Cilium动手实验室: 精通之旅---13.Cilium LoadBalancer IPAM and L2 Service Announcement 1. LAB环境2. L2公告策略2.1 部署Death Star2.2 访问服务2.3 部署L2公告策略2.4 服务宣告 3. 可视化 ARP 流量3.1 部署新服务3.2 准备可视化3.3 再次请求 4. 自动IPAM4.1 IPAM Pool4.2 …...

pycharm 设置环境出错

pycharm 设置环境出错 pycharm 新建项目&#xff0c;设置虚拟环境&#xff0c;出错 pycharm 出错 Cannot open Local Failed to start [powershell.exe, -NoExit, -ExecutionPolicy, Bypass, -File, C:\Program Files\JetBrains\PyCharm 2024.1.3\plugins\terminal\shell-int…...

Windows 下端口占用排查与释放全攻略

Windows 下端口占用排查与释放全攻略​ 在开发和运维过程中&#xff0c;经常会遇到端口被占用的问题&#xff08;如 8080、3306 等常用端口&#xff09;。本文将详细介绍如何通过命令行和图形化界面快速定位并释放被占用的端口&#xff0c;帮助你高效解决此类问题。​ 一、准…...