Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hel-developer-guide
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hel-guide
hel-developer-guide
Commits
dae60539
Commit
dae60539
authored
Sep 15, 2017
by
冯景珉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update database-config.md
parent
069a1a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
database-config.md
后端开发/database-config.md
+6
-6
No files found.
后端开发/database-config.md
View file @
dae60539
...
...
@@ -5,19 +5,19 @@
1.
服务数据源配置
*
融租易默认使用 JNDI 来配置数据源。数据源的配置独立于项目配置
*
默认使用的 JNDI name 为
`jdbc/h
el
_dev`
*
默认使用的 JNDI name 为
`jdbc/h
ls
_dev`
*
tomcat 需要配置 context.xml:
-
Mysql
```
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/h
el" 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/h
ls" 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/h
el_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/h
ls_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=h
el" 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=h
ls" 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/h
el
_dev
db.jndiName=java:comp/env/jdbc/h
ls
_dev
mybatis.identity=SEQUENCE
```
* 当数据库为mysql时
```
db.type=mysql
db.jndiName=java:comp/env/jdbc/h
el
_dev
db.jndiName=java:comp/env/jdbc/h
ls
_dev
```
* 修改完毕后复制一份放到 resources/profiles/dev (覆盖)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment