mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
merge from 2.2.4.RELEASE
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
<description>Example demonstrating how to use nacos discovery</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@@ -9,11 +9,13 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<artifactId>nacos-discovery-provider-example</artifactId>
|
||||
<name>Spring Cloud Starter Alibaba Nacos Discovery Provider Example</name>
|
||||
<description>Example demonstrating how to use nacos discovery</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
server.port=18082
|
||||
spring.application.name=service-provider
|
||||
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
|
||||
#spring.cloud.nacos.discovery.instance-enabled=true
|
||||
|
||||
spring.cloud.nacos.username=nacos
|
||||
spring.cloud.nacos.password=nacos
|
||||
|
@@ -9,11 +9,13 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<artifactId>nacos-discovery-spring-cloud-config-client-example</artifactId>
|
||||
<name>Spring Cloud Starter Alibaba Nacos Discovery x Config Client Example</name>
|
||||
<description>Example demonstrating how to use nacos discovery</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@@ -9,11 +9,13 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<artifactId>nacos-discovery-spring-cloud-config-server-example</artifactId>
|
||||
<name>Spring Cloud Starter Alibaba Nacos Discovery x Config Server Example</name>
|
||||
<description>Example demonstrating how to use nacos discovery</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@@ -15,6 +15,7 @@
|
||||
<description>Example demonstrating how to use nacos discovery</description>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
<modules>
|
||||
<module>nacos-discovery-consumer-example</module>
|
||||
<module>nacos-discovery-provider-example</module>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
public class ProviderApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
SpringApplication.run(ProviderApplication.class, args);
|
||||
}
|
||||
|
||||
@RestController
|
||||
|
@@ -29,7 +29,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
|
||||
public class ProviderApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
SpringApplication.run(ProviderApplication.class, args);
|
||||
}
|
||||
|
||||
@RestController
|
||||
@@ -207,6 +207,7 @@ Metadata|spring.cloud.nacos.discovery.metadata||Extended data, Configure using M
|
||||
log name|spring.cloud.nacos.discovery.log-name||
|
||||
endpoint|spring.cloud.nacos.discovery.endpoint||The domain name of a service, through which the server address can be dynamically obtained.
|
||||
Integration Ribbon|ribbon.nacos.enabled|true|
|
||||
enabled|spring.cloud.nacos.discovery.enabled|true|The switch to enable or disable nacos service discovery
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user