java stub作用,Moco - 一个stubs和mocks的简洁Web服务。轻松搭建Stub服务器

95cefb81ec09219b5d153a951ca3217a.png

d92e1f08adbb8d71840676940f754d78.png

Moco is an easy setup stub framework.

Latest Release

1.1.0

More details in Release Notes

User Voice

Let me know if you are using Moco.

Join Moco mailing list to discuss.

Why

Integration, especially based on HTTP protocol, e.g. web service, REST etc, is wildly used in most of our development.

In the old days, we just deployed another WAR to an application server, e.g. Jetty or Tomcat etc. As we all know, it's so boring to develop a WAR and deploy it to any application server, even if we use an embeded server. And the WAR needs to be reassembled even if we just want to change a little bit.

Quick Start

Write your own configuration file to describe your Moco server configuration as follow:

[

{

"response" :

{

"text" : "Hello, Moco"

}

}

]

(foo.json)

Run Moco HTTP server with the configuration file.

java -jar moco-runner--standalone.jar http -p 12306 -c foo.json

Now, open your favorite browser to visit http://localhost:12306 and you will see "Hello, Moco".

Documents

Detailed REST API

Global Settings for multiple configuration files.

Extend Moco if current API does not meet your requirement.

Build

Make sure you have JDK and Gradle installed.

Clone Moco

git clone git@github.com:dreamhead/moco.git

Build Moco

./gradlew build

Build uberjar

./gradlew uberjar

Check code before commit

./gradlew check

Contributing

Check out what you can help here if you do not have any existing idea.

Copyright and license

Copyright 2012-2020 ZHENG Ye

Licensed under MIT License (the "License"); You may obtain a copy of the License in the LICENSE file, or at:

Powered By

a0dd3bdd08787feda18c09d2f5fe5768.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值