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
*[2.3 Using IntellIJ IDEA Ultimate to make the installation](#2.3)
45
+
57
46
*### [5.Extra](#5)
58
47
*[5.1 Recommend](#5.1)
59
48
*[5.2 Author](#5.2)
@@ -170,55 +159,79 @@ Response:
170
159
<br />
171
160
172
161
173
-
## <h2id="4">4.Getting started<h2/>
162
+
## <h2id="2">2.Getting started<h2/>
174
163
175
164
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.
176
165
177
-
### <h3id="4.1">4.1 Using Eclipse to make installation<h3/>
166
+
### <h3id="2.1">2.1 Using Eclipse to make installation<h3/>
178
167
179
-
#### <h4id="4.1.1">4.1.1 prerequisites<h4/>
168
+
#### <h4id="2.1.1">2.1.1 prerequisites<h4/>
180
169
181
170
Java Development Kit(JDK): 1.8 or above
182
171
[MAVEN](https://maven.apache.org/download.cgi): 3.0 or above
183
172
Mysql / Oracle
184
173
[Eclipse Java EE IDE](https://www.eclipse.org/downloads/)for Web Developers.Version: Mars.1 Release (4.5.1)
185
174
186
-
#### <h4id="4.1.2">4.1.2 Opening the project with Eclipse<h4/>
175
+
#### <h4id="2.1.2">2.1.2 Opening the project with Eclipse<h4/>
187
176
188
177
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*
189
178
190
-
#### <h4id="4.1.3">4.1.3 Preparing the library used in demo<h4/>
179
+
#### <h4id="2.1.3">2.1.3 Preparing the library used in demo<h4/>
191
180
192
181
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.
193
182
194
-
#### <h4id="4.1.4">4.1.4 Configuration<h4/>
183
+
#### <h4id="2.1.4">2.1.4 Configuration<h4/>
195
184
196
-
Open the class named apijson.demo.server.DemoSQLConfig , then change return values of `getDBUri`,`getDBAccount`,`getDBPassword`,`getSchema` to your own database.
185
+
Open apijson.demo.server.DemoSQLConfig. In line 40-61, change return values of `getDBUri`,`getDBAccount`,`getDBPassword`,`getSchema` to your own database.<br/>
return StringUtil.isEmpty(s, true) ? "thea" : s; //TODO: Change the return value to your own. For here,change "thea" to "your database's name"
207
+
}
208
+
</code></pre>
197
209
198
-
**Note**: Instead of this step, you can also [import your database](#4.2).
210
+
**Note**: Instead of this step, you can also [import your database](#2.2).
199
211
200
-
#### <h4id="4.1.5">4.1.5 Running the application<h4/>
212
+
#### <h4id="2.1.5">2.1.5 Running the application<h4/>
201
213
202
214
In Eclipse, in the menu on the top, click *Run>Run As>Java Application>choose APIJSONApplication>OK*
203
215
204
-
### <h3id="4.2">4.2 Import MySQL table files<h3/>
216
+
### <h3id="2.2">2.2 Import MySQL table files<h3/>
217
+
218
+
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 />
205
219
206
-
This Server project needs MySQL Server and MySQLWorkbench. Please ensure that both of them are installed.<br />
207
220
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.
208
221
209
-
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.
222
+
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.
210
223
211
-
### <h3id="4.3">4.3 Using IntellIJ IDEA Ultimate to make the installation<h3/>
224
+
### <h3id="2.3">2.3 Using IntellIJ IDEA Ultimate to make the installation<h3/>
212
225
213
-
#### <h4id="4.3.1">4.3.1 Opening the project<h4/>
226
+
#### <h4id="2.3.1">2.3.1 Opening the project<h4/>
214
227
215
228
*Open > Select the path of the project/APIJSON-Java-Server/APIJSONBoot > OK*
216
229
217
-
#### <h4id="4.3.2">4.3.2 Preparing the library used in demo<h4/>
230
+
#### <h4id="2.3.2">2.3.2 Preparing the library used in demo<h4/>
218
231
219
232
In libs, right-click *apijson-orm.jar >Add as Library>OK*. Apply this to all *.jar* files in libs.
220
233
221
-
#### <h4id="4.3.3">4.3.3 Running the application<h4/>
234
+
#### <h4id="2.3.3">2.3.3 Running the application<h4/>
222
235
223
236
In the menu on the top: *Run > Run > Edit Configurations > + > Application > Configuration*<br />
224
237
In *Main class* , choose *APIJSONApplication*;<br />
@@ -228,7 +241,7 @@ Click *Run* in the bottom.
228
241
**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)
229
242
230
243
231
-
### <h3id="4.4">4.4 Run Client project with ADT Bundle or Android Studio<h3/>
244
+
### <h3id="3">4.4 Run Client project with ADT Bundle or Android Studio<h3/>
232
245
233
246
You can skip this step and download the Client App below.
0 commit comments