官术网_书友最值得收藏!

Summary

In this chapter, we used JPA to create our Spring Boot application database. First, we created entity classes, which are mapped to database tables. Then, we created CrudRepository for our entity class and that provides CRUD operations for the entity. After that, we managed to add some demo data to our database by using CommandLineRunner. We also created one-to-many relations between two entities. At the beginning of the chapter, we used the H2 in-memory database, while at the end, we switched the database to MariaDB. In the next chapter we will create RESTful web service to our backend.

主站蜘蛛池模板: 仁怀市| 城口县| 景谷| 宿迁市| 永和县| 宾川县| 射洪县| 永顺县| 建昌县| 石楼县| 巴塘县| 衡东县| 论坛| 婺源县| 宜兰县| 图木舒克市| 巴林右旗| 剑阁县| 静安区| 南雄市| 卢氏县| 四川省| 靖边县| 易门县| 香港| 毕节市| 长兴县| 赤壁市| 远安县| 民乐县| 米脂县| 蒙自县| 合山市| 双流县| 个旧市| 连南| 确山县| 九江市| 丰县| 云南省| 增城市|