Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
discovery
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢捷峰
discovery
Commits
5e090b3b
Commit
5e090b3b
authored
Aug 25, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正拼写错误
parent
c985c20d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/extension/MyDiscoveryEnabledStrategy.java
+2
-2
No files found.
discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/extension/MyDiscoveryEnabledStrategy.java
View file @
5e090b3b
...
...
@@ -36,7 +36,7 @@ public class MyDiscoveryEnabledStrategy implements DiscoveryEnabledStrategy {
}
// 对RPC调用传来的方法参数做策略
return
applyFromMethd
(
server
,
metadata
);
return
applyFromMeth
o
d
(
server
,
metadata
);
}
// 根据Rest调用传来的Header参数(例如Token),选取执行调用请求的服务实例
...
...
@@ -66,7 +66,7 @@ public class MyDiscoveryEnabledStrategy implements DiscoveryEnabledStrategy {
// 根据RPC调用传来的方法参数(例如接口名、方法名、参数名或参数值等),选取执行调用请求的服务实例
@SuppressWarnings
(
"unchecked"
)
private
boolean
applyFromMethd
(
Server
server
,
Map
<
String
,
String
>
metadata
)
{
private
boolean
applyFromMeth
o
d
(
Server
server
,
Map
<
String
,
String
>
metadata
)
{
ServiceStrategyContext
context
=
ServiceStrategyContext
.
getCurrentContext
();
Map
<
String
,
Object
>
attributes
=
context
.
getAttributes
();
...
...
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