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 | ### 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 | ```xml | ||||
<!-- replace here with the latest version --> | <!-- replace here with the latest version --> | ||||
@@ -53,8 +53,8 @@ | |||||
<!-- Build --> | <!-- Build --> | ||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | <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> | <java.encoding>UTF-8</java.encoding> | ||||
<maven.compiler.version>3.8.0</maven.compiler.version> | <maven.compiler.version>3.8.0</maven.compiler.version> | ||||
<maven.surefire.version>2.22.1</maven.surefire.version> | <maven.surefire.version>2.22.1</maven.surefire.version> | ||||
@@ -12,11 +12,6 @@ | |||||
<artifactId>sentinel-api-gateway-adapter-common</artifactId> | <artifactId>sentinel-api-gateway-adapter-common</artifactId> | ||||
<packaging>jar</packaging> | <packaging>jar</packaging> | ||||
<properties> | |||||
<java.source.version>1.7</java.source.version> | |||||
<java.target.version>1.7</java.target.version> | |||||
</properties> | |||||
<dependencies> | <dependencies> | ||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba.csp</groupId> | <groupId>com.alibaba.csp</groupId> | ||||
@@ -20,6 +20,7 @@ | |||||
<groupId>com.alibaba.csp</groupId> | <groupId>com.alibaba.csp</groupId> | ||||
<artifactId>sentinel-core</artifactId> | <artifactId>sentinel-core</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.weibo</groupId> | <groupId>com.weibo</groupId> | ||||
<artifactId>motan-core</artifactId> | <artifactId>motan-core</artifactId> | ||||
@@ -33,18 +34,5 @@ | |||||
<scope>provided</scope> | <scope>provided</scope> | ||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -1,7 +1,5 @@ | |||||
# Sentinel Reactor Adapter | # Sentinel Reactor Adapter | ||||
> Note: this module requires Java 8 or later version. | |||||
Sentinel provides integration module for [Reactor](https://projectreactor.io/). | Sentinel provides integration module for [Reactor](https://projectreactor.io/). | ||||
Add the following dependency in `pom.xml` (if you are using Maven): | Add the following dependency in `pom.xml` (if you are using Maven): | ||||
@@ -1,7 +1,5 @@ | |||||
# Sentinel Spring Cloud Gateway Adapter | # Sentinel Spring Cloud Gateway Adapter | ||||
> Note: this module requires Java 8 or later version. | |||||
Sentinel provides integration module with Spring Cloud Gateway. | Sentinel provides integration module with Spring Cloud Gateway. | ||||
The integration module is based on the Sentinel Reactor Adapter. | The integration module is based on the Sentinel Reactor Adapter. | ||||
@@ -1,7 +1,5 @@ | |||||
# Sentinel Spring WebFlux Adapter | # 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 | 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. | and circuit breaking to achieve reliability. The integration module is based on the Sentinel Reactor Adapter. | ||||
@@ -40,22 +40,11 @@ | |||||
<properties> | <properties> | ||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||
<jmh.version>1.21</jmh.version> | <jmh.version>1.21</jmh.version> | ||||
<javac.target>1.8</javac.target> | |||||
<uberjar.name>benchmarks</uberjar.name> | <uberjar.name>benchmarks</uberjar.name> | ||||
</properties> | </properties> | ||||
<build> | <build> | ||||
<plugins> | <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> | <plugin> | ||||
<groupId>org.apache.maven.plugins</groupId> | <groupId>org.apache.maven.plugins</groupId> | ||||
<artifactId>maven-pmd-plugin</artifactId> | <artifactId>maven-pmd-plugin</artifactId> | ||||
@@ -13,9 +13,6 @@ | |||||
<description>The parent module of Sentinel cluster server</description> | <description>The parent module of Sentinel cluster server</description> | ||||
<properties> | <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> | <netty.version>4.1.31.Final</netty.version> | ||||
</properties> | </properties> | ||||
@@ -59,11 +59,7 @@ public final class RequestProcessorProvider { | |||||
} | } | ||||
static void addProcessorIfAbsent(int type, RequestProcessor processor) { | 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) { | static void addProcessor(int type, RequestProcessor processor) { | ||||
@@ -13,8 +13,6 @@ | |||||
<packaging>jar</packaging> | <packaging>jar</packaging> | ||||
<properties> | <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> | <spring.boot.version>2.0.5.RELEASE</spring.boot.version> | ||||
<curator.version>4.0.1</curator.version> | <curator.version>4.0.1</curator.version> | ||||
</properties> | </properties> | ||||
@@ -158,15 +156,6 @@ | |||||
</executions> | </executions> | ||||
</plugin> | </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> | <plugin> | ||||
<groupId>org.apache.maven.plugins</groupId> | <groupId>org.apache.maven.plugins</groupId> | ||||
<artifactId>maven-deploy-plugin</artifactId> | <artifactId>maven-deploy-plugin</artifactId> | ||||
@@ -12,11 +12,6 @@ | |||||
<packaging>pom</packaging> | <packaging>pom</packaging> | ||||
<name>sentinel-demo</name> | <name>sentinel-demo</name> | ||||
<properties> | |||||
<java.source.version>1.8</java.source.version> | |||||
<java.target.version>1.8</java.target.version> | |||||
</properties> | |||||
<modules> | <modules> | ||||
<module>sentinel-demo-basic</module> | <module>sentinel-demo-basic</module> | ||||
<module>sentinel-demo-dynamic-file-rule</module> | <module>sentinel-demo-dynamic-file-rule</module> | ||||
@@ -12,8 +12,6 @@ | |||||
<artifactId>sentinel-demo-apollo-datasource</artifactId> | <artifactId>sentinel-demo-apollo-datasource</artifactId> | ||||
<properties> | <properties> | ||||
<java.source.version>1.8</java.source.version> | |||||
<java.target.version>1.8</java.target.version> | |||||
<log4j2.version>2.9.1</log4j2.version> | <log4j2.version>2.9.1</log4j2.version> | ||||
<slf4j.version>1.7.25</slf4j.version> | <slf4j.version>1.7.25</slf4j.version> | ||||
</properties> | </properties> | ||||
@@ -50,18 +50,4 @@ | |||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -30,19 +30,4 @@ | |||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -12,37 +12,19 @@ | |||||
<artifactId>sentinel-demo-etcd-datasource</artifactId> | <artifactId>sentinel-demo-etcd-datasource</artifactId> | ||||
<dependencies> | <dependencies> | ||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba.csp</groupId> | <groupId>com.alibaba.csp</groupId> | ||||
<artifactId>sentinel-core</artifactId> | <artifactId>sentinel-core</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba.csp</groupId> | <groupId>com.alibaba.csp</groupId> | ||||
<artifactId>sentinel-datasource-etcd</artifactId> | <artifactId>sentinel-datasource-etcd</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba</groupId> | <groupId>com.alibaba</groupId> | ||||
<artifactId>fastjson</artifactId> | <artifactId>fastjson</artifactId> | ||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -50,19 +50,4 @@ | |||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -37,18 +37,4 @@ | |||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -11,11 +11,6 @@ | |||||
<artifactId>sentinel-demo-parameter-flow-control</artifactId> | <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> | <dependencies> | ||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba.csp</groupId> | <groupId>com.alibaba.csp</groupId> | ||||
@@ -19,18 +19,4 @@ | |||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -11,11 +11,6 @@ | |||||
<artifactId>sentinel-demo-spring-cloud-gateway</artifactId> | <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> | <dependencies> | ||||
<dependency> | <dependency> | ||||
<groupId>org.springframework.cloud</groupId> | <groupId>org.springframework.cloud</groupId> | ||||
@@ -54,19 +54,4 @@ | |||||
</dependency> | </dependency> | ||||
</dependencies> | </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> | </project> |
@@ -3,8 +3,6 @@ | |||||
Sentinel DataSource Consul provides integration with Consul. The data source leverages blocking query (backed by | Sentinel DataSource Consul provides integration with Consul. The data source leverages blocking query (backed by | ||||
long polling) of Consul. | long polling) of Consul. | ||||
> **NOTE**: This module requires JDK 1.8 or later. | |||||
## Usage | ## Usage | ||||
To use Sentinel DataSource Consul, you could add the following dependency: | 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 | 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). | 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: | To use Sentinel DataSource Etcd, you should add the following dependency: | ||||
```xml | ```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). | 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. | > **NOTE**: Currently we do not support Redis Cluster now. | ||||
@@ -13,8 +13,6 @@ | |||||
<packaging>jar</packaging> | <packaging>jar</packaging> | ||||
<properties> | <properties> | ||||
<java.source.version>1.7</java.source.version> | |||||
<java.target.version>1.7</java.target.version> | |||||
<zookeeper.version>3.4.14</zookeeper.version> | <zookeeper.version>3.4.14</zookeeper.version> | ||||
<curator.version>4.0.1</curator.version> | <curator.version>4.0.1</curator.version> | ||||
<curator.test.version>2.12.0</curator.test.version> | <curator.test.version>2.12.0</curator.test.version> | ||||
@@ -13,8 +13,6 @@ | |||||
<packaging>jar</packaging> | <packaging>jar</packaging> | ||||
<properties> | <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.version>1.7.25</slf4j.version> | ||||
<slf4j-test.version>1.2.0</slf4j-test.version> | <slf4j-test.version>1.2.0</slf4j-test.version> | ||||
</properties> | </properties> | ||||