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
    评论
如果一个设备的 OSPF 配置中使用了 `area 0 stub no-summary`,而另一个设备的配置中只是简单地使用了 `area 0 stub`,这两个设备之间的 OSPF 配置存在一些差异。 对于第一个设备配置的 `area 0 stub no-summary`,它具有以下含义和效果: - `area 0` 表示该设备所在的 OSPF 区域为区域 0(Backbone Area)。 - `stub` 表示该区域是一个 stub 区域,即不会传递外部路由信息。 - `no-summary` 表示该区域不会汇总区域内的路由信息到区域 0。 而对于第二个设备配置的 `area 0 stub`,它具有以下含义和效果: - `area 0` 同样表示该设备所在的 OSPF 区域为区域 0(Backbone Area)。 - `stub` 同样表示该区域是一个 stub 区域,不会传递外部路由信息。 两个设备之间的差异在于第一个设备使用了 `no-summary` 参数,而第二个设备未使用。这意味着第一个设备不会将区域内的路由信息汇总到区域 0,而第二个设备则没有限制。因此,在 OSPF 邻居之间交换路由信息时,第一个设备可能不会将区域内的详细路由信息告知给第二个设备。 需要根据实际网络拓扑和需求来选择使用 `no-summary` 参数或者不使用。如果你希望在 OSPF 区域内汇总路由信息并传递给区域 0,则可以在第二个设备的配置中添加 `no-summary` 参数,使其与第一个设备的配置一致。或者,如果你希望保持两个设备的配置不变,那么需要考虑其他方式来确保网络中的路由信息能够正确传递和汇总。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值