From 2f511ef17db1afdd34e0e80f95458b56adfcea45 Mon Sep 17 00:00:00 2001 From: heibaiying <31504331+heibaiying@users.noreply.github.com> Date: Thu, 22 Aug 2019 14:45:30 +0800 Subject: [PATCH] Update README.md --- spring/spring-jdbc/README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/spring/spring-jdbc/README.md b/spring/spring-jdbc/README.md index bad09c8..86be10e 100644 --- a/spring/spring-jdbc/README.md +++ b/spring/spring-jdbc/README.md @@ -3,21 +3,22 @@ ## 一、说明 -#### 1.1 项目结构 +### 1.1 项目结构
-#### 1.2 项目依赖 + +### 1.2 项目依赖 ```xml @@ -43,7 +44,7 @@ ## 二、整合 JDBC Template -#### 2.1 数据库配置 +### 2.1 数据库配置 在 resources 文件夹下新建数据库配置文件 `jdbc.properties`,内容如下: @@ -61,7 +62,7 @@ oracle.username=用户名 oracle.password=密码 ``` -#### 2.2 配置数据源 +### 2.2 配置数据源 在配置文件中配置 JDBC 数据源并定义事务管理器: @@ -111,7 +112,7 @@ oracle.password=密码 ``` -#### 2.3 数据查询 +### 2.3 数据查询 新建查询接口及其实现类,以下示例分别查询的是 MySQL 和 Oracle 中的字典表: @@ -167,7 +168,7 @@ public class OracleDaoImpl implements OracleDao { } ``` -#### 2.4 测试查询 +### 2.4 测试查询 新建测试类进行测试: