Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
holmes
Commits
e83a444f
Commit
e83a444f
authored
Sep 24, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
/k8s/dubbo/port优化
parent
4ea69848
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
K8sController.java
src/main/java/cn/qg/holmes/controller/k8s/K8sController.java
+5
-3
No files found.
src/main/java/cn/qg/holmes/controller/k8s/K8sController.java
View file @
e83a444f
...
@@ -479,7 +479,6 @@ public class K8sController {
...
@@ -479,7 +479,6 @@ public class K8sController {
@RequestParam
String
serviceType
,
@RequestParam
String
serviceType
,
@RequestParam
String
serviceName
,
@RequestParam
String
serviceName
,
@RequestParam
String
key
)
{
@RequestParam
String
key
)
{
log
.
info
(
"获取dubbo接口收到参数:{}, {}, {}, {}"
,
namespace
,
serviceType
,
serviceName
,
key
);
List
<
ServicePort
>
servicePortList
=
k8sService
.
getServiceDetail
(
namespace
,
serviceName
).
getSpec
().
getPorts
();
List
<
ServicePort
>
servicePortList
=
k8sService
.
getServiceDetail
(
namespace
,
serviceName
).
getSpec
().
getPorts
();
Map
<
String
,
Object
>
serviceMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
serviceMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
portMappingList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
portMappingList
=
new
ArrayList
<>();
...
@@ -500,7 +499,10 @@ public class K8sController {
...
@@ -500,7 +499,10 @@ public class K8sController {
serviceMap
.
put
(
"portMappings"
,
portMappingList
);
serviceMap
.
put
(
"portMappings"
,
portMappingList
);
serviceMap
.
put
(
"serviceName"
,
serviceName
);
serviceMap
.
put
(
"serviceName"
,
serviceName
);
serviceMap
.
put
(
"namespace"
,
namespace
);
serviceMap
.
put
(
"namespace"
,
namespace
);
log
.
info
(
"返回结果为:{}"
,
JSON
.
toJSONString
(
serviceMap
));
if
(
serviceMap
.
containsKey
(
key
))
{
return
serviceMap
.
get
(
key
).
toString
();
return
serviceMap
.
get
(
key
).
toString
();
}
else
{
return
JSON
.
toJSONString
(
serviceMap
);
}
}
}
}
}
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