当前位置:网站首页>Learn how to get a database connection with JDBC
Learn how to get a database connection with JDBC
2022-07-31 06:23:00 【slx9920】
1. Preparations
1.1 Import JDBC jar package
First, we need a jar package for the JDBC driver, which you can download from the official website.
- Oracle's driver: oracle.jdbc.driver.OracleDriver
- MySQL driver: com.mysql.jdbc.Driver
Next, import the JDBC jar package into the IDEA class library: press Ctrl+Shift+Alt+s to open Project Structure, click "+",Select Java, find the storage location of your JDBC, and click OK.

The following means the import was successful
1.2 create a database in MySQL

Ideas
You can use Maven to manage the project download and import JDBC jar package. I have not tried this method. Interested friends can try it. I also want to know!
2. Create a configuration file
As follows, first create a file, here I created it under the corresponding package, of course, you can also create it under the src of the project, and write the basic information of the database connection

3. Write code

It works perfectly, very nice, perfect,
边栏推荐
- WeChat applet source code acquisition and decompilation method
- Cholesterol-PEG-Azide CLS-PEG-N3 Cholesterol-PEG-Azide MW:3400
- cv2.imread()
- 拒绝采样小记
- Tencent Cloud GPU Desktop Server Driver Installation
- Cholesterol-PEG-Amine CLS-PEG-NH2 Cholesterol-Polyethylene Glycol-Amino Research Use
- Cholesterol-PEG-Thiol CLS-PEG-SH 胆固醇-聚乙二醇-巯基
- Understanding of objects and functions in js
- MySQL 入门:Case 语句很好用
- Hyperparameter Optimization - Excerpt
猜你喜欢

活体检测PatchNet学习笔记

Attention based ASR(LAS)

CAS:1403744-37-5 DSPE-PEG-FA 科研实验用磷脂-聚乙二醇-叶酸

mPEG-DMPE Methoxy-polyethylene glycol-bismyristyl phosphatidylethanolamine for stealth liposome formation

ROS之service编程的学习和理解

qt:cannot open C:\Users\某某某\AppData\Local\Temp\main.obj.15576.16.jom for write

深度学习知识点杂谈

Pytorch学习笔记13——Basic_RNN

unicloud cloud development record

Cholesterol-PEG-Amine CLS-PEG-NH2 Cholesterol-Polyethylene Glycol-Amino Research Use
随机推荐
cv2.resize()是反的
Natural language processing related list
Embedding cutting-edge understanding
科研试剂Cholesterol-PEG-Maleimide,CLS-PEG-MAL,胆固醇-聚乙二醇-马来酰亚胺
日志jar包冲突,及其解决方法
MYSQL transaction and lock problem handling
关于Iframe
MySQL 主从切换步骤
OpenCV中的图像数据格式CV_8U定义
Redis-哈希
Cholesterol-PEG-DBCO 胆固醇-聚乙二醇-二苯基环辛炔化学试剂
Cholesterol-PEG-Azide CLS-PEG-N3 胆固醇-聚乙二醇-叠氮 MW:3400
VTK:Could not locate vtkTextRenderer object.
Navicat从本地文件中导入sql文件
MW: 3400 4-Arm PEG-DSPE four-arm-polyethylene glycol-phospholipid a saturated 18-carbon phospholipid
朴素贝叶斯文本分类(代码实现)
ROS之service编程的学习和理解
禅道安装及使用教程
CNN的一点理解
wangeditor编辑器内容传至后台服务器存储