forked from alibaba/spring-cloud-alibaba
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ Before we start the demo, let's learn how to connect Sentinel to a Spring Cloud | |
2. Define Resources | ||
|
||
1. Define HTTP Resources | ||
Sentienl starter defines all HTTP URLS as resources by relative paths. If you only want to add flow control for your HTTP services, you do not need to modify your code. | ||
Sentinel starter defines all HTTP URLS as resources by relative paths. If you only want to add flow control for your HTTP services, you do not need to modify your code. | ||
1. Define Custom Resources | ||
If you want to implement flow control or degradation for a specific method, you can add an @EnableSentinel annotation to the method, as shown in the code below. | ||
|
@@ -54,7 +54,7 @@ Before we start the demo, let's learn how to connect Sentinel to a Spring Cloud | |
|
||
1. Install Sentinel dashboard by downloading a fatjar or build from source code. | ||
|
||
1. Download: [Downlaod Sentinel Dashboard](http://edas-public.oss-cn-hangzhou.aliyuncs.com/install_package/demo/sentinel-dashboard.jar) | ||
1. Download: [Download Sentinel Dashboard](http://edas-public.oss-cn-hangzhou.aliyuncs.com/install_package/demo/sentinel-dashboard.jar) | ||
2. Build from source code: Get source code by `git clone [email protected]:alibaba/Sentinel.git` from [Github Sentinel](https://github.com/alibaba/Sentinel) and build your code. See [build reference](https://github.com/alibaba/Sentinel/tree/master/sentinel-dashboard) for details. | ||
|
||
2. Start the dashboard by running the `java -jar sentinel-dashboard.jar` command. | ||
|
@@ -73,7 +73,7 @@ Before we start the demo, let's learn how to connect Sentinel to a Spring Cloud | |
1. Start in IDE: Find main class `ServiceApplication`, and execute the main method. | ||
2. Build a fatjar:Execute command `mvn clean package` to build a fatjar,and run command `java -jar sentinel-example.jar` to start the application. | ||
|
||
### Invoke Serivce | ||
### Invoke Service | ||
|
||
Execute command `curl http://127.0.0.1:18083/hello` | ||
Execute command `curl http://127.0.0.1:18083/test` | ||
|
@@ -145,18 +145,18 @@ The screenshot belows shows invoke success: | |
|
||
## Endpoint | ||
|
||
Sentinel starter also supports the implmentation of Spring Boot acutator endpoints. | ||
Sentinel starter also supports the implementation of Spring Boot actuator endpoints. | ||
|
||
**Prerequisite:** | ||
|
||
Add denpendency `spring-boot-starter-actuator` to your pom.xml file, and configure your endpoint security stategy. | ||
Add dependency `spring-boot-starter-actuator` to your pom.xml file, and configure your endpoint security strategy. | ||
|
||
* Spring Boot1.x: Add configuration `management.security.enabled=false` | ||
* Spring Boot2.x: Add configuration `management.endpoints.web.exposure.include=*` | ||
|
||
To view the endpoint information, visit the following URLS: | ||
* Spring Boot1.x: Sentinel Endpoint URL is http://127.0.0.1:18083/sentinel. | ||
* Spring Boot2.x: Sentinel Endpoint URL is http://127.0.0.1:18083/acutator/sentinel. | ||
* Spring Boot2.x: Sentinel Endpoint URL is http://127.0.0.1:18083/actuator/sentinel. | ||
|
||
<p align="center"><img src="https://cdn.yuque.com/lark/0/2018/png/54319/1532084199224-1a41591d-7a06-4680-be8a-5de319ac635d.png" width="480" heigh='360'></p> | ||
|
||
|