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

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, which 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 a RESTful web service for our backend. We will also look at testing the RESTful web service with the curl command-line tool, and also by using Postman GUI.

主站蜘蛛池模板: 偏关县| 包头市| 平湖市| 新蔡县| 文水县| 渭源县| 怀宁县| 城步| 长汀县| 驻马店市| 酉阳| 阿瓦提县| 淮阳县| 徐汇区| 竹溪县| 临沭县| 闸北区| 宜兴市| 巴南区| 确山县| 西吉县| 洪泽县| 耒阳市| 扶风县| 安福县| 大同市| 潢川县| 花莲县| 岳普湖县| 区。| 称多县| 凌源市| 出国| 清水河县| 延吉市| 北流市| 华阴市| 云安县| 峨眉山市| 东安县| 蚌埠市|