CodingAir cloud service development platform is online! Address: [] (

Welcome everyone to give us a free trial! (Test account: (my mailbox) Password: 123456, you can also register yourself!)

Background introduction

CodingAir cloud service development platform is awkward?

  1. If you only allow you to write a java function to implement an http interface with certain business logic and complexity, can you do that?
  2. Have you always felt that it is a nightmare to write an interface document after writing the logic implementation? Because the interface documentation and code implementation you write are separate! In this case, writing the interface file is really redundant!
  3. Old drivers who are troubled by frequent changes in the table structure, remember the series of cumbersome operations caused by adding/changing fields each time? (XMl configuration change, DTO change, DAO change, SERVICE change, VO change ….)

Another wheel?

wrong! [CodingAir Cloud Service Development Platform] ( is not a wheel, not a new framework. It just helps you solve the above three pain points, reducing the development and deployment cycle to the shortest, familiar with you. Java language, a series of toolkits you have used, streamline the development of http interface to the extreme!

Your 80% choice!

[CodingAir Cloud Service Development Platform] ( does not solve all the scenarios of business development. It does not want to solve all business scenarios. You should recall carefully that 80% of the so-called business logic you wrote is not Except for CRUD, only if /else/ for ?

If yes, welcome to the car! [CodingAir Cloud Service Development Platform] ( is the 80% best choice you are looking for!

Prerequisite knowledge

  1. Certain java programming knowledge
  2. Certain sql operation knowledge

Quick Start

1. Create Interface & Document

Add an interface, fill in the interface name, interface path and other information, and submit it for saving.

![]( Interface Document Tutorial_1.png)

Interface settings, enter the [interface settings] tab bar, set the request and response parameter format

![]( Interface Document Tutorial_2.png)

Set request and response body

![]( Interface Documentation Tutorial _3.png)

![]( Interface Documentation Tutorial _4.png)

![]( Interface Documentation Tutorial _6.png)

2. Open the browser access interface!

You can directly click the /user/info url link in the interface document to open the browser tab access interface. The fixed host is:, and the suffix is ​​spliced ​​to the url you defined. can.

![]( Interface Documentation Tutorial _7.png)

3. Custom interface logic (marked!)

You will find that the return data of the interface you wrote now is fixed, so how do you make it "moving"? Enter the [code implementation] tab bar

![]( Implementation Tutorial_1.png)

Don’t worry about the specific logic of the code that appears in front of you, as detailed later. Simple and rude, we first change the name and age of the return value, as shown below:

![]( Implementation Tutorial_2.png)

Then access the interface url (if it has been opened, remember to refresh the browser):

![]( Implementation Tutorial _3.png)

Or you can directly click on the "Run" button in the [Code Implementation] column to view the results returned by the interface:

![]( Implementation Tutorial _4.png)

The above is just a simple logic customization. The reality is that we have to operate multiple database tables frequently. The guest officer should follow the next section. [Build a model]

4. Create a model (marked!)

First enter the [Model] page, the model is exclusive to each project, all interfaces under a project can operate the model. You can understand that the model is a table in the database.

![]( Operation Tutorial_1.png)

** ! Be sure to follow the order of operation 1, 2, 3, etc.

Add fields to the model and fill in the field information. Click on the red arrow "+" button in the picture!

![]( Operation Tutorial_2.png)

The last step: Don’t forget to click the [Save All] button! ! !

![]( Operation Tutorial_3.png)

In order to facilitate the query of the interface, we add some test data to the model:

![]( Operation Tutorial_4.png)

![]( Operation Tutorial_5.png)

Please follow the steps shown to add, you can add two more. (The data is added in time to save it, don’t worry ~~)

![]( Operation Tutorial_6.png)

Ok, the guest officer, with the model, use it quickly, see the next section for details!

5. Use the model in the interface (marked!)

The following operations may be very different from your traditional programming habits. It will challenge your mvc three-layered thinking, simplifying it, and breaking it first!

Let us directly restore the essence of programming! Operating data!

![]( Operation Model Tutorial _1-1.png)

In order to prevent you from manually typing the code, please post the return code block below.

 Return Maps.of("list",sql(S(
            Select * from person

Click the [Run] button below!

![]( Operation Model Tutorial_2.png)

Things are not over yet! Do you remember the request parameters of the interface you have filled out?

![]( Operation Model Tutorial _3.png)

Let’s try to use the parameters in the code:

![]( Operation Model Tutorial _4.png)

return partial code reference:

 Return Maps.of("list",sql(S(
            Select * from person
            Where userId='${userId}'

Then let’s run it:

![]( Operation Model Tutorial _5.png)

Amount? Why don’t you have data? Open the [Display Parameters] switch in the above figure to see:

![]( Operation Model Tutorial _6.png)

If your memory is good enough, you should be able to find that there are no users with a user id of "123" when adding model test data. It doesn’t matter, we try to change the entry to "1", then click the [Run] button to try:

![]( Operation Model Tutorial _7.png)

Of course you can also change to "2" or other useId you just added in the model. Finally, you can also click the [Access in Browser] link:

![]( Operation Model Tutorial _8.png)

What? Who said that it can only be accessed in the form of GET? ? On Postman! !

![]( Operation Model Tutorial _9.png)

You are right, all interfaces created through [CodingAir Cloud Service Development Platform] ( support both GET and POST request methods. The post form request body is standard. Json, the get form parameter name is fixed to _, and the parameter value is the value of the json string after url encoding.

Is it feeling amazing? ! You can tell you clearly that all of this is not magic, everything is created based on your favorite – JAVA!

Want to know some of the details and features? Please go down and look at the [Programming Guide]!

Programming Guide

  Available maven dependencies: [CodingAir Cloud Service Development Platform – available maven dependencies] (
Commonly used tool class CommonUtils: [CodingAir cloud service development platform – CommonUtils] (

1. What if Java can have multiple lines of strings? !

You may have noticed in the [Quick Start] section that you can use the Java standard multi-line comments to write when returning the json format response body or writing sql!

Under normal circumstances, java is a multi-line form that does not support standard strings, and [CodingAir Cloud Service Development Platform] ( will be implemented in a more elegant way – multi-line comments.

Use the S function

Last modified: 2019年3月29日



鹏哥棒棒哒 :cowboy:



Write a Reply or Comment

Your email address will not be published.