Skip to content

Commit 8bd61fd

Browse files
authored
Add rule configuration support for parameter flow control in Sentinel Dashboard (alibaba#176)
- Update dashboard API client to support authority and parameter flow commands - Add REST API controller for parameter flow rules in dashboard - Add pages for configuring parameter flow rules - Update dependencies: upgrade Spring Boot to 2.x and remove unused dependencies - Other refinements Signed-off-by: Eric Zhao <[email protected]>
1 parent e201a0f commit 8bd61fd

37 files changed

+1768
-122
lines changed

sentinel-dashboard/pom.xml

+11-19
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
<packaging>jar</packaging>
1414

1515
<properties>
16-
<maven.compiler.target>1.8</maven.compiler.target>
1716
<maven.compiler.source>1.8</maven.compiler.source>
17+
<maven.compiler.target>1.8</maven.compiler.target>
18+
<spring.boot.version>2.0.5.RELEASE</spring.boot.version>
1819
</properties>
1920

2021
<dependencies>
@@ -35,39 +36,30 @@
3536
</dependency>
3637
<dependency>
3738
<groupId>com.alibaba.csp</groupId>
38-
<artifactId>sentinel-transport-common</artifactId>
39+
<artifactId>sentinel-parameter-flow-control</artifactId>
3940
<version>${project.version}</version>
4041
</dependency>
41-
<dependency>
42-
<groupId>org.springframework.boot</groupId>
43-
<artifactId>spring-boot-starter-thymeleaf</artifactId>
44-
<version>1.5.9.RELEASE</version>
45-
</dependency>
42+
4643
<dependency>
4744
<groupId>org.springframework.boot</groupId>
4845
<artifactId>spring-boot-starter-web</artifactId>
49-
<version>1.5.9.RELEASE</version>
46+
<version>${spring.boot.version}</version>
5047
</dependency>
5148
<dependency>
5249
<groupId>org.springframework.boot</groupId>
5350
<artifactId>spring-boot-starter-logging</artifactId>
54-
<version>1.5.9.RELEASE</version>
55-
</dependency>
56-
<dependency>
57-
<groupId>org.springframework.boot</groupId>
58-
<artifactId>spring-boot-starter-tomcat</artifactId>
59-
<version>1.5.9.RELEASE</version>
51+
<version>${spring.boot.version}</version>
6052
</dependency>
6153
<dependency>
6254
<groupId>org.springframework.boot</groupId>
6355
<artifactId>spring-boot-devtools</artifactId>
64-
<version>1.5.9.RELEASE</version>
56+
<version>${spring.boot.version}</version>
6557
<optional>true</optional>
6658
</dependency>
6759
<dependency>
6860
<groupId>org.springframework.boot</groupId>
6961
<artifactId>spring-boot-starter-test</artifactId>
70-
<version>1.5.9.RELEASE</version>
62+
<version>${spring.boot.version}</version>
7163
<scope>test</scope>
7264
</dependency>
7365

@@ -117,7 +109,7 @@
117109
<artifactId>spring-boot-maven-plugin</artifactId>
118110
<configuration>
119111
<fork>true</fork>
120-
<mainClass>com.taobao.csp.sentinel.dashboard.Application</mainClass>
112+
<mainClass>com.taobao.csp.sentinel.dashboard.DashboardApplication</mainClass>
121113
</configuration>
122114
<executions>
123115
<execution>
@@ -132,8 +124,8 @@
132124
<groupId>org.apache.maven.plugins</groupId>
133125
<artifactId>maven-compiler-plugin</artifactId>
134126
<configuration>
135-
<source>1.8</source>
136-
<target>1.8</target>
127+
<source>${maven.compiler.source}</source>
128+
<target>${maven.compiler.target}</target>
137129
</configuration>
138130
</plugin>
139131

sentinel-dashboard/src/main/java/com/taobao/csp/sentinel/dashboard/Application.java renamed to sentinel-dashboard/src/main/java/com/taobao/csp/sentinel/dashboard/DashboardApplication.java

+2-10
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,11 @@
1717

1818
import org.springframework.boot.SpringApplication;
1919
import org.springframework.boot.autoconfigure.SpringBootApplication;
20-
import org.springframework.boot.builder.SpringApplicationBuilder;
21-
import org.springframework.boot.web.support.SpringBootServletInitializer;
2220

2321
@SpringBootApplication
24-
public class Application extends SpringBootServletInitializer {
25-
26-
@Override
27-
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
28-
return application.sources(Application.class);
29-
}
22+
public class DashboardApplication {
3023

3124
public static void main(String[] args) {
32-
SpringApplication.run(Application.class, args);
25+
SpringApplication.run(DashboardApplication.class, args);
3326
}
34-
3527
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 1999-2018 Alibaba Group Holding Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.taobao.csp.sentinel.dashboard.client;
17+
18+
/**
19+
* @author Eric Zhao
20+
* @since 0.2.1
21+
*/
22+
public class CommandNotFoundException extends Exception {
23+
public CommandNotFoundException() { }
24+
25+
public CommandNotFoundException(String message) {
26+
super(message);
27+
}
28+
}

0 commit comments

Comments
 (0)