easyopen is a simple and easy-to-use open interface platform. The platform encapsulates commonly used functions such as parameter verification and result return. Developers only need to implement business code.
The function of easyopen is similar to the Taobao open platform. All its interfaces only provide one URL, and different businesses are distinguished through parameters. The advantage of this is that the interface URL management is convenient, and the platform administrator only needs to maintain the interface parameters. Since the number of parameters is known, this allows for a large degree of encapsulation. After encapsulation, platform developers only need to write business code, and other functions can be completed through configuration.
Thanks to Java's annotation function and Spring container's bean management, our open interface platform was born.
1. It works out of the box. You can start the service directly after writing the business code, and no other configuration is required.
2. Automatic parameter verification, supporting international parameter verification (JSR-303).
3. The verification function and result return function are implemented independently, which facilitates custom implementation or expansion.
4. Use annotations to define interfaces, making maintenance simple and convenient.
5. Support i18n internationalized message return.
6. Automatically generate documentation pages, similar to swagger.
7. Use digital signatures for parameter verification. For the signature algorithm, see: easyopen signature algorithm.txt.
8. Use the appKey-secret form to access the platform, that is, you need to provide an appKey and secret to the access party.
Encryption algorithm (MD5, AES, RSA)
Netty (codec, long connection, disconnect and reconnect)
Current limiting (leaky bucket strategy, token bucket strategy)
Permissions (RBAC, verification)
session (stand-alone, distributed)
Annotations (document generation)
token(jwt,accessToken)
SDK (Java, C#, JavaScript)
Configuration center screenshot
Documentation page
Define interface
@Api(name = "goods.get")public Goods getGoods(GoodsParam param) { Goods goods = new Goods(); goods.setId(1L); goods.setGoods_name("Apple iPhoneX"); goods.setPrice(new BigDecimal (8000)); return goods;}
Request data
{ "name": "goods.get", "version": "", "app_key": "test", "data": "%7B%22goodsPrice%22%3A%22%22%2C%22goods_name%22% 3A%22iphoneX%22%7D", "timestamp": "2018-03-22 13:48:58", "format": "json", "sign": "C946ACA5AC95B1790511764A10E675B7"}
Return results
{ "code":"0", "data":{ "goods_name":"Apple iPhoneX", "id":1, "price":8000 }}
easyopen: easyopen: core code
easyopen-configuration: configuration center [optional]
easyopen-demo: interface server demo (including springboot, springmvc)
easyopen-ext: extension package (providing enhanced functions such as circuit breakers and downgrades)
easyopen-sdk: SDK corresponding to the interface (including Java, C#, Javascript)
easyopen-starter: starter corresponding to springboot
develop-doc: development documentation
1. Start easyopen-server-manual under easyopen-demo (the business code is in GoodsApi.java)
2. Run SdkTest.java in sdk-java under easyopen-sdk