我们以 MySQL 为例来思考这个问题:第一步 - 把 Mysql 连接器的依赖项添加至 pom.xml<dependency> <groupId>mysql</g
我们以 MySQL 为例来思考这个问题:
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId></dependency>
或者至少把它作为测试的范围。
<!--<dependency> <groupId>com.h3Database</groupId> <artifactId>h3</artifactId><scope>test</scope></dependency>-->
更多的来看看这里 -https://GitHub.com/in28minutes/jpa-with-hibernate#installing-and-setting-up-mysql
配置 application.properties
spring.jpa.hibernate.ddl-auto=nonespring.datasource.url=jdbc:mysql://localhost:3306/todo_examplespring.datasource.username=todouserspring.datasource.passWord=YOUR_PASSWORD
--结束END--
本文标题: 如何连接一个像 MSSQL 或者 orcale 一样的外部数据库
本文链接: https://www.lsjlt.com/news/241150.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-13
2024-05-13
2024-05-13
2024-05-13
2024-05-13
2024-05-13
2024-05-12
2024-05-12
2024-05-12
2024-05-12
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0