-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspringboot-architechture-explanation
More file actions
31 lines (26 loc) · 1.43 KB
/
springboot-architechture-explanation
File metadata and controls
31 lines (26 loc) · 1.43 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
// Spring Boot Architecture
//Spring Boot Architecture has four layers:
//Presentation Layer – Authentication & Json Translation (CONTROLLER)
// ✔️ Performing authentication.
// ✔️ Converting JSON data into an object (and vice versa).
// ✔️ Handling HTTP requests.
// ✔️ Transfering authentication to the business layer.
//Business Layer – Business Logic, Validation & Authorization (SERVICE)
// The Business layer communicates with both the Presentation layer and the Persistence Layer.
// ✔️ Performing validation.
// ✔️ Performing authorization.
// ✔️ Handling the business logic and rules.
//Persistence Layer – Storage Logic
// This layer is responsible for:
//
// ✔️ Containing storage logic.
//
// ✔️ Fetching objects and translating them into database rows (and vice versa).
//Database Layer – Actual Database
// controller is responsible for handling the client request first
// controller then call the appropiate service
// service then class the repository
//Annotation
//@Controller : Annotated class indicates that it is a controller component, and mainly used at the presentation layer.
//@Service : It indicates annotated class is a Service component in the business layer.
// @Repository : You need to use this annotation within the persistence layer, this acts like database repository.