Skip to content

Commit b3a4f65

Browse files
authored
2nd update_ part 4
完成了getting started部分,包括该project的两种安装办法。
1 parent 870d747 commit b3a4f65

1 file changed

Lines changed: 42 additions & 21 deletions

File tree

Document-English.md

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -465,42 +465,63 @@ DELETE: <br > delete data | base_url/delete/ | {<br > &nbsp;&nbsp; TableName:{<b
465465
<br />
466466

467467

468-
## <h2 id="4">4.Usage<h2/>
468+
## <h2 id="4">4.Getting started<h2/>
469+
470+
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.
469471

470-
### <h3 id="4.1">4.1 Download and unzip APIJSON project<h3/>
472+
### <h3 id="4.1">4.1 Using Eclipse to make installation<h3/>
471473

472-
Clone or download > Download ZIP > Unzip to a path and remember it.
474+
#### <h4 id="4.1.1">4.1.1 prerequisites<h4/>
475+
476+
Java Development Kit(JDK): 1.8 or above
477+
[MAVEN](https://maven.apache.org/download.cgi): 3.0 or above
478+
Mysql / Oracle
479+
[Eclipse Java EE IDE](https://www.eclipse.org/downloads/)for Web Developers.Version: Mars.1 Release (4.5.1)
473480

474-
#### You can skip step 2 and 3, and test server response with my server IP address apijson.cn:8080.<br />
481+
#### <h4 id="4.1.2">4.1.2 Opening the project with Eclipse<h4/>
482+
483+
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*
484+
485+
#### <h4 id="4.1.3">4.1.3 Preparing the library used in demo<h4/>
486+
487+
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.
475488

476-
### <h3 id="4.2">4.2 Import MySQL table files<h3/>
489+
#### <h4 id="4.1.4">4.1.4 Configuration<h4/>
490+
491+
Open the class named apijson.demo.server.DemoSQLConfig , then change return values of `getDBUri`,`getDBAccount`,`getDBPassword`,`getSchema` to your own database.
477492

478-
This Server project needs MySQL Server and MySQLWorkbench. And you must ensure that both of them were installed.<br />
479-
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. The systems and softwares are all 64 bit.
493+
**Note**: Instead of this step, you can also [import your database](#4.2).
494+
495+
#### <h4 id="4.1.5">4.1.5 Running the application<h4/>
480496

481-
Start MySQLWorkbench > Enter a connection > Click Server menu > Data Import > Select the path of APIJSON-Master/table > Start Import > Refresh SCHEMAS, and you'll see the tables were already added.
497+
In Eclipse, in the menu on the top, click *Run>Run As>Java Application>choose APIJSONApplication>OK*
482498

499+
### <h3 id="4.2">4.2 Import MySQL table files<h3/>
483500

484-
### <h3 id="4.3">4.3 Run Server project with Eclipse for JavaEE or IntellIJ IDEA Ultimate<h3/>
501+
This Server project needs MySQL Server and MySQLWorkbench. Please ensure that both of them are installed.<br />
502+
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.
485503

486-
If you haven't installed any editor above, please download and install one before run.<br />
487-
My config is Windows 7 + JDK 1.7.0_71 + Eclipse 4.6.1 + IntellIJ 2016.3 and OSX EI Capitan + JDK 1.8.0_91 + Eclipse 4.6.1 + IntellIJ 2016.2.5. The systems and softwares are all 64 bit.
504+
Start *MySQLWorkbench > Enter a connection > Click Server menu > Data Import > Select the path of APIJSON-Master/table > Start Import > Refresh SCHEMAS*, and you'll see the tables were already added.
488505

489-
#### Eclipse for JavaEE
506+
### <h3 id="4.3">4.3 Using IntellIJ IDEA Ultimate to make the installation<h3/>
507+
508+
#### <h4 id="4.3.1">4.3.1 Opening the project<h4/>
490509

491-
1.Import<br />
492-
File > Import > Maven > Existing Maven Projects > Next > Browse > Select the path of APIJSON-Master/APIJSON(Server)/APIJSON(Eclipse_JEE) > Finish
510+
*Open > Select the path of the project/APIJSON-Java-Server/APIJSONBoot > OK*
493511

494-
2.Run<br />
495-
Run > Run As > Java Application > Select APIJSONApplication > OK
512+
#### <h4 id="4.3.2">4.3.2 Preparing the library used in demo<h4/>
513+
514+
In libs, right-click *apijson-orm.jar >Add as Library>OK*. Apply this to all *.jar* files in libs.
496515

497-
#### IntellIJ IDEA Ultimate
516+
#### <h4 id="4.3.3">4.3.3 Running the application<h4/>
517+
518+
In the menu on the top: *Run > Run > Edit Configurations > + > Application > Configuration*<br />
519+
In *Main class* , choose *APIJSONApplication*;<br />
520+
In *Use classpath of module* , choose *apijson-demo*.<br />
521+
Click *Run* in the bottom.
498522

499-
1.Import<br />
500-
Open > Select the path of APIJSON-Master/APIJSON(Server)/APIJSON(Idea) > OK
523+
**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)
501524

502-
2.Run<br />
503-
Run > Run APIJSONApplication
504525

505526
### <h3 id="4.4">4.4 Run Client project with ADT Bundle or Android Studio<h3/>
506527

0 commit comments

Comments
 (0)