- Spring Core
- Spring Web MVC
- Spring Data JPA
- Spring AOP
- Spring Cache Caffeine
- Java 8
- Spring Boot 2
- Spring Transaction
- BCrypt
- Spring Security
- JWT(JSON Web Token)
- ECDSA
- Spring Schedule
- Cron Expressions
- 安裝 JAVA jdk 8
- 安裝 Git
- aop: aop 相關實作
- auth: 身份驗證相關實作
- bo: 業務邏輯物件
- config: Spring 相關配置
- constant: 常數定義
- controller: Controller 定義
- dao: 資料存取物件
- dto: 資料傳輸物件
- error: 自定義例外
- factory: 工廠物件
- po: 持久物件(資料庫資料 mapping)
- scheduler: 排程相關實作
- service: 業務邏輯實作
- util: 共用元件實作
- validator: 資料檢核相關實作
$ git clone <url>
Step 8:http://localhost:8080/h2 開啟 DB 控制台
預設 http://localhost:8080/user 相關 API 皆需經過驗證才能使用。
Step 1:透過 API http://localhost:8080/auth/login 進行登入,成功將回傳 Token
- 預設帳號:admin
- 預設密碼:admin
NOTE: 密碼需先經過 RSA 加密,可透過 API http://localhost:8080/demo 進行加密
$ git checkout -b <your name> master
NOTE: 不需要快取
Content | |
---|---|
URL | /book |
HTTP Method | GET |
Desc | 查詢所有的 book |
Column | Type | Remarks |
---|---|---|
Repeating Structure | ||
name | String | 書名 |
author | String | 作者 |
publicationDate | String | 出版日期 yyyy-mm-dd |
Content | |
---|---|
URL | /book/{name} |
HTTP Method | GET |
Desc | 以 name 撈取 book |
Column | Type | Remarks |
---|---|---|
name | String | 書名 |
author | String | 作者 |
publicationDate | String | 出版日期 yyyy-mm-dd |
Content | |
---|---|
URL | /book |
HTTP Method | POST |
Desc | 1. 將請求(Request)的書籍資料寫入 Table「BOOK」2. 回傳已新增的書籍資料 |
Column | Type | Remarks |
---|---|---|
name | String | 書名 |
author | String | 作者 |
publicationDate | String | 出版日期 yyyymmdd |
Column | Type | Remarks |
---|---|---|
name | String | 書名 |
author | String | 作者 |
publicationDate | String | 出版日期 yyyy-mm-dd |
Content | |
---|---|
URL | /book/{name} |
HTTP Method | DELETE |
Desc | 以 name 來刪除書籍 |
Content | |
---|---|
URL | /book |
HTTP Method | PUT |
Desc | 1. 將請求(Request)的書籍資料更新對應書名的書籍資料 2. 若請求欄位為 null,則不更新此欄位 3. 回傳已更新的書籍資料 |
Column | Type | Remarks |
---|---|---|
name | String | 書名 |
author | String | 作者 |
publicationDate | String | 出版日期 yyyymmdd |
Column | Type | Remarks |
---|---|---|
name | String | 書名 |
author | String | 作者 |
publicationDate | String | 出版日期 yyyy-mm-dd |
NOTE: 使用 AOP 的方式實作
NOTE: 5-1 使用 Spring Security 實作
String stringToBase64String(String inputString)
String bytesToBase64String(byte[] bytes)
void decodeBase64String(String base64String)
NOTE: 使用 Spring Schedule 的方式實作
NOTE: 遵循專案架構並使用專案中的 @Validator 實作 request 檢核
- name:書名以「長->短」排序
- author:作者以英文字母「A -> Z」排序
- date:出版日期「新 -> 舊」排序
- 優點
- 使用條件
- 舉例