当前位置: 首页 > 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的基本数据类型如整型、字符型等等(也可以用来处…...

生成xcframework

打包 XCFramework 的方法 XCFramework 是苹果推出的一种多平台二进制分发格式&#xff0c;可以包含多个架构和平台的代码。打包 XCFramework 通常用于分发库或框架。 使用 Xcode 命令行工具打包 通过 xcodebuild 命令可以打包 XCFramework。确保项目已经配置好需要支持的平台…...

遍历 Map 类型集合的方法汇总

1 方法一 先用方法 keySet() 获取集合中的所有键。再通过 gey(key) 方法用对应键获取值 import java.util.HashMap; import java.util.Set;public class Test {public static void main(String[] args) {HashMap hashMap new HashMap();hashMap.put("语文",99);has…...

uni-app学习笔记二十二---使用vite.config.js全局导入常用依赖

在前面的练习中&#xff0c;每个页面需要使用ref&#xff0c;onShow等生命周期钩子函数时都需要像下面这样导入 import {onMounted, ref} from "vue" 如果不想每个页面都导入&#xff0c;需要使用node.js命令npm安装unplugin-auto-import npm install unplugin-au…...

基于uniapp+WebSocket实现聊天对话、消息监听、消息推送、聊天室等功能,多端兼容

基于 ​UniApp + WebSocket​实现多端兼容的实时通讯系统,涵盖WebSocket连接建立、消息收发机制、多端兼容性配置、消息实时监听等功能,适配​微信小程序、H5、Android、iOS等终端 目录 技术选型分析WebSocket协议优势UniApp跨平台特性WebSocket 基础实现连接管理消息收发连接…...

深入浅出:JavaScript 中的 `window.crypto.getRandomValues()` 方法

深入浅出&#xff1a;JavaScript 中的 window.crypto.getRandomValues() 方法 在现代 Web 开发中&#xff0c;随机数的生成看似简单&#xff0c;却隐藏着许多玄机。无论是生成密码、加密密钥&#xff0c;还是创建安全令牌&#xff0c;随机数的质量直接关系到系统的安全性。Jav…...

FastAPI 教程:从入门到实践

FastAPI 是一个现代、快速&#xff08;高性能&#xff09;的 Web 框架&#xff0c;用于构建 API&#xff0c;支持 Python 3.6。它基于标准 Python 类型提示&#xff0c;易于学习且功能强大。以下是一个完整的 FastAPI 入门教程&#xff0c;涵盖从环境搭建到创建并运行一个简单的…...

家政维修平台实战20:权限设计

目录 1 获取工人信息2 搭建工人入口3 权限判断总结 目前我们已经搭建好了基础的用户体系&#xff0c;主要是分成几个表&#xff0c;用户表我们是记录用户的基础信息&#xff0c;包括手机、昵称、头像。而工人和员工各有各的表。那么就有一个问题&#xff0c;不同的角色&#xf…...

TRS收益互换:跨境资本流动的金融创新工具与系统化解决方案

一、TRS收益互换的本质与业务逻辑 &#xff08;一&#xff09;概念解析 TRS&#xff08;Total Return Swap&#xff09;收益互换是一种金融衍生工具&#xff0c;指交易双方约定在未来一定期限内&#xff0c;基于特定资产或指数的表现进行现金流交换的协议。其核心特征包括&am…...

学习STC51单片机32(芯片为STC89C52RCRC)OLED显示屏2

每日一言 今天的每一份坚持&#xff0c;都是在为未来积攒底气。 案例&#xff1a;OLED显示一个A 这边观察到一个点&#xff0c;怎么雪花了就是都是乱七八糟的占满了屏幕。。 解释 &#xff1a; 如果代码里信号切换太快&#xff08;比如 SDA 刚变&#xff0c;SCL 立刻变&#…...

鸿蒙DevEco Studio HarmonyOS 5跑酷小游戏实现指南

1. 项目概述 本跑酷小游戏基于鸿蒙HarmonyOS 5开发&#xff0c;使用DevEco Studio作为开发工具&#xff0c;采用Java语言实现&#xff0c;包含角色控制、障碍物生成和分数计算系统。 2. 项目结构 /src/main/java/com/example/runner/├── MainAbilitySlice.java // 主界…...