Spring Boot JPA + H2 example: Build a CRUD Rest APIs
Day 3
好不容易找到一個做得出來的教學⋯⋯
而且這個教學是幫你整套寫好 你只要連資料庫就可以動了! 沒想到光是連資料庫就查了兩個小時==
本來想用mysql 結果一直設定不好
後來是用H2資料庫(可以上網下載 mac 直接用homebrew)
影片裡筆記的錯誤只要讓h2連線的url跟application.properties的一致就可以解決
其他重點就是在我影片中用postman試完request都沒問題後才回頭去讀網站的說明
最後依照我的理解 統整出要建CRUD的流程大致是:
After searching several tutorial, I find this one which the author config all the project well. The only thing we have to do is connect to the database for fetching data.
However as a newbie, it costs me almost 2 hours to complete the step.
At the end of the day, i use H2 database (you can download online or just from homebrew if you are a mac user) instead of MySQL.
The Exception part of my note showed in the video, is that the JDBC URL should be the same as the url set in the application.properties.
I test all type of the request in the tutorial using Postman. After that, I go through the whole tutorial again and take my note.
The process of build a CRUD operation for my aspect as follows: