如何将 spring jpa 与 spring boot 集成? [英] How to integrate spring jpa with spring boot?
本文介绍了如何将 spring jpa 与 spring boot 集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习弹簧靴.我可以将 spring boot 与 hibernate (spring jpa) 集成在一起吗?使用 MySQL 数据库访问数据?请帮帮我.我正在使用弹簧靴 2.x.x.
I'm learning about spring boot. Can I integrate spring boot with hibernate (spring jpa). Accessing data with MySQL Database? Please help me. I'm using spring boot 2.x.x.
推荐答案
当然,你可以将 spring boot 与 spring jpa - hibernate 集成.将依赖添加到项目的 pom.xml
Certainly, you can integrate spring boot with spring jpa - hibernate. Add the dependencies to the project's pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
这篇关于如何将 spring jpa 与 spring boot 集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文