You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-English.md
+2-88Lines changed: 2 additions & 88 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,94 +162,8 @@ Note: The UI is APIAuto, the URL+JSON is APIJSON<br/>
162
162
163
163
164
164
## <h2id="2">2.Server-side deployment<h2/>
165
-
166
-
You can use either Eclipse for JavaEE or IntelllJ IDEA Ultimate to make installation. For both, first download the project and save it to a path.
167
-
168
-
### <h3id="2.1">2.1 Installing with Eclipse<h3/>
169
-
170
-
#### <h4id="2.1.1">2.1.1 prerequisites<h4/>
171
-
172
-
Java Development Kit(JDK): 1.8 or above
173
-
[MAVEN](https://maven.apache.org/download.cgi): 3.0 or above
174
-
Mysql / Oracle
175
-
[Eclipse Java EE IDE](https://www.eclipse.org/downloads/)for Web Developers.Version: Mars.1 Release (4.5.1)
176
-
177
-
#### <h4id="2.1.2">2.1.2 Opening the project with Eclipse<h4/>
178
-
179
-
Open Eclipse> *File > Import > Maven > Existing Maven Projects > Next > Browse > Select the path of the project you saved / APIJSON-Java-Server / APIJSONBoot > check pom.xml...apijson-demo > Finish*
180
-
181
-
#### <h4id="2.1.3">2.1.3 Preparing the library used in demo<h4/>
182
-
183
-
In the menu at the right, click libs, right click apijson-orm.jar,click add as library. Apply the same to the rest *.jar* files in libs.
184
-
185
-
#### <h4id="2.1.4">2.1.4 Configuration<h4/>
186
-
187
-
Open apijson.demo.server.DemoSQLConfig. In line 40-61, change return values of `getDBUri`,`getDBAccount`,`getDBPassword`,`getSchema` to your own database.<br/>
// add userSSL=false for MySQL 8.0+ return "jdbc:mysql://localhost:3306?userSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8";
204
-
// for MySQL not greater than 5.7
205
-
return"jdbc:mysql://localhost:3306?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; // TODO TiDB can be used as MySQL, its defaut port is 4000
206
-
}
207
-
208
-
@JSONField(serialize=false)
209
-
@Override
210
-
publicString getDBAccount() {
211
-
return"root"; // TODO
212
-
}
213
-
214
-
@JSONField(serialize=false)
215
-
@Override
216
-
publicString getDBPassword() {
217
-
return"apijson"; // TODO TiDB can be used as MySQL, its defaut password is an empty string ""
218
-
}
219
-
```
220
-
221
-
**Note**: Instead of this step, you can also [import your database](#2.2).
222
-
223
-
#### <h4id="2.1.5">2.1.5 Running the application<h4/>
224
-
225
-
In Eclipse, in the menu on the top, click *Run>Run As>Java Application>choose APIJSONApplication>OK*
226
-
227
-
### <h3id="2.2">2.2 Import MySQL table files<h3/>
228
-
229
-
This Server project needs [MySQL Server](https://dev.mysql.com/downloads/mysql/) and [MySQLWorkbench](https://www.mysql.com/products/workbench/). Please make sure that both of them are installed.<br />
230
-
231
-
My config is Windows 7 + MySQL Community Server 5.7.16 + MySQLWorkbench 6.3.7 and OSX EI Capitan + MySQL Community Server 5.7.16 + MySQLWorkbench 6.3.8. Systems and softwares are all 64 bit.
232
-
233
-
Start *MySQLWorkbench > Enter a connection > Click Server menu > Data Import > Select the path of your .sql file > Start Import > Refresh SCHEMAS*. Now you should see tables are added successfully.
234
-
235
-
### <h3id="2.3">2.3 Installing with IntellIJ IDEA Ultimate<h3/>
236
-
237
-
#### <h4id="2.3.1">2.3.1 Opening the project<h4/>
238
-
239
-
*Open > Select the path of the project/APIJSON-Java-Server/APIJSONBoot > OK*
240
-
241
-
#### <h4id="2.3.2">2.3.2 Preparing the library used in demo<h4/>
242
-
243
-
In libs, right-click *apijson-orm.jar >Add as Library>OK*. Apply this to all *.jar* files in libs.
244
-
245
-
#### <h4id="2.3.3">2.3.3 Running the application<h4/>
246
-
247
-
In the menu on the top: *Run > Run > Edit Configurations > + > Application > Configuration*<br />
248
-
In *Main class* , choose *APIJSONApplication*;<br />
249
-
In *Use classpath of module* , choose *apijson-demo*.<br />
250
-
Click *Run* in the bottom.
251
-
252
-
**Note**: After running, you should see APIJSON test logs and in the last, it would show ‘APIJSON已启动’. If it shows ‘address already in use’, that means port 8080 has been used . You need tochange the port. See [how to change ports for a Spring Boot Application.](https://stackoverflow.com/questions/21083170/how-to-configure-port-for-a-spring-boot-application)
165
+
You can skip this step and use 'apijson.cn:8080'. <br />
166
+
See https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/README-English.md
0 commit comments