Repository navigation
Expand file tree
/
Copy pathDay20-ref-notes.txt
More file actions
91 lines (36 loc) · 1.74 KB
/
Copy pathDay20-ref-notes.txt
File metadata and controls
91 lines (36 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
======================================================
=> explore additional datasource properties in spring boot application.properties file
=> explore all the properties we can configure in spring boot application.properties file
=======================================================
Spring Boot - REST API - hibernate (native)
Spring Boot - REST API - JPA (hibernate provider)
Spring Boot - REST API - Spring Data JPA
---------------------------------------------------------------
-> create a REST API for employee management system
-> REST clients should be able to
-> Get a list of employees /api/employees GET
-> Get a single employee by id /api/employees/{empid} GET
-> Add a new employee /api/employees POST (send the data from client in the form of json object)
-> update an employee /api/employees PUT (send the data from client in the form of json object)
-> delete an employee /api/employees/{empid} DELETE
-> get count of employees
-> get employees whose sal is greater than given sal
->.....
->...
1. create spring boot app using start.spring.io / spring initializr
2. configure the datasource properties in application.properties files
#configure datasource properties
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:xe
spring.datasource.username=system
spring.datasource.password=manager
*=> based on above configuration, spring boot will automatically create below beans...
1. DataSource
2. EntityManager
3. create Entities
Employee
4. create DAO interface
5. Create DAO implementation
6. Create REST controller
1. Spring Boot
2. Spring Data JPA
3. Spring Data REST