Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
noear committed Nov 23, 2019
1 parent 5e49a1d commit 83c437a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
| org.noear:weed3.cache.ehcache| 基于 ehcache 封装的扩展缓存服务 |
| org.noear:weed3.cache.j2cache| 基于 j2cache 封装的扩展缓存服务 |

实例化数据库上下文(一切都在上面操作)
```java
//DbContext db = new DbContext(properties); //使用Properties配置的示例
//DbContext db = new DbContext(map); //使用Map配置的示例
//DbContext db = new DbContext("user","proxool.xxx_db"); //使用proxool线程池配置的示例
//DbContext db = new DbContext("user",new HikariDataSource(...)); //使用DataSource配置的示例
DbContext db = new DbContext("user","jdbc:mysql://x.x.x:3306/user","root","1234");
```

#### 缓存服务支持:
###### 1.内置缓存服务
Expand All @@ -75,6 +67,15 @@ DbContext db = new DbContext("user","jdbc:mysql://x.x.x:3306/user","root","1234
</dependency>
```

#### 实例化数据库上下文:(一切都在上面操作)
```java
//DbContext db = new DbContext(properties); //使用Properties配置的示例
//DbContext db = new DbContext(map); //使用Map配置的示例
//DbContext db = new DbContext("user","proxool.xxx_db"); //使用proxool线程池配置的示例
//DbContext db = new DbContext("user",new HikariDataSource(...)); //使用DataSource配置的示例
DbContext db = new DbContext("user","jdbc:mysql://x.x.x:3306/user","root","1234");
```

### 一、纯java用法
示例1.1.1::入门级
```java
Expand Down

0 comments on commit 83c437a

Please sign in to comment.