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

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.

主站蜘蛛池模板: 天镇县| 横山县| 南丰县| 周口市| 定远县| 台山市| 车致| 鹤壁市| 澳门| 湘潭市| 信丰县| 宁蒗| 天等县| 苗栗县| 绩溪县| 南陵县| 沙洋县| 芦溪县| 田东县| 岑巩县| 澄迈县| 滨州市| 固始县| 湖口县| 清河县| 德令哈市| 丽水市| 普宁市| 山东省| 左权县| 卓尼县| 巴塘县| 靖州| 辛集市| 广元市| 夹江县| 历史| 会理县| 九寨沟县| 沐川县| 巍山|