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
fa10709b
Commit
fa10709b
authored
Jul 29, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加Redis为远程配置中心
parent
596669d7
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
72 additions
and
7 deletions
+72
-7
discovery-plugin-config-center-extension-nacos/src/main/java/com/nepxion/discovery/plugin/configcenter/extension/nacos/adapter/NacosConfigAdapter.java
+3
-3
discovery-springcloud-example-console/pom.xml
+2
-1
discovery-springcloud-example-console/src/main/resources/application.properties
+10
-0
discovery-springcloud-example-gateway/pom.xml
+2
-1
discovery-springcloud-example-gateway/src/main/resources/bootstrap.properties
+10
-0
discovery-springcloud-example-service/pom.xml
+2
-1
discovery-springcloud-example-service/src/main/resources/bootstrap.properties
+10
-0
discovery-springcloud-example-zuul/pom.xml
+2
-1
discovery-springcloud-example-zuul/src/main/resources/bootstrap.properties
+10
-0
pom.xml
+21
-0
No files found.
discovery-plugin-config-center-extension-nacos/src/main/java/com/nepxion/discovery/plugin/configcenter/extension/nacos/adapter/NacosConfigAdapter.java
View file @
fa10709b
...
...
@@ -29,14 +29,14 @@ public class NacosConfigAdapter extends ConfigAdapter {
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
NacosConfigAdapter
.
class
);
@Autowired
private
NacosOperation
nacosOperation
;
@Autowired
protected
PluginContextAware
pluginContextAware
;
@Autowired
private
PluginAdapter
pluginAdapter
;
@Autowired
private
NacosOperation
nacosOperation
;
@Override
public
String
getConfig
()
throws
Exception
{
String
groupKey
=
pluginContextAware
.
getGroupKey
();
...
...
discovery-springcloud-example-console/pom.xml
View file @
fa10709b
...
...
@@ -51,7 +51,8 @@
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
discovery-console-extension-nacos
</artifactId>
<!-- <artifactId>discovery-console-extension-nacos</artifactId> -->
<artifactId>
discovery-console-extension-redis
</artifactId>
</dependency>
<dependency>
...
...
discovery-springcloud-example-console/src/main/resources/application.properties
View file @
fa10709b
...
...
@@ -29,6 +29,16 @@ ribbon.ConnectTimeout=60000
nacos.url
=
localhost:8080
nacos.timout
=
30000
# Redis config
spring.redis.host
=
localhost
spring.redis.port
=
6379
spring.redis.password
=
spring.redis.database
=
0
spring.redis.pool.max-active
=
8
spring.redis.pool.max-wait
=
-1
spring.redis.pool.max-idle
=
8
spring.redis.pool.min-idle
=
0
# Admin config
management.port
=
3333
management.security.enabled
=
false
...
...
discovery-springcloud-example-gateway/pom.xml
View file @
fa10709b
...
...
@@ -53,7 +53,8 @@
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
discovery-plugin-config-center-extension-nacos
</artifactId>
<!-- <artifactId>discovery-console-extension-nacos</artifactId> -->
<artifactId>
discovery-plugin-config-center-extension-redis
</artifactId>
</dependency>
<dependency>
...
...
discovery-springcloud-example-gateway/src/main/resources/bootstrap.properties
View file @
fa10709b
...
...
@@ -22,6 +22,16 @@ ribbon.ConnectTimeout=60000
nacos.url
=
localhost:8080
nacos.timout
=
30000
# Redis config
spring.redis.host
=
localhost
spring.redis.port
=
6379
spring.redis.password
=
spring.redis.database
=
0
spring.redis.pool.max-active
=
8
spring.redis.pool.max-wait
=
-1
spring.redis.pool.max-idle
=
8
spring.redis.pool.min-idle
=
0
# Admin config(management.health.consul.enabled必须配置在bootstrap.properties里,配置在application.properties无效)
management.security.enabled
=
false
# management.health.consul.enabled=true
...
...
discovery-springcloud-example-service/pom.xml
View file @
fa10709b
...
...
@@ -53,7 +53,8 @@
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
discovery-plugin-config-center-extension-nacos
</artifactId>
<!-- <artifactId>discovery-console-extension-nacos</artifactId> -->
<artifactId>
discovery-plugin-config-center-extension-redis
</artifactId>
</dependency>
<dependency>
...
...
discovery-springcloud-example-service/src/main/resources/bootstrap.properties
View file @
fa10709b
...
...
@@ -22,6 +22,16 @@ ribbon.ConnectTimeout=60000
nacos.url
=
localhost:8080
nacos.timout
=
30000
# Redis config
spring.redis.host
=
localhost
spring.redis.port
=
6379
spring.redis.password
=
spring.redis.database
=
0
spring.redis.pool.max-active
=
8
spring.redis.pool.max-wait
=
-1
spring.redis.pool.max-idle
=
8
spring.redis.pool.min-idle
=
0
# Admin config(management.health.consul.enabled必须配置在bootstrap.properties里,配置在application.properties无效)
management.security.enabled
=
false
# management.health.consul.enabled=true
...
...
discovery-springcloud-example-zuul/pom.xml
View file @
fa10709b
...
...
@@ -53,7 +53,8 @@
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
discovery-plugin-config-center-extension-nacos
</artifactId>
<!-- <artifactId>discovery-console-extension-nacos</artifactId> -->
<artifactId>
discovery-plugin-config-center-extension-redis
</artifactId>
</dependency>
<dependency>
...
...
discovery-springcloud-example-zuul/src/main/resources/bootstrap.properties
View file @
fa10709b
...
...
@@ -22,6 +22,16 @@ ribbon.ConnectTimeout=60000
nacos.url
=
localhost:8080
nacos.timout
=
30000
# Redis config
spring.redis.host
=
localhost
spring.redis.port
=
6379
spring.redis.password
=
spring.redis.database
=
0
spring.redis.pool.max-active
=
8
spring.redis.pool.max-wait
=
-1
spring.redis.pool.max-idle
=
8
spring.redis.pool.min-idle
=
0
# Admin config(management.health.consul.enabled必须配置在bootstrap.properties里,配置在application.properties无效)
management.security.enabled
=
false
# management.health.consul.enabled=true
...
...
pom.xml
View file @
fa10709b
...
...
@@ -12,12 +12,14 @@
<modules>
<module>
discovery-common-nacos
</module>
<module>
discovery-common-redis
</module>
<module>
discovery-plugin-framework
</module>
<module>
discovery-plugin-framework-eureka
</module>
<module>
discovery-plugin-framework-consul
</module>
<module>
discovery-plugin-framework-zookeeper
</module>
<module>
discovery-plugin-config-center
</module>
<module>
discovery-plugin-config-center-extension-nacos
</module>
<module>
discovery-plugin-config-center-extension-redis
</module>
<module>
discovery-plugin-admin-center
</module>
<module>
discovery-plugin-starter-eureka
</module>
<module>
discovery-plugin-starter-consul
</module>
...
...
@@ -28,6 +30,7 @@
<module>
discovery-plugin-strategy-extension-gateway
</module>
<module>
discovery-console
</module>
<module>
discovery-console-extension-nacos
</module>
<module>
discovery-console-extension-redis
</module>
<module>
discovery-console-starter
</module>
<module>
discovery-console-desktop
</module>
<module>
discovery-springcloud-example-console
</module>
...
...
@@ -64,6 +67,12 @@
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-common-redis
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-framework
</artifactId>
<version>
${project.version}
</version>
</dependency>
...
...
@@ -100,6 +109,12 @@
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-config-center-extension-redis
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-plugin-admin-center
</artifactId>
<version>
${project.version}
</version>
</dependency>
...
...
@@ -160,6 +175,12 @@
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-console-extension-redis
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
discovery-console-starter
</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