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
cf7deab5
Commit
cf7deab5
authored
Jul 28, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重构类结构
parent
50698a4d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
10 deletions
+12
-10
discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/DiscoveryApplicationA1.java
+4
-3
discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/extension/MyDiscoveryEnabledAdapter.java
+2
-2
discovery-springcloud-example-zuul/src/main/java/com/nepxion/discovery/plugin/example/zuul/DiscoveryApplicationZuul.java
+4
-3
discovery-springcloud-example-zuul/src/main/java/com/nepxion/discovery/plugin/example/zuul/extension/MyDiscoveryEnabledAdapter.java
+2
-2
No files found.
discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/DiscoveryApplicationA1.java
View file @
cf7deab5
...
@@ -18,7 +18,7 @@ import org.springframework.context.annotation.Bean;
...
@@ -18,7 +18,7 @@ import org.springframework.context.annotation.Bean;
import
com.nepxion.discovery.plugin.example.service.extension.MyDiscoveryListener
;
import
com.nepxion.discovery.plugin.example.service.extension.MyDiscoveryListener
;
import
com.nepxion.discovery.plugin.example.service.extension.MyLoadBalanceListener
;
import
com.nepxion.discovery.plugin.example.service.extension.MyLoadBalanceListener
;
import
com.nepxion.discovery.plugin.example.service.extension.MyRegisterListener
;
import
com.nepxion.discovery.plugin.example.service.extension.MyRegisterListener
;
import
com.nepxion.discovery.plugin.example.service.extension.My
Service
DiscoveryEnabledAdapter
;
import
com.nepxion.discovery.plugin.example.service.extension.MyDiscoveryEnabledAdapter
;
import
com.nepxion.discovery.plugin.example.service.extension.MySubscriber
;
import
com.nepxion.discovery.plugin.example.service.extension.MySubscriber
;
@SpringBootApplication
@SpringBootApplication
...
@@ -52,7 +52,7 @@ public class DiscoveryApplicationA1 {
...
@@ -52,7 +52,7 @@ public class DiscoveryApplicationA1 {
}
}
@Bean
@Bean
public
My
ServiceDiscoveryEnabledAdapter
myService
DiscoveryEnabledAdapter
()
{
public
My
DiscoveryEnabledAdapter
my
DiscoveryEnabledAdapter
()
{
return
new
My
Service
DiscoveryEnabledAdapter
();
return
new
MyDiscoveryEnabledAdapter
();
}
}
}
}
\ No newline at end of file
discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/extension/My
Service
DiscoveryEnabledAdapter.java
→
discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/extension/MyDiscoveryEnabledAdapter.java
View file @
cf7deab5
...
@@ -22,8 +22,8 @@ import com.nepxion.discovery.plugin.strategy.extension.service.context.ServiceSt
...
@@ -22,8 +22,8 @@ import com.nepxion.discovery.plugin.strategy.extension.service.context.ServiceSt
import
com.nepxion.discovery.plugin.strategy.extension.service.context.ServiceStrategyContextHolder
;
import
com.nepxion.discovery.plugin.strategy.extension.service.context.ServiceStrategyContextHolder
;
import
com.netflix.loadbalancer.Server
;
import
com.netflix.loadbalancer.Server
;
public
class
My
Service
DiscoveryEnabledAdapter
implements
DiscoveryEnabledAdapter
{
public
class
MyDiscoveryEnabledAdapter
implements
DiscoveryEnabledAdapter
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
My
Service
DiscoveryEnabledAdapter
.
class
);
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
MyDiscoveryEnabledAdapter
.
class
);
@Autowired
@Autowired
protected
PluginAdapter
pluginAdapter
;
protected
PluginAdapter
pluginAdapter
;
...
...
discovery-springcloud-example-zuul/src/main/java/com/nepxion/discovery/plugin/example/zuul/DiscoveryApplicationZuul.java
View file @
cf7deab5
...
@@ -15,7 +15,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
...
@@ -15,7 +15,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import
org.springframework.cloud.netflix.zuul.EnableZuulProxy
;
import
org.springframework.cloud.netflix.zuul.EnableZuulProxy
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
com.nepxion.discovery.plugin.example.zuul.extension.My
Zuul
DiscoveryEnabledAdapter
;
import
com.nepxion.discovery.plugin.example.zuul.extension.MyDiscoveryEnabledAdapter
;
@SpringBootApplication
@SpringBootApplication
@EnableDiscoveryClient
@EnableDiscoveryClient
...
@@ -28,7 +28,7 @@ public class DiscoveryApplicationZuul {
...
@@ -28,7 +28,7 @@ public class DiscoveryApplicationZuul {
}
}
@Bean
@Bean
public
My
ZuulDiscoveryEnabledAdapter
myZuul
DiscoveryEnabledAdapter
()
{
public
My
DiscoveryEnabledAdapter
my
DiscoveryEnabledAdapter
()
{
return
new
My
Zuul
DiscoveryEnabledAdapter
();
return
new
MyDiscoveryEnabledAdapter
();
}
}
}
}
\ No newline at end of file
discovery-springcloud-example-zuul/src/main/java/com/nepxion/discovery/plugin/example/zuul/extension/My
Zuul
DiscoveryEnabledAdapter.java
→
discovery-springcloud-example-zuul/src/main/java/com/nepxion/discovery/plugin/example/zuul/extension/MyDiscoveryEnabledAdapter.java
View file @
cf7deab5
...
@@ -23,8 +23,8 @@ import com.nepxion.discovery.plugin.strategy.discovery.DiscoveryEnabledAdapter;
...
@@ -23,8 +23,8 @@ import com.nepxion.discovery.plugin.strategy.discovery.DiscoveryEnabledAdapter;
import
com.netflix.loadbalancer.Server
;
import
com.netflix.loadbalancer.Server
;
import
com.netflix.zuul.context.RequestContext
;
import
com.netflix.zuul.context.RequestContext
;
public
class
My
Zuul
DiscoveryEnabledAdapter
implements
DiscoveryEnabledAdapter
{
public
class
MyDiscoveryEnabledAdapter
implements
DiscoveryEnabledAdapter
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
My
Zuul
DiscoveryEnabledAdapter
.
class
);
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
MyDiscoveryEnabledAdapter
.
class
);
@Autowired
@Autowired
protected
PluginAdapter
pluginAdapter
;
protected
PluginAdapter
pluginAdapter
;
...
...
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