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
0
Merge Requests
0
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
chenhao
hel-developer-guide
Commits
b0dab278
Commit
b0dab278
authored
Aug 03, 2017
by
高洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates 后端开发/database-config.md
Auto commit by GitBook Editor
parent
84a98b5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
database-config.md
后端开发/database-config.md
+8
-8
No files found.
后端开发/database-config.md
View file @
b0dab278
...
...
@@ -4,20 +4,20 @@
##配置文件
1.
数据源配置
*
hap
默认使用 JNDI 来配置数据源。数据源的配置独立于项目配置
*
默认使用的 JNDI name 为
`jdbc/h
ap
_dev`
*
融租易
默认使用 JNDI 来配置数据源。数据源的配置独立于项目配置
*
默认使用的 JNDI name 为
`jdbc/h
el
_dev`
*
tomcat 需要配置 context.xml:
-
Mysql
```
xml
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/h
ap_dev" name="jdbc/hap_dev" type="javax.sql.DataSource" username="hap_dev" password="hap
_dev"/>
```
<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"/>
```
-
Oracle
```
xml
<Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" name="jdbc/h
ap_dev" type="javax.sql.DataSource" url="jdbc:oracle:thin:@192.168.115.136:1521:HAP" username="hap_dev" password="hap
_dev"/>
```
<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"/>
```
-
SqlServer
```
xml
<Resource auth="Container" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://1
0.211.55.6:1433; DatabaseName=hap_dev" name="jdbc/hap_dev" type="javax.sql.DataSource" username="hap" password="handhap
dev"/>
```
<Resource auth="Container" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://1
27.0.0.1:1433; DatabaseName=hel" name="jdbc/hel_dev" type="javax.sql.DataSource" username="hel_dev" password="hel_
dev"/>
```
*
其他应用服务器 weblogic 等,需要按其配置方法 配置 JNDI
...
...
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