https://github.com/dino4608/job-hunter-backend
A backend service uses Spring boot, MySQL
https://github.com/dino4608/job-hunter-backend
Last synced: 3 months ago
JSON representation
A backend service uses Spring boot, MySQL
- Host: GitHub
- URL: https://github.com/dino4608/job-hunter-backend
- Owner: dino4608
- Created: 2024-07-27T09:54:43.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-09-03T02:45:07.000Z (9 months ago)
- Last Synced: 2025-02-14T13:46:00.477Z (3 months ago)
- Language: Java
- Size: 262 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Về tác giả
Nguyễn Trung Nhân## Rest API
Các khái niệm:
- Rest API,
- JSON,
- API,
- HTTP protocol *,
- HTTP Status *## CRUD với Spring Rest
- Annotation:
- `@RestController`,
- `@RequestBody`,
- `@PathVariable`
- Spring Data Rest: auto CRUD simply
- HTTP method:
- `@GetMapping`:
- không truyền data ở body, truyền ở url (`@PathVariable`)
- `@PostMapping`:
- có thể truyền data ở body (`@RequestBody`)
- `@PatchMapping`
- applies partial modifications to a resource
- `@PutMapping`
- override a resource with the request payload
- `@DeleteMapping`
- Format response:
- API:
- Header
- Status
- Body
- `ResponseEntity`
- abc