@ -44,7 +44,7 @@ The green grid in the figure represents the call link of the request.
### Quick start
Before starting the example for demonstration, let's take a look at how Spring Cloud applications use the remote multi-active capabilities provided by AppActive.
**Note, this chapter is only for your understanding of the access method. The access work has been completed in this examples, and you do not need to modify it.**
**Note, this chapter is only for your understanding of the access method. The access work has been completed in these examples, and you do not need to modify it.**
1. First, modify the pom.xml file to add the following maven dependencies based on the latest `spring-cloud-alibaba-dependencies` added to the provider and consumer.
@ -9,7 +9,7 @@ This example illustrates how to use Nacos Config Starter implement externalized
## Demo
### Connect to Nacos Config
Before we start the demo, let's learn how to connect Nacos Config to a Spring Cloud application. **Note: This section is to show you how to connect to Nacos Config. The configurations have been completed in the following example, so you don't need modify the code anymore.**
Before we start the demo, let's learn how to connect Nacos Config to a Spring Cloud application. **Note: This section is to show you how to connect to Nacos Config. The configurations have been completed in the following example, so you don't need to modify the code anymore.**
1. Add dependency spring-cloud-starter-alibaba-nacos-config in the pom.xml file in your Spring Cloud project.
@ -37,7 +37,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
1. Install Nacos Server by downloading or build from source code.**Recommended latest version Nacos Server**
1. Download: Download Nacos Server [download page](https://github.com/alibaba/nacos/releases)
2. Build from source code: Get source code by git clone git@github.com:alibaba/Nacos.git from Github Nacos and build your code. See [build reference](https://nacos.io/en-us/docs/quick-start.html) for details.
2. Build from source code: Get source code by git clone git@github.com:alibaba/Nacos.git from GitHub Nacos and build your code. See [build reference](https://nacos.io/en-us/docs/quick-start.html) for details.
2. Unzip the downloaded file and go to the nacos/bin folder(), And according to the actual situation of the operating system, execute the following command。[see reference for more detail](https://nacos.io/en-us/docs/quick-start.html)。
@ -150,7 +150,7 @@ In Nacos Config Starter, the splicing format of dataId is as follows
**Note: when the active profile is empty, the corresponding connector `-` will also not exist, and the splicing format of the dataId becomes `${prefix}`.`${file-extension}`**
* `file-extension` is the data format of the configuration content, which can be configured by the configuration item `spring.cloud.nacos.config.file-extension`.
Currently only the `properties` type is supported.
Currently, only the `properties` type is supported.
#### group
* `group` defaults to `DEFAULT_GROUP` and can be configured via `spring.cloud.nacos.config.group`.
Nacos makes it easier and faster to construct, deliver and manage your microservices platform. It is the infrastructure that supports a service-centered modern application architecture with a microservices or cloud-native approach.
If you have any ideas or suggestions for Nacos Config starter, please don't hesitate to tell us by submitting github issues.
If you have any ideas or suggestions for Nacos Config starter, please don't hesitate to tell us by submitting GitHub issues.
@ -9,7 +9,7 @@ This example illustrates how to use Nacos Discovery Starter implement Service di
## Demo
### Connect to Nacos Discovery
Before we start the demo, let's learn how to connect Nacos Config to a Spring Cloud application. **Note: This section is to show you how to connect to Nacos Discovery. The configurations have been completed in the following example, so you don't need modify the code anymore.**
Before we start the demo, let's learn how to connect Nacos Config to a Spring Cloud application. **Note: This section is to show you how to connect to Nacos Discovery. The configurations have been completed in the following example, so you don't need to modify the code anymore.**
1. Add dependency spring-cloud-starter-alibaba-nacos-discovery in the pom.xml file in your Spring Cloud project.
@ -46,7 +46,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
1. Install Nacos Server by downloading or build from source code.**Recommended latest version Nacos Server**
1. Download: Download Nacos Server [download page](https://github.com/alibaba/nacos/releases)
2. Build from source code: Get source code by git clone git@github.com:alibaba/Nacos.git from Github Nacos and build your code. See [build reference](https://nacos.io/en-us/docs/quick-start.html) for details.
2. Build from source code: Get source code by git clone git@github.com:alibaba/Nacos.git from GitHub Nacos and build your code. See [build reference](https://nacos.io/en-us/docs/quick-start.html) for details.
@ -91,7 +91,7 @@ Nacos Discovery Starter integrates Ribbon by default, so for components that use
The code of `nacos-discovery-consumer-example` project will be analyzed below, demonstrating how RestTemplate and FeignClient.
**Note This section is to show you how to connect to Nacos Discovery. The configurations have been completed in the following example, so you don't need modify the code anymore.Only the contents related to Ribbon, RestTemplate, and FeignClient are involved here. If other service discovery components have been used, you can access Nacos Discovery by directly replacing the dependencies.**
**Note This section is to show you how to connect to Nacos Discovery. The configurations have been completed in the following example, so you don't need to modify the code anymore.Only the contents related to Ribbon, RestTemplate, and FeignClient are involved here. If other service discovery components have been used, you can access Nacos Discovery by directly replacing the dependencies.**
1. Add the @LoadBlanced annotation to make RestTemplate accessible to the Ribbon
@ -218,5 +218,5 @@ enabled|spring.cloud.nacos.discovery.enabled|true|The switch to enable or disabl
Nacos makes it easier and faster to construct, deliver and manage your microservices platform. It is the infrastructure that supports a service-centered modern application architecture with a microservices or cloud-native approach.
If you have any ideas or suggestions for Nacos Discovery starter, please don't hesitate to tell us by submitting github issues.
If you have any ideas or suggestions for Nacos Discovery starter, please don't hesitate to tell us by submitting GitHub issues.
This example illustrates how to use Nacos Discovery Starter、 Spring Cloud Gateway Starter implement Service route for Spring Cloud applications.
This example illustrates how to use Nacos Discovery Starter、 Spring Cloud Gateway Starter implement Service routes for Spring Cloud applications.
[Nacos](https://github.com/alibaba/Nacos) an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
[Spring Cloud Gateway](https://spring.io/projects/spring-cloud-gateway) provides a library for building an API Gateway on top of Spring MVC.
@ -11,7 +11,7 @@ This example illustrates how to use Nacos Discovery Starter、 Spring Cloud Gate
## Demo
### Connect to Nacos Discovery
Before we start the demo, let's learn how to connect Nacos Config to a Spring Cloud application. **Note: This section is to show you how to connect to Nacos Discovery、Nacos Discovery、Spring Cloud Gateway. The configurations have been completed in the following example, so you don't need modify the code anymore.**
Before we start the demo, let's learn how to connect Nacos Config to a Spring Cloud application. **Note: This section is to show you how to connect to Nacos Discovery、Nacos Discovery、Spring Cloud Gateway. The configurations have been completed in the following example, so you don't need to modify the code anymore.**
1. Add Nacos Discovery Starter、Spring Cloud Gateway Starter in the pom.xml file in your Spring Cloud project.
1. Install Nacos Server by downloading or build from source code.**Recommended latest version Nacos Server**
1. Download: Download Nacos Server [download page](https://github.com/alibaba/nacos/releases)
2. Build from source code: Get source code by git clone git@github.com:alibaba/Nacos.git from Github Nacos and build your code. See [build reference](https://nacos.io/en-us/docs/quick-start.html) for details.
2. Build from source code: Get source code by git clone git@github.com:alibaba/Nacos.git from GitHub Nacos and build your code. See [build reference](https://nacos.io/en-us/docs/quick-start.html) for details.
@ -101,5 +101,5 @@ Start the application in IDE or by building a fatjar.
Nacos makes it easier and faster to construct, deliver and manage your microservices platform. It is the infrastructure that supports a service-centered modern application architecture with a microservices or cloud-native approach.
If you have any ideas or suggestions for Nacos Discovery starter, please don't hesitate to tell us by submitting github issues.
If you have any ideas or suggestions for Nacos Discovery starter, please don't hesitate to tell us by submitting GitHub issues.
@ -112,9 +112,9 @@ Using the binding named output and sent messages to `test-topic` topic.
And using two input bindings to subscribe messages.
* input1: subscribe the message of `test-topic` topic and consume ordered messages(all messages should in the same MessageQueue if you want to consuming ordered messages).
* input1: subscribe the message of `test-topic` topic and consume ordered messages(all messages should in the same MessageQueue if you want to consume ordered messages).
* input2: subscribe the message of `test-topic` topic and consume concurrent messages which tags is`tagStr`, the thread number in pool is 20 in Consumer side.
* input2: subscribe the message of `test-topic` topic and consume concurrent messages which tags are`tagStr`, the thread number in pool is 20 in Consumer side.
see the configuration below:
@ -156,7 +156,7 @@ public class ProducerRunner implements CommandLineRunner {
}
```
Or you can using the native API of RocketMQ to send messages:
Or you can use the native API of RocketMQ to send messages:
```java
public class RocketMQProducer {
@ -968,5 +968,5 @@ Note: You should add [metrics-core dependency](https://mvnrepository.com/artifac
For more information about RocketMQ, see [RocketMQ Project](https://rocketmq.apache.org).
If you have any ideas or suggestions for Spring Cloud RocketMQ Binder, please don't hesitate to tell us by submitting github issues.
If you have any ideas or suggestions for Spring Cloud RocketMQ Binder, please don't hesitate to tell us by submitting GitHub issues.
@ -10,7 +10,7 @@ This example illustrates how to use Sentinel starter to implement flow control f
### Connect to Sentinel
Before we start the demo, let's learn how to connect Sentinel to a Spring Cloud application.
**Note: This section is to show you how to connect to Sentinel. The configurations have been completed in the following example, so you don't need modify the code anymore.**
**Note: This section is to show you how to connect to Sentinel. The configurations have been completed in the following example, so you don't need to modify the code anymore.**
1. Add dependency spring-cloud-starter-alibaba-sentinel in the pom.xml file in your Spring Cloud project.
@ -173,7 +173,7 @@ To see the metrics, click **实时监控(Real-time Monitoring)** in the left-sid
Sentinel provide [ReadableDataSource](https://github.com/alibaba/Sentinel/blob/master/sentinel-extension/sentinel-datasource-extension/src/main/java/com/alibaba/csp/sentinel/datasource/ReadableDataSource.java) to manage dynamic rules.
Sentinel starter integrated 4 DataSources provided by Sentinel. It will be register into Spring Context if you write some configs in `application.properties`.
Sentinel starter integrated 4 DataSources provided by Sentinel. It will be registered into Spring Context if you write some configs in `application.properties`.
If you want to define `FileRefreshableDataSource` and `NacosDataSource`, see the code below:
@ -202,7 +202,7 @@ When ReadableDataSource load rule data successfully, console will print some log
You should use `file` ReadableDataSource in a fatjar carefully or you may get error like this below
You should use `file` ReadableDataSource in a fatjar carefully, or you may get error like this below
```
java.lang.RuntimeException: [Sentinel Starter] DataSource ds1 handle file [classpath: flowrule.json] error: class path resource [flowrule.json] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:xxx/xxx.jar!/BOOT-INF/classes!/flowrule.jso
@ -104,7 +104,7 @@ Note: This article takes the `spring-cloud-alibaba-sidecar-nacos-example` projec
### Step4: Accessing services
After completing the above 4 steps, we find that the corresponding service `node-service` has been successfully registered to the registry. At this point, the service has been successfully integrated into the Spring Cloud microservice. For Spring Cloud microservices, accessing it is no different than accessing any other Java microservice.
After completing the above 4 steps, we find that the corresponding service `node-service` has been successfully registered to the registry. At this point, the service has been successfully integrated into the Spring Cloud microservice. For Spring Cloud microservices, accessing it is no different from accessing any other Java microservice.
This is where the beauty of Spring Cloud Alibaba Sidecar comes in. Next, we will continue to demonstrate how to access this service.
Browser Access below address:
@ -115,5 +115,5 @@ If you see the following message, the access was successful.
## More
If you have any ideas or suggestions for `Spring Cloud Alibaba Sidecar`, please don't hesitate to tell us by submitting github issues.
If you have any ideas or suggestions for `Spring Cloud Alibaba Sidecar`, please don't hesitate to tell us by submitting GitHub issues.