Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
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
poc
poc-api
Commits
fa3d6dc4
Commit
fa3d6dc4
authored
Apr 28, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Agent应用数据库配置
parent
1055da0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
DatabaseRestImpl.java
...java/cn/com/poc/knowledge/rest/impl/DatabaseRestImpl.java
+1
-1
DatabaseUtilTest.java
src/test/java/cn/com/poc/utils/DatabaseUtilTest.java
+1
-1
No files found.
src/main/java/cn/com/poc/knowledge/rest/impl/DatabaseRestImpl.java
View file @
fa3d6dc4
...
...
@@ -61,7 +61,7 @@ public class DatabaseRestImpl implements DatabaseRest {
Assert
.
notBlank
(
dto
.
getDbName
(),
"Database Name must not be blank"
);
Assert
.
notBlank
(
dto
.
getDbUsername
(),
"Database Username must not be blank"
);
Assert
.
notBlank
(
dto
.
getDbPassword
(),
"Database Password must not be blank"
);
boolean
connect
=
DatabaseUtil
.
testConnect
(
dto
.
getDbHost
(),
dto
.
getDbPort
(),
dto
.
getDb
Name
(),
dto
.
getDbUsername
(),
dto
.
getDbPassword
());
boolean
connect
=
DatabaseUtil
.
testConnect
(
dto
.
getDbHost
(),
dto
.
getDbPort
(),
dto
.
getDb
Username
(),
dto
.
getDbPassword
(),
dto
.
getDbName
());
DatabaseTestContentDto
result
=
new
DatabaseTestContentDto
();
result
.
setStatus
(
connect
?
"success"
:
"fail"
);
return
result
;
...
...
src/test/java/cn/com/poc/utils/DatabaseUtilTest.java
View file @
fa3d6dc4
...
...
@@ -23,7 +23,7 @@ public class DatabaseUtilTest {
String
host
=
"192.168.21.31"
;
int
port
=
3306
;
String
username
=
"poc_root"
;
String
password
=
"8d
lb58a2836dc...
"
;
String
password
=
"8d
b58a2836dc
"
;
String
database
=
"gsst_poc_sit"
;
System
.
out
.
println
(
DatabaseUtil
.
testConnect
(
host
,
port
,
username
,
password
,
database
));
}
...
...
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