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
03b61bc3
Commit
03b61bc3
authored
Jun 29, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
和Eureka解耦
parent
2c150489
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
230 additions
and
48 deletions
+230
-48
discovery-plugin-admin-center/pom.xml
+6
-0
discovery-plugin-framework-eureka/pom.xml
+29
-0
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/adapter/EurekaAdapter.java
+40
-0
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/configuration/EurekaAutoConfiguration.java
+25
-0
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/constant/EurekaConstant.java
+15
-0
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/context/EurekaApplicationContextInitializer.java
+42
-0
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/decorator/EurekaServiceRegistryDecorator.java
+0
-0
discovery-plugin-framework/pom.xml
+1
-1
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/adapter/PluginAdapter.java
+19
-0
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/constant/PluginConstant.java
+0
-1
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/context/PluginApplicationContextInitializer.java
+5
-20
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/context/PluginContextAware.java
+0
-5
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/listener/impl/IpAddressFilterRegisterListener.java
+7
-9
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/listener/impl/VersionFilterDiscoveryListener.java
+5
-1
discovery-plugin-router-center/pom.xml
+6
-0
discovery-plugin-router-center/src/main/java/com/nepxion/discovery/plugin/routercenter/controller/RouterController.java
+8
-4
discovery-plugin-starter-eureka/pom.xml
+8
-2
discovery-plugin-starter-eureka/src/main/resources/META-INF/spring.factories
+3
-1
discovery-springcloud-example-a/pom.xml
+1
-1
discovery-springcloud-example-b/pom.xml
+1
-1
pom.xml
+9
-2
No files found.
discovery-plugin-admin-center/pom.xml
View file @
03b61bc3
...
...
@@ -24,5 +24,10 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
discovery-plugin-framework-eureka/pom.xml
0 → 100644
View file @
03b61bc3
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<artifactId>
discovery-plugin-framework-eureka
</artifactId>
<name>
Nepxion Discovery Plugin Framework
</name>
<packaging>
jar
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<description>
Nepxion Discovery is an enhancement for Spring Cloud Discovery
</description>
<url>
http://www.nepxion.com
</url>
<parent>
<groupId>
com.nepxion
</groupId>
<artifactId>
discovery
</artifactId>
<version>
2.0.11
</version>
</parent>
<dependencies>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-framework
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-eureka
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/adapter/EurekaAdapter.java
0 → 100644
View file @
03b61bc3
package
com
.
nepxion
.
discovery
.
plugin
.
framework
.
adapter
;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.client.serviceregistry.Registration
;
import
org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
com.nepxion.discovery.plugin.framework.constant.EurekaConstant
;
import
com.nepxion.discovery.plugin.framework.exception.PluginException
;
public
class
EurekaAdapter
implements
PluginAdapter
{
@Autowired
protected
ConfigurableEnvironment
environment
;
@Override
public
String
getIpAddress
(
Registration
registration
)
{
if
(
registration
instanceof
EurekaRegistration
)
{
EurekaRegistration
eurekaRegistration
=
(
EurekaRegistration
)
registration
;
return
eurekaRegistration
.
getInstanceConfig
().
getIpAddress
();
}
throw
new
PluginException
(
"Registration instance isn't the type of Eureka"
);
}
@Override
public
String
getVersion
()
{
return
environment
.
getProperty
(
EurekaConstant
.
EUREKA_METADATA_VERSION
);
}
}
\ No newline at end of file
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/configuration/EurekaAutoConfiguration.java
0 → 100644
View file @
03b61bc3
package
com
.
nepxion
.
discovery
.
plugin
.
framework
.
configuration
;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
com.nepxion.discovery.plugin.framework.adapter.EurekaAdapter
;
import
com.nepxion.discovery.plugin.framework.adapter.PluginAdapter
;
@Configuration
public
class
EurekaAutoConfiguration
{
@Bean
public
PluginAdapter
pluginAdapter
()
{
return
new
EurekaAdapter
();
}
}
\ No newline at end of file
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/constant/EurekaConstant.java
0 → 100644
View file @
03b61bc3
package
com
.
nepxion
.
discovery
.
plugin
.
framework
.
constant
;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
public
class
EurekaConstant
{
public
static
final
String
EUREKA_METADATA_VERSION
=
"eureka.instance.metadataMap.version"
;
}
\ No newline at end of file
discovery-plugin-framework-eureka/src/main/java/com/nepxion/discovery/plugin/framework/context/EurekaApplicationContextInitializer.java
0 → 100644
View file @
03b61bc3
package
com
.
nepxion
.
discovery
.
plugin
.
framework
.
context
;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
import
org.springframework.beans.BeansException
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean
;
import
org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
com.nepxion.discovery.plugin.framework.decorator.DiscoveryClientDecorator
;
import
com.nepxion.discovery.plugin.framework.decorator.EurekaServiceRegistryDecorator
;
public
class
EurekaApplicationContextInitializer
extends
PluginApplicationContextInitializer
{
@Override
protected
Object
afterInitialization
(
ConfigurableApplicationContext
applicationContext
,
Object
bean
,
String
beanName
)
throws
BeansException
{
if
(
bean
instanceof
DiscoveryClient
)
{
DiscoveryClient
discoveryClient
=
(
DiscoveryClient
)
bean
;
return
new
DiscoveryClientDecorator
(
discoveryClient
,
applicationContext
);
}
else
if
(
bean
instanceof
EurekaServiceRegistry
)
{
EurekaServiceRegistry
eurekaServiceRegistry
=
(
EurekaServiceRegistry
)
bean
;
return
new
EurekaServiceRegistryDecorator
(
eurekaServiceRegistry
,
applicationContext
);
}
else
if
(
bean
instanceof
EurekaInstanceConfigBean
)
{
EurekaInstanceConfigBean
instanceConfig
=
(
EurekaInstanceConfigBean
)
bean
;
instanceConfig
.
setPreferIpAddress
(
true
);
return
bean
;
}
else
{
return
bean
;
}
}
}
\ No newline at end of file
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/decorator/EurekaServiceRegistryDecorator.java
→
discovery-plugin-framework
-eureka
/src/main/java/com/nepxion/discovery/plugin/framework/decorator/EurekaServiceRegistryDecorator.java
View file @
03b61bc3
File moved
discovery-plugin-framework/pom.xml
View file @
03b61bc3
...
...
@@ -32,7 +32,7 @@
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter
-eureka
</artifactId>
<artifactId>
spring-cloud-starter
</artifactId>
</dependency>
<dependency>
...
...
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/adapter/PluginAdapter.java
0 → 100644
View file @
03b61bc3
package
com
.
nepxion
.
discovery
.
plugin
.
framework
.
adapter
;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
import
org.springframework.cloud.client.serviceregistry.Registration
;
public
interface
PluginAdapter
{
String
getIpAddress
(
Registration
registration
);
String
getVersion
();
}
\ No newline at end of file
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/constant/PluginConstant.java
View file @
03b61bc3
...
...
@@ -15,7 +15,6 @@ public class PluginConstant {
public
static
final
String
SPRING_APPLICATION_DISCOVERY_REMOTE_CONFIG_ENABLED
=
"spring.application.discovery.remote.config.enabled"
;
public
static
final
String
SPRING_APPLICATION_NAME
=
"spring.application.name"
;
public
static
final
String
EUREKA_METADATA_VERSION
=
"eureka.instance.metadataMap.version"
;
public
static
final
String
SERVICE_ID
=
"serviceId"
;
public
static
final
String
VERSION
=
"version"
;
public
static
final
String
METADATA
=
"metadata"
;
...
...
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/context/PluginApplicationContextInitializer.java
View file @
03b61bc3
...
...
@@ -11,35 +11,19 @@ package com.nepxion.discovery.plugin.framework.context;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean
;
import
org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry
;
import
org.springframework.context.ApplicationContextInitializer
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
com.nepxion.discovery.plugin.framework.decorator.DiscoveryClientDecorator
;
import
com.nepxion.discovery.plugin.framework.decorator.EurekaServiceRegistryDecorator
;
public
class
PluginApplicationContextInitializer
implements
ApplicationContextInitializer
<
ConfigurableApplicationContext
>
{
public
abstract
class
PluginApplicationContextInitializer
implements
ApplicationContextInitializer
<
ConfigurableApplicationContext
>
{
@Override
public
void
initialize
(
ConfigurableApplicationContext
applicationContext
)
{
applicationContext
.
getBeanFactory
().
addBeanPostProcessor
(
new
InstantiationAwareBeanPostProcessorAdapter
()
{
@Override
public
Object
postProcessAfterInitialization
(
Object
bean
,
String
beanName
)
throws
BeansException
{
if
(
bean
instanceof
DiscoveryClient
)
{
DiscoveryClient
discoveryClient
=
(
DiscoveryClient
)
bean
;
return
new
DiscoveryClientDecorator
(
discoveryClient
,
applicationContext
);
}
else
if
(
bean
instanceof
EurekaServiceRegistry
)
{
EurekaServiceRegistry
eurekaServiceRegistry
=
(
EurekaServiceRegistry
)
bean
;
return
new
EurekaServiceRegistryDecorator
(
eurekaServiceRegistry
,
applicationContext
);
}
else
if
(
bean
instanceof
EurekaInstanceConfigBean
)
{
EurekaInstanceConfigBean
instanceConfig
=
(
EurekaInstanceConfigBean
)
bean
;
instanceConfig
.
setPreferIpAddress
(
true
);
return
bean
;
}
else
{
return
bean
;
}
return
afterInitialization
(
applicationContext
,
bean
,
beanName
);
}
});
}
protected
abstract
Object
afterInitialization
(
ConfigurableApplicationContext
applicationContext
,
Object
bean
,
String
beanName
)
throws
BeansException
;
}
\ No newline at end of file
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/context/PluginContextAware.java
View file @
03b61bc3
...
...
@@ -46,8 +46,4 @@ public class PluginContextAware implements ApplicationContextAware {
public
static
Boolean
isRemoteConfigEnabled
(
Environment
environment
)
{
return
environment
.
getProperty
(
PluginConstant
.
SPRING_APPLICATION_DISCOVERY_REMOTE_CONFIG_ENABLED
,
Boolean
.
class
,
Boolean
.
TRUE
);
}
public
Environment
getEnvironment
()
{
return
environment
;
}
}
\ No newline at end of file
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/listener/impl/IpAddressFilterRegisterListener.java
View file @
03b61bc3
...
...
@@ -18,8 +18,8 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.client.serviceregistry.Registration
;
import
org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration
;
import
com.nepxion.discovery.plugin.framework.adapter.PluginAdapter
;
import
com.nepxion.discovery.plugin.framework.entity.FilterEntity
;
import
com.nepxion.discovery.plugin.framework.entity.FilterType
;
import
com.nepxion.discovery.plugin.framework.entity.RegisterEntity
;
...
...
@@ -33,15 +33,13 @@ public class IpAddressFilterRegisterListener extends AbstractRegisterListener {
@Autowired
private
RuleEntity
ruleEntity
;
@Autowired
private
PluginAdapter
pluginAdapter
;
@Override
public
void
onRegister
(
Registration
registration
)
{
String
serviceId
=
registration
.
getServiceId
();
String
ipAddress
=
null
;
if
(
registration
instanceof
EurekaRegistration
)
{
EurekaRegistration
eurekaRegistration
=
(
EurekaRegistration
)
registration
;
ipAddress
=
eurekaRegistration
.
getInstanceConfig
().
getIpAddress
();
}
String
ipAddress
=
pluginAdapter
.
getIpAddress
(
registration
);
applyIpAddressFilter
(
serviceId
,
ipAddress
);
}
...
...
@@ -87,7 +85,7 @@ public class IpAddressFilterRegisterListener extends AbstractRegisterListener {
for
(
String
filterValue
:
allFilterValueList
)
{
if
(
ipAddress
.
startsWith
(
filterValue
))
{
throw
new
PluginException
(
ipAddress
+
" isn't allowed to register to
Eureka
server, because it is in blacklist"
);
throw
new
PluginException
(
ipAddress
+
" isn't allowed to register to
Discovery
server, because it is in blacklist"
);
}
}
}
...
...
@@ -104,7 +102,7 @@ public class IpAddressFilterRegisterListener extends AbstractRegisterListener {
}
if
(
matched
)
{
throw
new
PluginException
(
ipAddress
+
" isn't allowed to register to
Eureka
server, because it isn't in whitelist"
);
throw
new
PluginException
(
ipAddress
+
" isn't allowed to register to
Discovery
server, because it isn't in whitelist"
);
}
}
...
...
discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/listener/impl/VersionFilterDiscoveryListener.java
View file @
03b61bc3
...
...
@@ -20,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.client.ServiceInstance
;
import
com.nepxion.discovery.plugin.framework.adapter.PluginAdapter
;
import
com.nepxion.discovery.plugin.framework.constant.PluginConstant
;
import
com.nepxion.discovery.plugin.framework.entity.DiscoveryEntity
;
import
com.nepxion.discovery.plugin.framework.entity.DiscoveryServiceEntity
;
...
...
@@ -31,10 +32,13 @@ public class VersionFilterDiscoveryListener extends AbstractDiscoveryListener {
@Autowired
private
RuleEntity
ruleEntity
;
@Autowired
private
PluginAdapter
pluginAdapter
;
@Override
public
void
onGetInstances
(
String
serviceId
,
List
<
ServiceInstance
>
instances
)
{
String
consumerServiceId
=
environment
.
getProperty
(
PluginConstant
.
SPRING_APPLICATION_NAME
);
String
consumerServiceVersion
=
environment
.
getProperty
(
PluginConstant
.
EUREKA_METADATA_VERSION
);
String
consumerServiceVersion
=
pluginAdapter
.
getVersion
(
);
applyVersionFilter
(
consumerServiceId
,
consumerServiceVersion
,
serviceId
,
instances
);
}
...
...
discovery-plugin-router-center/pom.xml
View file @
03b61bc3
...
...
@@ -19,5 +19,10 @@
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-framework
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
discovery-plugin-router-center/src/main/java/com/nepxion/discovery/plugin/routercenter/controller/RouterController.java
View file @
03b61bc3
...
...
@@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.client.ServiceInstance
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -27,9 +28,9 @@ import org.springframework.web.bind.annotation.RestController;
import
org.springframework.web.client.RestClientException
;
import
org.springframework.web.client.RestTemplate
;
import
com.nepxion.discovery.plugin.framework.adapter.PluginAdapter
;
import
com.nepxion.discovery.plugin.framework.constant.PluginConstant
;
import
com.nepxion.discovery.plugin.framework.context.PluginContainerInitializedHandler
;
import
com.nepxion.discovery.plugin.framework.context.PluginContextAware
;
import
com.nepxion.discovery.plugin.framework.entity.RouterEntity
;
import
com.nepxion.discovery.plugin.framework.exception.PluginException
;
import
com.nepxion.eventbus.util.HostUtil
;
...
...
@@ -40,7 +41,10 @@ public class RouterController {
private
PluginContainerInitializedHandler
pluginContainerInitializedHandler
;
@Autowired
private
PluginContextAware
pluginContextAware
;
private
PluginAdapter
pluginAdapter
;
@Autowired
protected
ConfigurableEnvironment
environment
;
@Autowired
private
RestTemplate
routerRestTemplate
;
...
...
@@ -83,8 +87,8 @@ public class RouterController {
}
public
RouterEntity
getRouterEntity
()
{
String
serviceId
=
pluginContextAware
.
getEnvironment
()
.
getProperty
(
PluginConstant
.
SPRING_APPLICATION_NAME
);
String
version
=
plugin
ContextAware
.
getEnvironment
().
getProperty
(
PluginConstant
.
EUREKA_METADATA_VERSION
);
String
serviceId
=
environment
.
getProperty
(
PluginConstant
.
SPRING_APPLICATION_NAME
);
String
version
=
plugin
Adapter
.
getVersion
(
);
String
host
=
HostUtil
.
getLocalhost
();
int
port
=
pluginContainerInitializedHandler
.
getPort
();
...
...
discovery-plugin-starter/pom.xml
→
discovery-plugin-starter
-eureka
/pom.xml
View file @
03b61bc3
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<artifactId>
discovery-plugin-starter
</artifactId>
<name>
Nepxion Discovery Plugin Starter
</name>
<artifactId>
discovery-plugin-starter
-eureka
</artifactId>
<name>
Nepxion Discovery Plugin Starter
Eureka
</name>
<packaging>
jar
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<description>
Nepxion Discovery is an enhancement for Spring Cloud Discovery
</description>
...
...
@@ -29,5 +29,10 @@
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-router-center
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-framework-eureka
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
discovery-plugin-starter/src/main/resources/META-INF/spring.factories
→
discovery-plugin-starter
-eureka
/src/main/resources/META-INF/spring.factories
View file @
03b61bc3
org.springframework.context.ApplicationContextInitializer=\
com.nepxion.discovery.plugin.framework.context.
Plugin
ApplicationContextInitializer
com.nepxion.discovery.plugin.framework.context.
Eureka
ApplicationContextInitializer
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.nepxion.discovery.plugin.framework.configuration.PluginAutoConfiguration,\
com.nepxion.discovery.plugin.framework.configuration.EurekaAutoConfiguration,\
com.nepxion.discovery.plugin.configcenter.configuration.ConfigAutoConfiguration,\
com.nepxion.discovery.plugin.admincenter.configuration.AdminAutoConfiguration,\
com.nepxion.discovery.plugin.routercenter.configuration.RouterAutoConfiguration
\ No newline at end of file
discovery-springcloud-example-a/pom.xml
View file @
03b61bc3
...
...
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
discovery-plugin-starter
</artifactId>
<artifactId>
discovery-plugin-starter
-eureka
</artifactId>
<version>
${discovery.plugin.version}
</version>
</dependency>
</dependencies>
...
...
discovery-springcloud-example-b/pom.xml
View file @
03b61bc3
...
...
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
discovery-plugin-starter
</artifactId>
<artifactId>
discovery-plugin-starter
-eureka
</artifactId>
<version>
${discovery.plugin.version}
</version>
</dependency>
</dependencies>
...
...
pom.xml
View file @
03b61bc3
...
...
@@ -12,10 +12,11 @@
<modules>
<module>
discovery-plugin-framework
</module>
<module>
discovery-plugin-framework-eureka
</module>
<module>
discovery-plugin-config-center
</module>
<module>
discovery-plugin-admin-center
</module>
<module>
discovery-plugin-router-center
</module>
<module>
discovery-plugin-starter
</module>
<module>
discovery-plugin-starter
-eureka
</module>
<module>
discovery-springcloud-example-eureka
</module>
<module>
discovery-springcloud-example-a
</module>
<module>
discovery-springcloud-example-b
</module>
...
...
@@ -47,6 +48,12 @@
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-framework-eureka
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-config-center
</artifactId>
<version>
${project.version}
</version>
</dependency>
...
...
@@ -65,7 +72,7 @@
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-starter
</artifactId>
<artifactId>
discovery-plugin-starter
-eureka
</artifactId>
<version>
${project.version}
</version>
</dependency>
...
...
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