Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
data-computing-proxy-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李振振
data-computing-proxy-test
Commits
2c4d842e
Commit
2c4d842e
authored
Nov 17, 2023
by
李振振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
63aec77f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/main/java/com/beagle/informix/service/impl/InformixJdbcProxyServiceImpl.java
...e/informix/service/impl/InformixJdbcProxyServiceImpl.java
+4
-3
No files found.
src/main/java/com/beagle/informix/service/impl/InformixJdbcProxyServiceImpl.java
View file @
2c4d842e
...
...
@@ -68,7 +68,7 @@ public class InformixJdbcProxyServiceImpl implements InformixService {
// Unknown exception: Can not find JDBC type `2005` in column type
Driver
driver
=
getDriver
();
Connection
conn
=
getConnection
(
driver
);
conn
.
prepareStatement
(
"
SET character_set_results = NULL
"
).
execute
();
conn
.
prepareStatement
(
"
select * from \"test_tab_new24\"
"
).
execute
();
closeConnection
(
conn
);
deregisterDriver
(
driver
);
}
...
...
@@ -106,7 +106,8 @@ public class InformixJdbcProxyServiceImpl implements InformixService {
private
Driver
getDriver
()
throws
Exception
{
// 定义informix的驱动信息
String
driverUrl
=
"com.mysql.jdbc.Driver"
;
// String driverUrl = "com.mysql.jdbc.Driver";
String
driverUrl
=
"org.postgresql.Driver"
;
// 还需要加入informix的jdbc驱动jar包
Class
<?>
driverClass
=
Class
.
forName
(
driverUrl
);
return
(
Driver
)
driverClass
.
getConstructor
().
newInstance
();
...
...
@@ -128,7 +129,7 @@ public class InformixJdbcProxyServiceImpl implements InformixService {
Properties
properties
=
new
Properties
();
// 组装连接数据库信息 BITBUCKET_NEW
// jdbc:informix-sqli://<server>:<port1526>/<database>:informixserver=<dbservername>
StringBuilder
jdbcBuilder
=
new
StringBuilder
(
"jdbc:
mysql://localhost:3307/SYSDBA
?character_set_results=utf8"
);
// # ?useServerPrepStmts=true
StringBuilder
jdbcBuilder
=
new
StringBuilder
(
"jdbc:
postgresql://localhost:3307/testdb
?character_set_results=utf8"
);
// # ?useServerPrepStmts=true
DriverManager
.
setLoginTimeout
(
10
);
properties
.
put
(
"user"
,
"root"
);
properties
.
put
(
"password"
,
"Apurelove9014"
);
...
...
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