Signed-off-by: Eric Zhao <sczyh16@gmail.com>master
@@ -49,9 +49,9 @@ Below is a simple demo that guides new users to use Sentinel in just 3 steps. It | |||
### 1. Add Dependency | |||
**Note:** Sentinel Core requires Java 7 or later. | |||
**Note:** Sentinel requires JDK 1.8 or later. | |||
If your're using Maven, just add the following dependency in `pom.xml`. | |||
If you're using Maven, just add the following dependency in `pom.xml`. | |||
```xml | |||
<!-- replace here with the latest version --> | |||
@@ -53,8 +53,8 @@ | |||
<!-- Build --> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<java.source.version>1.7</java.source.version> | |||
<java.target.version>1.7</java.target.version> | |||
<java.source.version>1.8</java.source.version> | |||
<java.target.version>1.8</java.target.version> | |||
<java.encoding>UTF-8</java.encoding> | |||
<maven.compiler.version>3.8.0</maven.compiler.version> | |||
<maven.surefire.version>2.22.1</maven.surefire.version> | |||
@@ -12,11 +12,6 @@ | |||
<artifactId>sentinel-api-gateway-adapter-common</artifactId> | |||
<packaging>jar</packaging> | |||
<properties> | |||
<java.source.version>1.7</java.source.version> | |||
<java.target.version>1.7</java.target.version> | |||
</properties> | |||
<dependencies> | |||
<dependency> | |||
<groupId>com.alibaba.csp</groupId> | |||
@@ -20,6 +20,7 @@ | |||
<groupId>com.alibaba.csp</groupId> | |||
<artifactId>sentinel-core</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.weibo</groupId> | |||
<artifactId>motan-core</artifactId> | |||
@@ -33,18 +34,5 @@ | |||
<scope>provided</scope> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -1,7 +1,5 @@ | |||
# Sentinel Reactor Adapter | |||
> Note: this module requires Java 8 or later version. | |||
Sentinel provides integration module for [Reactor](https://projectreactor.io/). | |||
Add the following dependency in `pom.xml` (if you are using Maven): | |||
@@ -1,7 +1,5 @@ | |||
# Sentinel Spring Cloud Gateway Adapter | |||
> Note: this module requires Java 8 or later version. | |||
Sentinel provides integration module with Spring Cloud Gateway. | |||
The integration module is based on the Sentinel Reactor Adapter. | |||
@@ -1,7 +1,5 @@ | |||
# Sentinel Spring WebFlux Adapter | |||
> Note: this module requires Java 8 or later version. | |||
Sentinel provides integration module with Spring WebFlux, so reactive web applications can also leverage Sentinel's flow control | |||
and circuit breaking to achieve reliability. The integration module is based on the Sentinel Reactor Adapter. | |||
@@ -40,22 +40,11 @@ | |||
<properties> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<jmh.version>1.21</jmh.version> | |||
<javac.target>1.8</javac.target> | |||
<uberjar.name>benchmarks</uberjar.name> | |||
</properties> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<compilerVersion>${javac.target}</compilerVersion> | |||
<source>${javac.target}</source> | |||
<target>${javac.target}</target> | |||
</configuration> | |||
</plugin> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-pmd-plugin</artifactId> | |||
@@ -13,9 +13,6 @@ | |||
<description>The parent module of Sentinel cluster server</description> | |||
<properties> | |||
<java.source.version>1.7</java.source.version> | |||
<java.target.version>1.7</java.target.version> | |||
<netty.version>4.1.31.Final</netty.version> | |||
</properties> | |||
@@ -59,11 +59,7 @@ public final class RequestProcessorProvider { | |||
} | |||
static void addProcessorIfAbsent(int type, RequestProcessor processor) { | |||
// TBD: use putIfAbsent in JDK 1.8. | |||
if (PROCESSOR_MAP.containsKey(type)) { | |||
return; | |||
} | |||
PROCESSOR_MAP.put(type, processor); | |||
PROCESSOR_MAP.putIfAbsent(type, processor); | |||
} | |||
static void addProcessor(int type, RequestProcessor processor) { | |||
@@ -13,8 +13,6 @@ | |||
<packaging>jar</packaging> | |||
<properties> | |||
<maven.compiler.source>1.8</maven.compiler.source> | |||
<maven.compiler.target>1.8</maven.compiler.target> | |||
<spring.boot.version>2.0.5.RELEASE</spring.boot.version> | |||
<curator.version>4.0.1</curator.version> | |||
</properties> | |||
@@ -158,15 +156,6 @@ | |||
</executions> | |||
</plugin> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<configuration> | |||
<source>${maven.compiler.source}</source> | |||
<target>${maven.compiler.target}</target> | |||
</configuration> | |||
</plugin> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-deploy-plugin</artifactId> | |||
@@ -12,11 +12,6 @@ | |||
<packaging>pom</packaging> | |||
<name>sentinel-demo</name> | |||
<properties> | |||
<java.source.version>1.8</java.source.version> | |||
<java.target.version>1.8</java.target.version> | |||
</properties> | |||
<modules> | |||
<module>sentinel-demo-basic</module> | |||
<module>sentinel-demo-dynamic-file-rule</module> | |||
@@ -12,8 +12,6 @@ | |||
<artifactId>sentinel-demo-apollo-datasource</artifactId> | |||
<properties> | |||
<java.source.version>1.8</java.source.version> | |||
<java.target.version>1.8</java.target.version> | |||
<log4j2.version>2.9.1</log4j2.version> | |||
<slf4j.version>1.7.25</slf4j.version> | |||
</properties> | |||
@@ -50,18 +50,4 @@ | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -30,19 +30,4 @@ | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<finalName>sentinel-demo-dynamic-file-rule</finalName> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -12,37 +12,19 @@ | |||
<artifactId>sentinel-demo-etcd-datasource</artifactId> | |||
<dependencies> | |||
<dependency> | |||
<groupId>com.alibaba.csp</groupId> | |||
<artifactId>sentinel-core</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.alibaba.csp</groupId> | |||
<artifactId>sentinel-datasource-etcd</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.alibaba</groupId> | |||
<artifactId>fastjson</artifactId> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -50,19 +50,4 @@ | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -37,18 +37,4 @@ | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -11,11 +11,6 @@ | |||
<artifactId>sentinel-demo-parameter-flow-control</artifactId> | |||
<properties> | |||
<java.source.version>1.8</java.source.version> | |||
<java.target.version>1.8</java.target.version> | |||
</properties> | |||
<dependencies> | |||
<dependency> | |||
<groupId>com.alibaba.csp</groupId> | |||
@@ -19,18 +19,4 @@ | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -11,11 +11,6 @@ | |||
<artifactId>sentinel-demo-spring-cloud-gateway</artifactId> | |||
<properties> | |||
<java.source.version>1.8</java.source.version> | |||
<java.target.version>1.8</java.target.version> | |||
</properties> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.springframework.cloud</groupId> | |||
@@ -54,19 +54,4 @@ | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<version>${maven.compiler.version}</version> | |||
<configuration> | |||
<source>1.8</source> | |||
<target>1.8</target> | |||
<encoding>${java.encoding}</encoding> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -3,8 +3,6 @@ | |||
Sentinel DataSource Consul provides integration with Consul. The data source leverages blocking query (backed by | |||
long polling) of Consul. | |||
> **NOTE**: This module requires JDK 1.8 or later. | |||
## Usage | |||
To use Sentinel DataSource Consul, you could add the following dependency: | |||
@@ -3,8 +3,6 @@ | |||
Sentinel DataSource Etcd provides integration with etcd so that etcd | |||
can be the dynamic rule data source of Sentinel. The data source uses push model (watcher). | |||
> **NOTE**: This module requires JDK 1.8 or later. | |||
To use Sentinel DataSource Etcd, you should add the following dependency: | |||
```xml | |||
@@ -2,7 +2,7 @@ | |||
Sentinel DataSource Redis provides integration with Redis. The data source leverages Redis pub-sub feature to implement push model (listener). | |||
The data source uses [Lettuce](https://lettuce.io/) as the Redis client internal. Requires JDK 1.8 or later. | |||
The data source uses [Lettuce](https://lettuce.io/) as the Redis client, which requires JDK 1.8 or later. | |||
> **NOTE**: Currently we do not support Redis Cluster now. | |||
@@ -13,8 +13,6 @@ | |||
<packaging>jar</packaging> | |||
<properties> | |||
<java.source.version>1.7</java.source.version> | |||
<java.target.version>1.7</java.target.version> | |||
<zookeeper.version>3.4.14</zookeeper.version> | |||
<curator.version>4.0.1</curator.version> | |||
<curator.test.version>2.12.0</curator.test.version> | |||
@@ -13,8 +13,6 @@ | |||
<packaging>jar</packaging> | |||
<properties> | |||
<java.source.version>1.7</java.source.version> | |||
<java.target.version>1.7</java.target.version> | |||
<slf4j.version>1.7.25</slf4j.version> | |||
<slf4j-test.version>1.2.0</slf4j-test.version> | |||
</properties> | |||