Commit dae60539 authored by 冯景珉's avatar 冯景珉

Update database-config.md

parent 069a1a1a
......@@ -5,19 +5,19 @@
1. 服务数据源配置
* 融租易默认使用 JNDI 来配置数据源。数据源的配置独立于项目配置
* 默认使用的 JNDI name 为 `jdbc/hel_dev`
* 默认使用的 JNDI name 为 `jdbc/hls_dev`
* tomcat 需要配置 context.xml:
- Mysql
```
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/hel" name="jdbc/hel_dev" type="javax.sql.DataSource" username="hel_dev" password="hel_dev"/>
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/hls" name="jdbc/hls_dev" type="javax.sql.DataSource" username="hel_dev" password="hls_dev"/>
```
- Oracle
```
<Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" name="jdbc/hel_dev" type="javax.sql.DataSource" url="jdbc:oracle:thin:@127.0.0.1:1521:hel" username="hel_dev" password="hel_dev"/>
<Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" name="jdbc/hls_dev" type="javax.sql.DataSource" url="jdbc:oracle:thin:@127.0.0.1:1521:hls" username="hls_dev" password="hls_dev"/>
```
- SqlServer
```
<Resource auth="Container" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://127.0.0.1:1433; DatabaseName=hel" name="jdbc/hel_dev" type="javax.sql.DataSource" username="hel_dev" password="hel_dev"/>
<Resource auth="Container" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://127.0.0.1:1433; DatabaseName=hls" name="jdbc/hls_dev" type="javax.sql.DataSource" username="hls_dev" password="hls_dev"/>
```
* 其他[应用服务器weblogic](/框架功能描述/deployment.md)等,需要按其配置方法 配置 JNDI
......@@ -28,14 +28,14 @@
* 当数据库为 oracle 时
```
db.type=oracle
db.jndiName=java:comp/env/jdbc/hel_dev
db.jndiName=java:comp/env/jdbc/hls_dev
mybatis.identity=SEQUENCE
```
* 当数据库为mysql时
```
db.type=mysql
db.jndiName=java:comp/env/jdbc/hel_dev
db.jndiName=java:comp/env/jdbc/hls_dev
```
* 修改完毕后复制一份放到 resources/profiles/dev (覆盖)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment