# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/ccsmf2a
一個註解完美實現分佈式鎖**
1\. 業務背景有些業務請求,屬於耗時操作,需要加鎖,防止後續的併發操作,同時對數據庫的數據進行操作,需要避免對之前的業務造成影響。2. 分析流程使用 Redis 作爲分佈式鎖,將鎖的狀態放到 Redis 統一維護,解決集羣中單機 JVM 信息不互通的問題,規定操作順序,保護用戶的數據正確。梳理設計流程新建註解 @interface,在註解裏設定入參標誌 增加 AOP 切點,掃描特定註解 ⌘ Read more