專案名稱 GameWeb
此作品使用於:網頁上玩俄羅斯方塊、貪食蛇 , 使用者分數可與其它玩家排名競爭
使用者可以用資源購買icon/title

專案動機
遊戲當主題是希望有個誘因讓使用者使用
將所學的前端/後端技術利用此專案來實作及熟悉
重新審視較不熟悉或會出錯的地方,訓練技術
希望透過使用者的回饋持續精進前後端 如何設計讓整個體驗更好

Spring Security 驗証使用者
● google oauth2 login
● 1. GCP OAuth/憑證
● 2. successfulHandler judgement login/register

User forgot password
● Auto mail send reset url
● Reset token=RandomString(45),10mins exp

UserInfo
thymeleaf 模板布局

Daily check score ranking
● @Scheduled+cron expression

Award
● Dailylogin : DB column “LastLoginDate”
● Game PB : UNIQUE KEY judgement INSERT/UPDATE
● Daily Top3 : DENSE_RANK,名次連續同分同名次都算



GCP
● Compute Engine
● Load balancing
1. front end https (google SSL)
2. http request redirect to https
● Cloud Domains
● Cloud DNS


Git
● git add/commit/remote add/push
● GitHub repository invite collaborator
● new branch PR => merge PR
● git fetch/pull=>program deployment

Linux(Ubuntu)
● Startup script
1. prerouting 80=>8080
2. & run project in the background

Exception handling
● ServiceException extends RuntimeException
● @RestControllerAdvice handle all others exception

心得分享
當想好題材要開始製作專題時,才發現之前學的技術在實作時常常會遇到意想不到的問題,翻找筆記或上網查詢有時也無法解決,幾乎都是靠一層一層的debug才找到真正的問題源頭。對於一些知識/技術的理解上也容易腦筋轉不過來搞不種,常常在看了一些影片或資料後才豁然開郎。
因此在學習java的這段時間裏,對我來說最重要的就是做筆記的習慣及方式,軟體相關工作涉及到的知識及技術非常廣泛,並且日新月異,學是學不完的,也不可能在短時間內熟練,一套適合自己的記錄筆記方式,並在自己曾出錯/難以理解的地方明顯註記解法/心得加深記憶,避免再次犯錯浪費時間。希望透過這個學習方式讓我的知識和經驗一步步堆疊,未來更加的得心應手。
Comments