Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydl-generator
Overview
Overview
Details
Activity
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
余保谷
ydl-generator
Commits
6694fbfd
Commit
6694fbfd
authored
Apr 13, 2019
by
flying-cattle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决代码质检问题
parent
c4fd107c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
EntityInfoUtil.java
src/main/java/com/github/mybatis/fl/util/EntityInfoUtil.java
+6
-1
No files found.
src/main/java/com/github/mybatis/fl/util/EntityInfoUtil.java
View file @
6694fbfd
...
...
@@ -34,12 +34,13 @@ public class EntityInfoUtil {
// 创建连接
Connection
con
=
null
;
PreparedStatement
pstemt
=
null
;
ResultSet
rs
=
null
;
//sql
String
sql
=
"select column_name,data_type,column_comment from information_schema.columns where table_schema='"
+
bi
.
getDatabase
()+
"' and table_name='"
+
bi
.
getTable
()+
"'"
;
try
{
con
=
DriverManager
.
getConnection
(
bi
.
getDbUrl
(),
bi
.
getDbName
(),
bi
.
getDbPassword
());
pstemt
=
con
.
prepareStatement
(
sql
);
ResultSet
rs
=
pstemt
.
executeQuery
();
rs
=
pstemt
.
executeQuery
();
while
(
rs
.
next
())
{
String
column
=
rs
.
getString
(
1
);
String
jdbcType
=
rs
.
getString
(
2
);
...
...
@@ -73,6 +74,10 @@ public class EntityInfoUtil {
e
.
printStackTrace
();
throw
new
RuntimeException
(
"自动生成实体类错误:"
+
e
.
getMessage
());
}
finally
{
try
{
if
(
rs
!=
null
)
rs
.
close
();
}
catch
(
SQLException
se2
){
}
// 关闭资源
try
{
if
(
pstemt
!=
null
)
pstemt
.
close
();
...
...
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