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

MockServer简单使用记录

下载源码

下载git源码:git clone https://github.com/mock-server/mockserver.git

通过执行文件编译成jar包

./mvnw clean package
可能会报错。

启动命令

java -jar ./mockserver-netty-jar-with-dependencies.jar -serverPort 1080 -proxyRemotePort 80 -proxyRemoteHost www.mock-server.com -logLevel WARN

访问前台

http(s)://<host>:<port>/mockserver/dashboard
这里的端口设置是启动命令的serverPort:1080

增加挡板

附件里面有key=value模式,json模式,xml模式设置和请求案例
下面是jmx文档

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.2.1"><hashTree><TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"><stringProp name="TestPlan.comments"></stringProp><boolProp name="TestPlan.functional_mode">false</boolProp><boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp><boolProp name="TestPlan.serialize_threadgroups">false</boolProp><elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"><collectionProp name="Arguments.arguments"/></elementProp><stringProp name="TestPlan.user_define_classpath"></stringProp></TestPlan><hashTree><ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true"><stringProp name="ThreadGroup.on_sample_error">continue</stringProp><elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"><boolProp name="LoopController.continue_forever">false</boolProp><stringProp name="LoopController.loops">1</stringProp></elementProp><stringProp name="ThreadGroup.num_threads">1</stringProp><stringProp name="ThreadGroup.ramp_time">1</stringProp><boolProp name="ThreadGroup.scheduler">false</boolProp><stringProp name="ThreadGroup.duration"></stringProp><stringProp name="ThreadGroup.delay"></stringProp><boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp></ThreadGroup><hashTree><HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP请求-设置-key=value" enabled="false"><boolProp name="HTTPSampler.postBodyRaw">true</boolProp><elementProp name="HTTPsampler.Arguments" elementType="Arguments"><collectionProp name="Arguments.arguments"><elementProp name="" elementType="HTTPArgument"><boolProp name="HTTPArgument.always_encode">false</boolProp><stringProp name="Argument.value">{&#xd;&quot;id&quot;: &quot;test_mock&quot;,&#xd;&quot;httpRequest&quot;: {&#xd;&quot;path&quot;: &quot;/hello/mock&quot;,&#xd;&quot;method&quot;: &quot;POST&quot;,&#xd;&quot;queryStringParameters&quot;: [&#xd;{&#xd;&quot;name&quot;: &quot;param1&quot;,&#xd;&quot;values&quot;: [&quot;value1&quot;]&#xd;}&#xd;],&#xd;},&#xd;&quot;httpResponse&quot;: {&#xd;&quot;body&quot;: {&#xd;&quot;status&quot;: 200,&#xd;&quot;result&quot;: &quot;Welcome to mock server!&quot;&#xd;}&#xd;},&#xd;&quot;priority&quot;: 10&#xd;
}&#xd;
</stringProp><stringProp name="Argument.metadata">=</stringProp></elementProp></collectionProp></elementProp><stringProp name="HTTPSampler.domain">192.168.145.128</stringProp><stringProp name="HTTPSampler.port">1080</stringProp><stringProp name="HTTPSampler.protocol">http</stringProp><stringProp name="HTTPSampler.contentEncoding"></stringProp><stringProp name="HTTPSampler.path">/mockserver/expectation</stringProp><stringProp name="HTTPSampler.method">PUT</stringProp><boolProp name="HTTPSampler.follow_redirects">true</boolProp><boolProp name="HTTPSampler.auto_redirects">false</boolProp><boolProp name="HTTPSampler.use_keepalive">true</boolProp><boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp><stringProp name="HTTPSampler.embedded_url_re"></stringProp><stringProp name="HTTPSampler.connect_timeout">1</stringProp><stringProp name="HTTPSampler.response_timeout"></stringProp></HTTPSamplerProxy><hashTree/><HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP请求-设置-json" enabled="false"><boolProp name="HTTPSampler.postBodyRaw">true</boolProp><elementProp name="HTTPsampler.Arguments" elementType="Arguments"><collectionProp name="Arguments.arguments"><elementProp name="" elementType="HTTPArgument"><boolProp name="HTTPArgument.always_encode">false</boolProp><stringProp name="Argument.value">{&#xd;&quot;id&quot;: &quot;test_mock_json&quot;,&#xd;&quot;httpRequest&quot;: {&#xd;&quot;path&quot;: &quot;/hello/mock&quot;,&#xd;&quot;method&quot;: &quot;POST&quot;,&#xd;&quot;headers&quot;: [&#xd;{&#xd;&quot;name&quot;: &quot;Content-Type&quot;,&#xd;&quot;values&quot;: [&quot;application/json&quot;]&#xd;}&#xd;],&#xd;&quot;body&quot;: {&#xd;&quot;type&quot;: &quot;JSON&quot;,&#xd;&quot;json&quot;: {&#xd;&quot;key&quot;: &quot;param1&quot;,&#xd;&quot;nested&quot;: {&#xd;&quot;nestedKey&quot;: &quot;nestedValue&quot;&#xd;}&#xd;}&#xd;}&#xd;},&#xd;&quot;httpResponse&quot;: {&#xd;&quot;body&quot;: {&#xd;&quot;status&quot;: 200,&#xd;&quot;result&quot;: &quot;Welcome to mock server!&quot;&#xd;}&#xd;},&#xd;&quot;priority&quot;: 10&#xd;
}&#xd;
</stringProp><stringProp name="Argument.metadata">=</stringProp></elementProp></collectionProp></elementProp><stringProp name="HTTPSampler.domain">192.168.145.128</stringProp><stringProp name="HTTPSampler.port">1080</stringProp><stringProp name="HTTPSampler.protocol">http</stringProp><stringProp name="HTTPSampler.contentEncoding"></stringProp><stringProp name="HTTPSampler.path">/mockserver/expectation</stringProp><stringProp name="HTTPSampler.method">PUT</stringProp><boolProp name="HTTPSampler.follow_redirects">true</boolProp><boolProp name="HTTPSampler.auto_redirects">false</boolProp><boolProp name="HTTPSampler.use_keepalive">true</boolProp><boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp><stringProp name="HTTPSampler.embedded_url_re"></stringProp><stringProp name="HTTPSampler.connect_timeout">1</stringProp><stringProp name="HTTPSampler.response_timeout"></stringProp></HTTPSamplerProxy><hashTree/><HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP请求-设置-xml" enabled="true"><boolProp name="HTTPSampler.postBodyRaw">true</boolProp><elementProp name="HTTPsampler.Arguments" elementType="Arguments"><collectionProp name="Arguments.arguments"><elementProp name="" elementType="HTTPArgument"><boolProp name="HTTPArgument.always_encode">false</boolProp><stringProp name="Argument.value">{&#xd;&quot;id&quot;: &quot;test_mock_xml&quot;,&#xd;&quot;httpRequest&quot;: {&#xd;&quot;path&quot;: &quot;/xml/mock&quot;,&#xd;&quot;method&quot;: &quot;POST&quot;,&#xd;&quot;headers&quot;: [&#xd;{&#xd;&quot;name&quot;: &quot;Content-Type&quot;,&#xd;&quot;values&quot;: [&quot;application/xml&quot;]&#xd;}&#xd;],&#xd;&quot;body&quot;: {&#xd;&quot;type&quot;: &quot;STRING&quot;,&#xd;&quot;string&quot;: &quot;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&quot;&#xd;}&#xd;},&#xd;&quot;httpResponse&quot;: {&#xd;&quot;statusCode&quot;: 200,&#xd;&quot;body&quot;: &quot;&lt;response&gt;XML Response&lt;/response&gt;&quot;&#xd;},&#xd;&quot;priority&quot;: 10&#xd;
}&#xd;
</stringProp><stringProp name="Argument.metadata">=</stringProp></elementProp></collectionProp></elementProp><stringProp name="HTTPSampler.domain">192.168.145.128</stringProp><stringProp name="HTTPSampler.port">1080</stringProp><stringProp name="HTTPSampler.protocol">http</stringProp><stringProp name="HTTPSampler.contentEncoding"></stringProp><stringProp name="HTTPSampler.path">/mockserver/expectation</stringProp><stringProp name="HTTPSampler.method">PUT</stringProp><boolProp name="HTTPSampler.follow_redirects">true</boolProp><boolProp name="HTTPSampler.auto_redirects">false</boolProp><boolProp name="HTTPSampler.use_keepalive">true</boolProp><boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp><stringProp name="HTTPSampler.embedded_url_re"></stringProp><stringProp name="HTTPSampler.connect_timeout">1</stringProp><stringProp name="HTTPSampler.response_timeout"></stringProp></HTTPSamplerProxy><hashTree/><ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"><boolProp name="ResultCollector.error_logging">false</boolProp><objProp><name>saveConfig</name><value class="SampleSaveConfiguration"><time>true</time><latency>true</latency><timestamp>true</timestamp><success>true</success><label>true</label><code>true</code><message>true</message><threadName>true</threadName><dataType>true</dataType><encoding>false</encoding><assertions>true</assertions><subresults>true</subresults><responseData>false</responseData><samplerData>false</samplerData><xml>false</xml><fieldNames>true</fieldNames><responseHeaders>false</responseHeaders><requestHeaders>false</requestHeaders><responseDataOnError>false</responseDataOnError><saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage><assertionsResultsToSave>0</assertionsResultsToSave><bytes>true</bytes><sentBytes>true</sentBytes><url>true</url><threadCounts>true</threadCounts><idleTime>true</idleTime><connectTime>true</connectTime></value></objProp><stringProp name="filename"></stringProp></ResultCollector><hashTree/></hashTree><ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="线程组" enabled="true"><stringProp name="ThreadGroup.on_sample_error">continue</stringProp><elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"><boolProp name="LoopController.continue_forever">false</boolProp><stringProp name="LoopController.loops">1</stringProp></elementProp><stringProp name="ThreadGroup.num_threads">1</stringProp><stringProp name="ThreadGroup.ramp_time">1</stringProp><boolProp name="ThreadGroup.scheduler">false</boolProp><stringProp name="ThreadGroup.duration">10</stringProp><stringProp name="ThreadGroup.delay"></stringProp><boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp></ThreadGroup><hashTree><HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP请求-测试-key=value" enabled="false"><elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"><collectionProp name="Arguments.arguments"/></elementProp><stringProp name="HTTPSampler.domain">192.168.145.128</stringProp><stringProp name="HTTPSampler.port">1080</stringProp><stringProp name="HTTPSampler.protocol">http</stringProp><stringProp name="HTTPSampler.contentEncoding"></stringProp><stringProp name="HTTPSampler.path">/hello/mock?param1=value1</stringProp><stringProp name="HTTPSampler.method">POST</stringProp><boolProp name="HTTPSampler.follow_redirects">true</boolProp><boolProp name="HTTPSampler.auto_redirects">false</boolProp><boolProp name="HTTPSampler.use_keepalive">true</boolProp><boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp><stringProp name="HTTPSampler.embedded_url_re"></stringProp><stringProp name="HTTPSampler.connect_timeout">1</stringProp><stringProp name="HTTPSampler.response_timeout"></stringProp></HTTPSamplerProxy><hashTree><HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP信息头管理器" enabled="true"><collectionProp name="HeaderManager.headers"><elementProp name="Content-Type" elementType="Header"><stringProp name="Header.name">Content-Type</stringProp><stringProp name="Header.value">application/json</stringProp></elementProp></collectionProp></HeaderManager><hashTree/></hashTree><HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP请求-测试-json" enabled="false"><boolProp name="HTTPSampler.postBodyRaw">true</boolProp><elementProp name="HTTPsampler.Arguments" elementType="Arguments"><collectionProp name="Arguments.arguments"><elementProp name="" elementType="HTTPArgument"><boolProp name="HTTPArgument.always_encode">false</boolProp><stringProp name="Argument.value">{&#xd;&quot;key&quot;: &quot;param1&quot;,&#xd;&quot;vvv&quot;:&quot;2222&quot;,&#xd;&quot;nested&quot;: {&#xd;&quot;nestedKey&quot;: &quot;nestedValue&quot;,&#xd;&quot;ccc&quot;:&quot;1111&quot;&#xd;}&#xd;
}</stringProp><stringProp name="Argument.metadata">=</stringProp></elementProp></collectionProp></elementProp><stringProp name="HTTPSampler.domain">192.168.145.128</stringProp><stringProp name="HTTPSampler.port">1080</stringProp><stringProp name="HTTPSampler.protocol">http</stringProp><stringProp name="HTTPSampler.contentEncoding"></stringProp><stringProp name="HTTPSampler.path">/hello/mock</stringProp><stringProp name="HTTPSampler.method">POST</stringProp><boolProp name="HTTPSampler.follow_redirects">true</boolProp><boolProp name="HTTPSampler.auto_redirects">false</boolProp><boolProp name="HTTPSampler.use_keepalive">true</boolProp><boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp><stringProp name="HTTPSampler.embedded_url_re"></stringProp><stringProp name="HTTPSampler.connect_timeout">1</stringProp><stringProp name="HTTPSampler.response_timeout"></stringProp></HTTPSamplerProxy><hashTree><HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP信息头管理器" enabled="true"><collectionProp name="HeaderManager.headers"><elementProp name="Content-Type" elementType="Header"><stringProp name="Header.name">Content-Type</stringProp><stringProp name="Header.value">application/json</stringProp></elementProp></collectionProp></HeaderManager><hashTree/></hashTree><HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP请求-测试-xml" enabled="true"><boolProp name="HTTPSampler.postBodyRaw">true</boolProp><elementProp name="HTTPsampler.Arguments" elementType="Arguments"><collectionProp name="Arguments.arguments"><elementProp name="" elementType="HTTPArgument"><boolProp name="HTTPArgument.always_encode">false</boolProp><stringProp name="Argument.value">&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;</stringProp><stringProp name="Argument.metadata">=</stringProp></elementProp></collectionProp></elementProp><stringProp name="HTTPSampler.domain">192.168.145.128</stringProp><stringProp name="HTTPSampler.port">1080</stringProp><stringProp name="HTTPSampler.protocol">http</stringProp><stringProp name="HTTPSampler.contentEncoding"></stringProp><stringProp name="HTTPSampler.path">/xml/mock</stringProp><stringProp name="HTTPSampler.method">POST</stringProp><boolProp name="HTTPSampler.follow_redirects">true</boolProp><boolProp name="HTTPSampler.auto_redirects">false</boolProp><boolProp name="HTTPSampler.use_keepalive">true</boolProp><boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp><stringProp name="HTTPSampler.embedded_url_re"></stringProp><stringProp name="HTTPSampler.connect_timeout">1</stringProp><stringProp name="HTTPSampler.response_timeout"></stringProp></HTTPSamplerProxy><hashTree><HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP信息头管理器" enabled="true"><collectionProp name="HeaderManager.headers"><elementProp name="Content-Type" elementType="Header"><stringProp name="Header.name">Content-Type</stringProp><stringProp name="Header.value">application/xml</stringProp></elementProp></collectionProp></HeaderManager><hashTree/></hashTree><ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="察看结果树" enabled="true"><boolProp name="ResultCollector.error_logging">false</boolProp><objProp><name>saveConfig</name><value class="SampleSaveConfiguration"><time>true</time><latency>true</latency><timestamp>true</timestamp><success>true</success><label>true</label><code>true</code><message>true</message><threadName>true</threadName><dataType>true</dataType><encoding>false</encoding><assertions>true</assertions><subresults>true</subresults><responseData>false</responseData><samplerData>false</samplerData><xml>false</xml><fieldNames>true</fieldNames><responseHeaders>false</responseHeaders><requestHeaders>false</requestHeaders><responseDataOnError>false</responseDataOnError><saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage><assertionsResultsToSave>0</assertionsResultsToSave><bytes>true</bytes><sentBytes>true</sentBytes><url>true</url><threadCounts>true</threadCounts><idleTime>true</idleTime><connectTime>true</connectTime></value></objProp><stringProp name="filename"></stringProp></ResultCollector><hashTree/><kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.TransactionsPerSecondGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="jp@gc - Transactions per Second" enabled="true"><boolProp name="ResultCollector.error_logging">false</boolProp><objProp><name>saveConfig</name><value class="SampleSaveConfiguration"><time>true</time><latency>true</latency><timestamp>true</timestamp><success>true</success><label>true</label><code>true</code><message>true</message><threadName>true</threadName><dataType>true</dataType><encoding>false</encoding><assertions>true</assertions><subresults>true</subresults><responseData>false</responseData><samplerData>false</samplerData><xml>false</xml><fieldNames>true</fieldNames><responseHeaders>false</responseHeaders><requestHeaders>false</requestHeaders><responseDataOnError>false</responseDataOnError><saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage><assertionsResultsToSave>0</assertionsResultsToSave><bytes>true</bytes><sentBytes>true</sentBytes><url>true</url><threadCounts>true</threadCounts><idleTime>true</idleTime><connectTime>true</connectTime></value></objProp><stringProp name="filename"></stringProp><longProp name="interval_grouping">1000</longProp><boolProp name="graph_aggregated">false</boolProp><stringProp name="include_sample_labels"></stringProp><stringProp name="exclude_sample_labels"></stringProp><stringProp name="start_offset"></stringProp><stringProp name="end_offset"></stringProp><boolProp name="include_checkbox_state">false</boolProp><boolProp name="exclude_checkbox_state">false</boolProp></kg.apc.jmeter.vizualizers.CorrectedResultCollector><hashTree/></hashTree></hashTree></hashTree>
</jmeterTestPlan>

相关文章:

MockServer简单使用记录

下载源码 下载git源码&#xff1a;git clone https://github.com/mock-server/mockserver.git 通过执行文件编译成jar包 ./mvnw clean package 可能会报错。 启动命令 java -jar ./mockserver-netty-jar-with-dependencies.jar -serverPort 1080 -proxyRemotePort 80 -pro…...

AI+金融:大模型引爆金融科技革命

仅供机构投资者使用 证券研究报告|行业深度研究报告 AI金融&#xff1a;大模型引爆金融科技革命 “AI应用”系列&#xff08;二&#xff09; 华西计算机团队 2023年7月28日 分析师&#xff1a;刘泽晶 联系人&#xff1a;刘波 SAC NO&#xff1a;S1120520020002 邮箱&#xff1a…...

数据库(二)实验一:MySQL数据库的C/S模式部署

实验要求 在云服务器上启动两个实例Server和Client&#xff0c;并实现两个实例之间的免密ssh登录。在Server和Client上分别安装MySQL&#xff0c;在Server上创建数据库和用户&#xff0c;在Client上远程连接Server的数据库。 实验内容 创建两个云服务器实例 在腾讯云购买两个…...

RLHF几大常用框架实践对比(trlx、deepspeedchat、colossalaichat)

原文&#xff1a;RLHF几大常用框架实践对比&#xff08;trlx、deepspeedchat、colossalaichat&#xff09; - 知乎 目录 收起 一、RLHF的作用 二、实践效果 三、怎么做 1、框架 2、算法 3、数据 4、调参 一、RLHF的作用 从InstructGPT的论文中看&#xff0c;RLHF目的…...

Oracle/Myql批量操作

前言&#xff1a;在oracle中使用insert into values (),(),()多种方式都不能成功,记录正确的批量方法 注意&#xff1a;oracle有自己实现批量的方法&#xff0c;mysql适用的&#xff0c;oracle不一定适用 <insert id"insertTaskImportOpen" parameterType"l…...

关于一个web站点的欢迎页面

- 什么是一个web站点的欢迎页面&#xff1f; - 对于一个webapp来说&#xff0c;我们是可以设置它的欢迎页面的。 - 设置了欢迎页面之后&#xff0c;当你访问这个webapp的时候&#xff0c;或者访问这个web站点的时候&#xff0c;没有指定任何“资源路径”&#xff0c;这个时候…...

1050. 鸣人的影分身(dp划分)

题目&#xff1a; 1050. 鸣人的影分身 - AcWing题库 输入样例&#xff1a; 1 7 3输出样例&#xff1a; 8 思路&#xff1a; 代码&#xff1a; #include<iostream> using namespace std; const int N20; int f[N][N]; int main() {int T,m,n;cin>>T;while(T--)…...

51单片机点灯入门教程——2. 呼吸灯效果

基本说明 本章使用芯片&#xff1a;STC8H8K64U核心板 芯片手册&#xff1a;点此查看 Keil 开发环境配置&#xff1a;点此查看 本章学习内容&#xff1a;利用库函数&#xff0c;开发C程序&#xff0c;实现呼吸灯效果。 代码实例 需求&#xff1a;使用串口来控制呼吸灯效果&…...

shell脚本实现九九乘法表

9*9乘法表 判断服务是否开启 1.查看80端口是否被监听 [rootlocalhost ~]# ss -an | grep 80 tcp LISTEN 0 128 *:80 *:* 2.查看80端口/httpd服务是否开启 [rootlocalhost ~]# n…...

CAAC无人机操作证考证报名流程及白底证件照片制作方法

在这个无人机技术日新月异的时代&#xff0c;拥有一张CAAC民用无人机操作证不仅意味着你能够合法地在天空翱翔&#xff0c;也象征着你对飞行技术的尊重和对规章制度的遵守。如果你怀揣着成为无人机飞行员的梦想&#xff0c;那么&#xff0c;让我们一起揭开CAAC民用无人机操作证…...

RPC介绍

什么是RPC RPC是远程过程调用&#xff08;Remote Procedure Call&#xff09;的缩写形式。在学校学编程&#xff0c;我们写一个函数都是在本地调用就行了。但是在互联网公司&#xff0c;服务都是部署在不同服务器上的分布式系统。 SAP(System Applications and Products/企业管…...

23 导航栏

效果演示 实现了一个响应式的导航栏&#xff0c;当鼠标悬停在导航栏上的某个选项上时&#xff0c;对应的横条会从左到右地移动&#xff0c;从而实现了导航栏的动态效果。 Code <div class"flex"><ul><li>1</li><li>2</li><l…...

express框架搭建后台服务

express 1. 使用express创建web服务器&#xff1a;2. 中间件中间件分类&#xff1a; 3.解决跨域问题&#xff1a;1. CORS2.JSONP 1. 使用express创建web服务器&#xff1a; 1. 导入express2. 创建web服务器3. 启动web服务器// 1. 导入express const express require(express)/…...

信息学奥赛一本通2067详解+代码

题目&#xff1a;http://ybt.ssoier.cn:8088/show_source.php?runid24484837 2067&#xff1a;【例2.5】圆 时间限制: 1000 ms 内存限制: 65536 KB 提交数: 98334 通过数: 53637 【题目描述】 输入半径r&#xff0c;输出圆的直径、周长、面积&#xff0c;数与数…...

Java大数据hadoop2.9.2搭建伪分布式yarn资源管理器

1、修改配置文件 cd /usr/local/hadoop/etc/hadoop cp ./mapred-site.xml.template ./mapred-site.xml vi mapred-site.xml <configuration><property><name>mapreduce.framework.name</name><value>yarn</value></property> &l…...

3D Gaussian Splatting复现

最近3D Gaussian Splatting很火&#xff0c;网上有很多复现过程&#xff0c;大部分都是在Windows上的。Linux上配置环境会方便简单一点&#xff0c;这里记录一下我在Linux上复现的过程。 Windows下的环境配置和编译&#xff0c;建议看这个up主的视频配置&#xff0c;讲解的很细…...

tf-idf +逻辑回归来识别垃圾文本

引入相关包 from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score, auc, roc_auc_score import joblib import os import pandas as pd from sklearn.model_select…...

Oracle - 数据库的实例、表空间、用户、表之间关系

Oracle是一种广泛使用的关系型数据库管理系统&#xff0c;它具有高性能、高可靠性、高安全性等特点。1Oracle数据库的结构和组成是一个复杂而又有趣的话题&#xff0c;本文将介绍Oracle数据库的四个基本概念&#xff1a;数据库、实例、表空间和用户&#xff0c;以及它们之间的关…...

Java面试项目推荐,异构数据源数据流转服务DatalinkX

前言 作为一个年迈的夹娃练习生&#xff0c;每次到了春招秋招面试实习生时都能看到一批简历&#xff0c;十个简历里得有七八个是写商城或者外卖项目。 不由得想到了我大四那会&#xff0c;由于没有啥项目经验&#xff0c;又想借一个质量高点的项目通过简历初筛&#xff0c;就…...

一、Vue3组合式基础[ref、reactive]

一、ref 解释&#xff1a;ref是Vue3通过ES6的Proxy实现的响应式数据&#xff0c;其与基本的js类型不同&#xff0c;其为响应式数据&#xff0c;值得注意的是&#xff0c;reactive可以算是ref的子集&#xff0c;ref一般用来处理js的基本数据类型如整型、字符型等等(也可以用来处…...

内存分配函数malloc kmalloc vmalloc

内存分配函数malloc kmalloc vmalloc malloc实现步骤: 1)请求大小调整:首先,malloc 需要调整用户请求的大小,以适应内部数据结构(例如,可能需要存储额外的元数据)。通常,这包括对齐调整,确保分配的内存地址满足特定硬件要求(如对齐到8字节或16字节边界)。 2)空闲…...

脑机新手指南(八):OpenBCI_GUI:从环境搭建到数据可视化(下)

一、数据处理与分析实战 &#xff08;一&#xff09;实时滤波与参数调整 基础滤波操作 60Hz 工频滤波&#xff1a;勾选界面右侧 “60Hz” 复选框&#xff0c;可有效抑制电网干扰&#xff08;适用于北美地区&#xff0c;欧洲用户可调整为 50Hz&#xff09;。 平滑处理&…...

VB.net复制Ntag213卡写入UID

本示例使用的发卡器&#xff1a;https://item.taobao.com/item.htm?ftt&id615391857885 一、读取旧Ntag卡的UID和数据 Private Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click轻松读卡技术支持:网站:Dim i, j As IntegerDim cardidhex, …...

DAY 47

三、通道注意力 3.1 通道注意力的定义 # 新增&#xff1a;通道注意力模块&#xff08;SE模块&#xff09; class ChannelAttention(nn.Module):"""通道注意力模块(Squeeze-and-Excitation)"""def __init__(self, in_channels, reduction_rat…...

使用van-uploader 的UI组件,结合vue2如何实现图片上传组件的封装

以下是基于 vant-ui&#xff08;适配 Vue2 版本 &#xff09;实现截图中照片上传预览、删除功能&#xff0c;并封装成可复用组件的完整代码&#xff0c;包含样式和逻辑实现&#xff0c;可直接在 Vue2 项目中使用&#xff1a; 1. 封装的图片上传组件 ImageUploader.vue <te…...

在Ubuntu中设置开机自动运行(sudo)指令的指南

在Ubuntu系统中&#xff0c;有时需要在系统启动时自动执行某些命令&#xff0c;特别是需要 sudo权限的指令。为了实现这一功能&#xff0c;可以使用多种方法&#xff0c;包括编写Systemd服务、配置 rc.local文件或使用 cron任务计划。本文将详细介绍这些方法&#xff0c;并提供…...

Axios请求超时重发机制

Axios 超时重新请求实现方案 在 Axios 中实现超时重新请求可以通过以下几种方式&#xff1a; 1. 使用拦截器实现自动重试 import axios from axios;// 创建axios实例 const instance axios.create();// 设置超时时间 instance.defaults.timeout 5000;// 最大重试次数 cons…...

OpenLayers 分屏对比(地图联动)

注&#xff1a;当前使用的是 ol 5.3.0 版本&#xff0c;天地图使用的key请到天地图官网申请&#xff0c;并替换为自己的key 地图分屏对比在WebGIS开发中是很常见的功能&#xff0c;和卷帘图层不一样的是&#xff0c;分屏对比是在各个地图中添加相同或者不同的图层进行对比查看。…...

ABAP设计模式之---“简单设计原则(Simple Design)”

“Simple Design”&#xff08;简单设计&#xff09;是软件开发中的一个重要理念&#xff0c;倡导以最简单的方式实现软件功能&#xff0c;以确保代码清晰易懂、易维护&#xff0c;并在项目需求变化时能够快速适应。 其核心目标是避免复杂和过度设计&#xff0c;遵循“让事情保…...

基于Java+MySQL实现(GUI)客户管理系统

客户资料管理系统的设计与实现 第一章 需求分析 1.1 需求总体介绍 本项目为了方便维护客户信息为了方便维护客户信息&#xff0c;对客户进行统一管理&#xff0c;可以把所有客户信息录入系统&#xff0c;进行维护和统计功能。可通过文件的方式保存相关录入数据&#xff0c;对…...