File tree 2 files changed +69
-2
lines changed
src/test/java/com/example/easynotes
2 files changed +69
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Spring Boot, MongoDB, Angular-4 Restful API Tutorial
2
+
3
+ Build Restful CRUD API for a simple Note-Taking application using Spring Boot, Mysql, JPA and Hibernate.
4
+
5
+ ## Requirements
6
+
7
+ 1 . Java - 1.8.x
8
+
9
+ 2 . Maven - 3.x.x
10
+
11
+ 3 . Mysql - 5.x.x
12
+
13
+ ## Steps to Setup
14
+
15
+ ** 1. Clone the application**
16
+
17
+ ``` bash
18
+ git@github.com:callicoder/spring-boot-mysql-rest-api-tutorial.git
19
+ ```
20
+
21
+ ** 2. Create Mysql database**
22
+ ``` bash
23
+ create database notes_app
24
+ ```
25
+
26
+ ** 3. Change mysql username and password as per your installation**
27
+
28
+ + open src/main/resources/application.properties
29
+
30
+ + change ` spring.datasource.username ` and ` spring.datasource.password ` as per your mysql installation
31
+
32
+ ** 2. Build and run the app using maven**
33
+
34
+ ``` bash
35
+ mvn package
36
+ java -jar target/easy-notes-1.0.0.jar
37
+ ```
38
+
39
+ Alternatively, you can run the app without packaging it using -
40
+
41
+ ``` bash
42
+ mvn spring-boot:run
43
+ ```
44
+
45
+ The app will start running at < http://localhost:8080 > .
46
+
47
+ ## Explore Rest APIs
48
+
49
+ The app defines following CRUD APIs.
50
+
51
+ GET /api/notes
52
+
53
+ POST /api/notes
54
+
55
+ GET /api/notes/{noteId}
56
+
57
+ PUT /api/notes/{noteId}
58
+
59
+ DELETE /api/notes/{noteId}
60
+
61
+ You can test them using postman or any other rest client.
62
+
63
+ ## Learn more
64
+
65
+ You can find the tutorial for this application on my blog -
66
+
67
+ < https://www.callicoder.com/spring-boot-rest-api-tutorial-with-mysql-jpa-hibernate/ >
Original file line number Diff line number Diff line change 1
- package com .example ;
1
+ package com .example . easynotes ;
2
2
3
3
import org .junit .Test ;
4
4
import org .junit .runner .RunWith ;
7
7
8
8
@ RunWith (SpringRunner .class )
9
9
@ SpringBootTest
10
- public class SpringBootMysqlRestApiTutorialApplicationTests {
10
+ public class EasyNotesApplicationTests {
11
11
12
12
@ Test
13
13
public void contextLoads () {
You can’t perform that action at this time.
0 commit comments