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"
}}]

猜你喜欢

转载自www.cnblogs.com/jiguanghover/p/10900411.html