Skip to content

Commit 2d8d7af

Browse files
authoredMay 14, 2021
Merge pull request #235 from Wscats/patch-1
Update README-English.md
2 parents d78967a + 5750a55 commit 2d8d7af

File tree

1 file changed

+34
-29
lines changed

1 file changed

+34
-29
lines changed
 

‎README-English.md

+34-29
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,22 @@ With APIJSON, client developers will no longer be suffered from possible errors
7575
Server developers no longer need to worry about compatibility of APIs and documents with legacy apps.
7676

7777
### Examples:
78+
7879
#### Get a User
7980
Request:
80-
<pre><code class="language-json">
81+
82+
```json
8183
{
8284
"User":{
8385
 }
8486
}
85-
</code></pre>
87+
```
8688

8789
[Click here to test](http://apijson.cn:8080/get/{"User":{}})
8890

8991
Response:
90-
<pre><code class="language-json">
92+
93+
```json
9194
{
9295
"User":{
9396
"id":38710,
@@ -106,13 +109,14 @@ Response:
106109
"code":200,
107110
"msg":"success"
108111
}
109-
</code></pre>
110-
112+
```
111113
<br />
112114

113115
#### Get an Array of Users
116+
114117
Request:
115-
<pre><code class="language-json">
118+
119+
```json
116120
{
117121
"[]":{
118122
  "count":3,             //just get 3 results
@@ -121,12 +125,13 @@ Request:
121125
  }
122126
}
123127
}
124-
</code></pre>
128+
```
125129

126130
[Click here to test](http://apijson.cn:8080/get/{"[]":{"count":3,"User":{"@column":"id,name"}}})
127131

128132
Response:
129-
<pre><code class="language-json">
133+
134+
```json
130135
{
131136
"[]":[
132137
{
@@ -151,7 +156,7 @@ Response:
151156
"code":200,
152157
"msg":"success"
153158
}
154-
</code></pre>
159+
```
155160

156161
<br />
157162

@@ -188,28 +193,28 @@ In the menu at the right, click libs, right click apijson-orm.jar,click add as l
188193

189194
Open apijson.demo.server.DemoSQLConfig. In line 40-61, change return values of `getDBUri`,`getDBAccount`,`getDBPassword`,`getSchema` to your own database.<br/>
190195

191-
<pre><code class="language-java">
196+
```java
197+
@Override
198+
public String getDBUri() {
199+
//TODO: Change the return value to your own
200+
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "jdbc:postgresql://localhost:5432/postgres" : "jdbc:mysql://192.168.71.146:3306/";
201+
}
202+
@Override
203+
public String getDBAccount() {
204+
//TODO: Change the return value to your own
205+
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "postgres" : "root";
206+
}
192207
@Override
193-
public String getDBUri() {
194-
//TODO: Change the return value to your own
195-
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "jdbc:postgresql://localhost:5432/postgres" : "jdbc:mysql://192.168.71.146:3306/";
196-
}
197-
@Override
198-
public String getDBAccount() {
208+
public String getDBPassword() {
199209
//TODO: Change the return value to your own
200-
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "postgres" : "root";
201-
}
202-
@Override
203-
public String getDBPassword() {
204-
//TODO: Change the return value to your own
205-
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? null : "root";
206-
}
207-
@Override
208-
public String getSchema() {
209-
String s = super.getSchema();
210-
return StringUtil.isEmpty(s, true) ? "thea" : s; //TODO: Change the return value to your own. For here,change "thea" to "your database's name"
211-
}
212-
</code></pre>
210+
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? null : "root";
211+
}
212+
@Override
213+
public String getSchema() {
214+
String s = super.getSchema();
215+
return StringUtil.isEmpty(s, true) ? "thea" : s; //TODO: Change the return value to your own. For here,change "thea" to "your database's name"
216+
}
217+
```
213218

214219
**Note**: Instead of this step, you can also [import your database](#2.2).
215220

0 commit comments

Comments
 (0)
Please sign in to comment.