MockServer jar包安装
github地址: https://github.com/jamesdbloom/mockserver
1. org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.5.2 安裝
https://mvnrepository.com/artifact/org.apache.maven.plugin-tools/maven-plugin-annotations/3.5.2
2. mockserver使用
java -Dmockserver.initializationJsonPath="test02.json" -jar mockserver-netty-5.5.1-jar-with-dependencies.jar -serverPort 1080 -logLevel INFO
test2.json內容:
[{
"httpRequest": {
"path": "/simpleFirst"},
"httpResponse": {
"body": "some first response"}},{
"httpRequest": {
"path": "/simpleSecond"},
"httpResponse": {
"body": "some second response"
}}]
3.查看進程占用的端口號:
a)netstat -ano|findstr 1099
TCP 0.0.0.0:1099 0.0.0.0:0 LISTENING 18820
TCP [::]:1099 [::]:0 LISTENING 18820
b)關閉占用端口的進程:
taskkill /f /pid 18820
錯誤: 無法終止 PID 為 18820 的進程。
原因: 只能強行終止這個進程(帶 /F 選項)。
轉載于:https://www.cnblogs.com/jiguanghover/p/10900411.html
總結
以上是生活随笔為你收集整理的MockServer jar包安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 关于springboot工具类中@Aut
- 下一篇: 移动机器人建图与导航代码实现——3.Pa