mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-10-15 06:30:26 +00:00
remove 重大改动 删除sentinel所有相关功能(为什么删除 查看文档详细说明 https://plus-doc.dromara.org/#/questions/sentinel_404)
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="ruoyi-sentinel-dashboard" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
|
||||||
<deployment type="dockerfile">
|
|
||||||
<settings>
|
|
||||||
<option name="imageTag" value="ruoyi/ruoyi-sentinel-dashboard:2.4.1" />
|
|
||||||
<option name="buildOnly" value="true" />
|
|
||||||
<option name="sourceFilePath" value="ruoyi-visual/ruoyi-sentinel-dashboard/Dockerfile" />
|
|
||||||
</settings>
|
|
||||||
</deployment>
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
@@ -26,11 +26,6 @@
|
|||||||
<artifactId>hutool-captcha</artifactId>
|
<artifactId>hutool-captcha</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- RuoYi Common Security-->
|
<!-- RuoYi Common Security-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara</groupId>
|
<groupId>org.dromara</groupId>
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
<module>ruoyi-common-sms</module>
|
<module>ruoyi-common-sms</module>
|
||||||
<module>ruoyi-common-logstash</module>
|
<module>ruoyi-common-logstash</module>
|
||||||
<module>ruoyi-common-elasticsearch</module>
|
<module>ruoyi-common-elasticsearch</module>
|
||||||
<module>ruoyi-common-sentinel</module>
|
|
||||||
<module>ruoyi-common-skylog</module>
|
<module>ruoyi-common-skylog</module>
|
||||||
<module>ruoyi-common-prometheus</module>
|
<module>ruoyi-common-prometheus</module>
|
||||||
<module>ruoyi-common-translation</module>
|
<module>ruoyi-common-translation</module>
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<revision>2.4.1</revision>
|
<revision>2.4.1</revision>
|
||||||
<spring-cloud-alibaba.version>2023.0.3.3</spring-cloud-alibaba.version>
|
<spring-cloud-alibaba.version>2023.0.3.3</spring-cloud-alibaba.version>
|
||||||
<sentinel.version>1.8.8</sentinel.version>
|
|
||||||
<seata.version>2.4.0</seata.version>
|
<seata.version>2.4.0</seata.version>
|
||||||
<nacos.client.version>2.5.1</nacos.client.version>
|
<nacos.client.version>2.5.1</nacos.client.version>
|
||||||
<dubbo.version>3.3.5</dubbo.version>
|
<dubbo.version>3.3.5</dubbo.version>
|
||||||
@@ -36,111 +35,6 @@
|
|||||||
<artifactId>nacos-client</artifactId>
|
<artifactId>nacos-client</artifactId>
|
||||||
<version>${nacos.client.version}</version>
|
<version>${nacos.client.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-core</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-parameter-flow-control</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-datasource-extension</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-datasource-apollo</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-datasource-zookeeper</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-datasource-redis</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-datasource-consul</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-web-servlet</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-spring-cloud-gateway-adapter</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-transport-simple-http</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-annotation-aspectj</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-reactor-adapter</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-cluster-server-default</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-cluster-client-default</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-spring-webflux-adapter</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-api-gateway-adapter-common</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-spring-webmvc-v6x-adapter</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-dubbo-adapter</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-apache-dubbo-adapter</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-apache-dubbo3-adapter</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.seata</groupId>
|
<groupId>org.apache.seata</groupId>
|
||||||
<artifactId>seata-spring-boot-starter</artifactId>
|
<artifactId>seata-spring-boot-starter</artifactId>
|
||||||
|
@@ -166,13 +166,6 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 限流模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- skywalking日志收集模块 -->
|
<!-- skywalking日志收集模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara</groupId>
|
<groupId>org.dromara</groupId>
|
||||||
|
@@ -1,51 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
ruoyi-common-sentinel 限流模块
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<!-- SpringCloud Alibaba Sentinel -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Sentinel Datasource Nacos -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-apache-dubbo3-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
||||||
<artifactId>jackson-dataformat-xml</artifactId>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
@@ -1,52 +0,0 @@
|
|||||||
package org.dromara.common.sentinel.config;
|
|
||||||
|
|
||||||
import com.alibaba.cloud.commons.lang.StringUtils;
|
|
||||||
import com.alibaba.cloud.sentinel.SentinelProperties;
|
|
||||||
import com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration;
|
|
||||||
import com.alibaba.csp.sentinel.init.InitExecutor;
|
|
||||||
import com.alibaba.csp.sentinel.transport.config.TransportConfig;
|
|
||||||
import org.dromara.common.core.utils.StreamUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.cloud.client.ServiceInstance;
|
|
||||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
@AutoConfiguration(before = SentinelAutoConfiguration.class)
|
|
||||||
@EnableConfigurationProperties({SentinelProperties.class, SentinelCustomProperties.class})
|
|
||||||
public class SentinelCustomAutoConfiguration {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SentinelProperties properties;
|
|
||||||
@Autowired
|
|
||||||
private SentinelCustomProperties customProperties;
|
|
||||||
@Autowired
|
|
||||||
private DiscoveryClient discoveryClient;
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public Object sentinelInit() {
|
|
||||||
if (StringUtils.isNotBlank(customProperties.getServerName())) {
|
|
||||||
List<ServiceInstance> instances = discoveryClient.getInstances(customProperties.getServerName());
|
|
||||||
String serverList = StreamUtils.join(instances, instance ->
|
|
||||||
String.format("http://%s:%s", instance.getHost(), instance.getPort()));
|
|
||||||
System.setProperty(TransportConfig.CONSOLE_SERVER, serverList);
|
|
||||||
} else {
|
|
||||||
if (StringUtils.isEmpty(System.getProperty(TransportConfig.CONSOLE_SERVER))
|
|
||||||
&& StringUtils.isNotBlank(properties.getTransport().getDashboard())) {
|
|
||||||
System.setProperty(TransportConfig.CONSOLE_SERVER,
|
|
||||||
properties.getTransport().getDashboard());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 手动初始化 sentinel
|
|
||||||
InitExecutor.doInit();
|
|
||||||
return new Object();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
package org.dromara.common.sentinel.config;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sentinel自定义配置类
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ConfigurationProperties(prefix = "spring.cloud.sentinel.transport")
|
|
||||||
public class SentinelCustomProperties {
|
|
||||||
|
|
||||||
private String serverName;
|
|
||||||
|
|
||||||
}
|
|
@@ -1 +0,0 @@
|
|||||||
org.dromara.common.sentinel.config.SentinelCustomAutoConfiguration
|
|
@@ -22,11 +22,6 @@
|
|||||||
<artifactId>ruoyi-common-nacos</artifactId>
|
<artifactId>ruoyi-common-nacos</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara</groupId>
|
<groupId>org.dromara</groupId>
|
||||||
<artifactId>ruoyi-common-log</artifactId>
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
|
@@ -34,11 +34,6 @@
|
|||||||
<artifactId>spring-kafka</artifactId>
|
<artifactId>spring-kafka</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara</groupId>
|
<groupId>org.dromara</groupId>
|
||||||
<artifactId>ruoyi-common-security</artifactId>
|
<artifactId>ruoyi-common-security</artifactId>
|
||||||
|
@@ -37,12 +37,6 @@
|
|||||||
<artifactId>ruoyi-common-nacos</artifactId>
|
<artifactId>ruoyi-common-nacos</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Sentinel Gateway -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@@ -61,17 +55,6 @@
|
|||||||
<version>${satoken.version}</version>
|
<version>${satoken.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-apache-dubbo3-adapter</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara</groupId>
|
<groupId>org.dromara</groupId>
|
||||||
<artifactId>ruoyi-common-satoken</artifactId>
|
<artifactId>ruoyi-common-satoken</artifactId>
|
||||||
|
@@ -1,96 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1999-2019 Alibaba Group Holding Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package com.alibaba.csp.sentinel.adapter.gateway.sc.callback;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.http.InvalidMediaTypeException;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.util.MimeTypeUtils;
|
|
||||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
|
||||||
import org.springframework.web.server.ServerWebExchange;
|
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static org.springframework.web.reactive.function.BodyInserters.fromObject;
|
|
||||||
|
|
||||||
// https://github.com/alibaba/Sentinel/issues/3298
|
|
||||||
// 临时解决 sentinel 限流插件 jdk17 报错问题
|
|
||||||
/**
|
|
||||||
* The default implementation of {@link BlockRequestHandler}.
|
|
||||||
* Compatible with Spring WebFlux and Spring Cloud Gateway.
|
|
||||||
*
|
|
||||||
* @author Eric Zhao
|
|
||||||
*/
|
|
||||||
public class DefaultBlockRequestHandler implements BlockRequestHandler {
|
|
||||||
|
|
||||||
private static final String DEFAULT_BLOCK_MSG_PREFIX = "Blocked by Sentinel: ";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Mono<ServerResponse> handleRequest(ServerWebExchange exchange, Throwable ex) {
|
|
||||||
if (acceptsHtml(exchange)) {
|
|
||||||
return htmlErrorResponse(ex);
|
|
||||||
}
|
|
||||||
// JSON result by default.
|
|
||||||
return ServerResponse.status(HttpStatus.TOO_MANY_REQUESTS)
|
|
||||||
.contentType(MediaType.APPLICATION_JSON_UTF8)
|
|
||||||
.body(fromObject(buildErrorResult(ex)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private Mono<ServerResponse> htmlErrorResponse(Throwable ex) {
|
|
||||||
return ServerResponse.status(HttpStatus.TOO_MANY_REQUESTS)
|
|
||||||
.contentType(MediaType.TEXT_PLAIN)
|
|
||||||
.syncBody(DEFAULT_BLOCK_MSG_PREFIX + ex.getClass().getSimpleName());
|
|
||||||
}
|
|
||||||
|
|
||||||
private ErrorResult buildErrorResult(Throwable ex) {
|
|
||||||
return new ErrorResult(HttpStatus.TOO_MANY_REQUESTS.value(),
|
|
||||||
DEFAULT_BLOCK_MSG_PREFIX + ex.getClass().getSimpleName());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference from {@code DefaultErrorWebExceptionHandler} of Spring Boot.
|
|
||||||
*/
|
|
||||||
private boolean acceptsHtml(ServerWebExchange exchange) {
|
|
||||||
try {
|
|
||||||
List<MediaType> acceptedMediaTypes = exchange.getRequest().getHeaders().getAccept();
|
|
||||||
acceptedMediaTypes.remove(MediaType.ALL);
|
|
||||||
MimeTypeUtils. sortBySpecificity(acceptedMediaTypes);
|
|
||||||
return acceptedMediaTypes.stream()
|
|
||||||
.anyMatch(MediaType.TEXT_HTML::isCompatibleWith);
|
|
||||||
} catch (InvalidMediaTypeException ex) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ErrorResult {
|
|
||||||
private final int code;
|
|
||||||
private final String message;
|
|
||||||
|
|
||||||
ErrorResult(int code, String message) {
|
|
||||||
this.code = code;
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMessage() {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -13,8 +13,6 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
|||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||||
public class RuoYiGatewayApplication {
|
public class RuoYiGatewayApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// 标记 sentinel 类型为 网关
|
|
||||||
System.setProperty("csp.sentinel.app.type", "1");
|
|
||||||
SpringApplication application = new SpringApplication(RuoYiGatewayApplication.class);
|
SpringApplication application = new SpringApplication(RuoYiGatewayApplication.class);
|
||||||
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||||
application.run(args);
|
application.run(args);
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
package org.dromara.gateway.config;
|
package org.dromara.gateway.config;
|
||||||
|
|
||||||
import org.dromara.gateway.handler.SentinelFallbackHandler;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.Ordered;
|
|
||||||
import org.springframework.core.annotation.Order;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 网关限流配置
|
* 网关限流配置
|
||||||
@@ -13,9 +9,5 @@ import org.springframework.core.annotation.Order;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class GatewayConfig {
|
public class GatewayConfig {
|
||||||
@Bean
|
|
||||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
|
||||||
public SentinelFallbackHandler sentinelGatewayExceptionHandler() {
|
|
||||||
return new SentinelFallbackHandler();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -1,36 +0,0 @@
|
|||||||
package org.dromara.gateway.handler;
|
|
||||||
|
|
||||||
import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.GatewayCallbackManager;
|
|
||||||
import com.alibaba.csp.sentinel.slots.block.BlockException;
|
|
||||||
import org.dromara.gateway.utils.WebFluxUtils;
|
|
||||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
|
||||||
import org.springframework.web.server.ServerWebExchange;
|
|
||||||
import org.springframework.web.server.WebExceptionHandler;
|
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义限流异常处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
public class SentinelFallbackHandler implements WebExceptionHandler {
|
|
||||||
private Mono<Void> writeResponse(ServerResponse response, ServerWebExchange exchange) {
|
|
||||||
return WebFluxUtils.webFluxResponseWriter(exchange.getResponse(), "请求超过最大数,请稍候再试");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Mono<Void> handle(ServerWebExchange exchange, Throwable ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
if (exchange.getResponse().isCommitted()) {
|
|
||||||
return Mono.error(ex);
|
|
||||||
}
|
|
||||||
if (!BlockException.isBlockException(ex)) {
|
|
||||||
return Mono.error(ex);
|
|
||||||
}
|
|
||||||
return handleBlockedRequest(exchange, ex).flatMap(response -> writeResponse(response, exchange));
|
|
||||||
}
|
|
||||||
|
|
||||||
private Mono<ServerResponse> handleBlockedRequest(ServerWebExchange exchange, Throwable throwable) {
|
|
||||||
return GatewayCallbackManager.getBlockHandler().handleRequest(exchange, throwable);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -22,11 +22,6 @@
|
|||||||
<artifactId>ruoyi-common-nacos</artifactId>
|
<artifactId>ruoyi-common-nacos</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara</groupId>
|
<groupId>org.dromara</groupId>
|
||||||
<artifactId>ruoyi-common-doc</artifactId>
|
<artifactId>ruoyi-common-doc</artifactId>
|
||||||
|
@@ -22,11 +22,6 @@
|
|||||||
<artifactId>ruoyi-common-nacos</artifactId>
|
<artifactId>ruoyi-common-nacos</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-sentinel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- RuoYi Common Log -->
|
<!-- RuoYi Common Log -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara</groupId>
|
<groupId>org.dromara</groupId>
|
||||||
|
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>ruoyi-monitor</module>
|
<module>ruoyi-monitor</module>
|
||||||
<module>ruoyi-sentinel-dashboard</module>
|
|
||||||
<module>ruoyi-seata-server</module>
|
<module>ruoyi-seata-server</module>
|
||||||
<module>ruoyi-nacos</module>
|
<module>ruoyi-nacos</module>
|
||||||
<module>ruoyi-snailjob-server</module>
|
<module>ruoyi-snailjob-server</module>
|
||||||
|
@@ -1,24 +0,0 @@
|
|||||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
|
||||||
FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
|
||||||
#FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
|
||||||
#FROM findepi/graalvm:java17-native
|
|
||||||
|
|
||||||
LABEL maintainer="Lion Li"
|
|
||||||
|
|
||||||
RUN mkdir -p /ruoyi/sentinel-dashboard/logs \
|
|
||||||
/ruoyi/skywalking/agent
|
|
||||||
|
|
||||||
WORKDIR /ruoyi/sentinel-dashboard
|
|
||||||
|
|
||||||
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
|
||||||
|
|
||||||
EXPOSE 8718
|
|
||||||
|
|
||||||
ADD ./target/ruoyi-sentinel-dashboard.jar ./app.jar
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \
|
|
||||||
#-Dskywalking.agent.service_name=ruoyi-sentinel-dashboard \
|
|
||||||
#-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \
|
|
||||||
${JAVA_OPTS} -jar app.jar
|
|
@@ -1,186 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-visual</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>ruoyi-sentinel-dashboard</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<sentinel.version>1.8.8</sentinel.version>
|
|
||||||
<curator.version>4.0.1</curator.version>
|
|
||||||
<spring-boot.version>2.7.18</spring-boot.version>
|
|
||||||
<spring-cloud.version>2021.0.7</spring-cloud.version>
|
|
||||||
<spring-cloud-alibaba.version>2021.0.4.0</spring-cloud-alibaba.version>
|
|
||||||
<logstash-logback-encoder.version>7.2</logstash-logback-encoder.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-dependencies</artifactId>
|
|
||||||
<version>${spring-cloud.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
|
||||||
<version>${spring-cloud-alibaba.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-common-nacos</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-dashboard</artifactId>
|
|
||||||
<version>${sentinel.version}</version>
|
|
||||||
<scope>system</scope>
|
|
||||||
<systemPath>${project.basedir}/src/main/resources/lib/sentinel-dashboard-${sentinel.version}.jar</systemPath>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-web-servlet</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-transport-simple-http</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-parameter-flow-control</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.csp</groupId>
|
|
||||||
<artifactId>sentinel-api-gateway-adapter-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- SpringBoot Web容器 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 覆盖 tomcat version 避免CVE-2024-24549-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tomcat.embed</groupId>
|
|
||||||
<artifactId>tomcat-embed-websocket</artifactId>
|
|
||||||
<version>9.0.105</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tomcat.embed</groupId>
|
|
||||||
<artifactId>tomcat-embed-core</artifactId>
|
|
||||||
<version>9.0.105</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tomcat.embed</groupId>
|
|
||||||
<artifactId>tomcat-embed-el</artifactId>
|
|
||||||
<version>9.0.105</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- starter-actuator -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-lang</groupId>
|
|
||||||
<artifactId>commons-lang</artifactId>
|
|
||||||
<version>2.6</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpclient</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpcore</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpasyncclient</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpcore-nio</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- logback -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- logback appenders -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.logstash.logback</groupId>
|
|
||||||
<artifactId>logstash-logback-encoder</artifactId>
|
|
||||||
<version>${logstash-logback-encoder.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>${project.artifactId}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<!-- 作用:项目打成jar的同时将本地jar包也引入进去 -->
|
|
||||||
<includeSystemScope>true</includeSystemScope>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package com.alibaba.csp.sentinel.dashboard;
|
|
||||||
|
|
||||||
import com.alibaba.csp.sentinel.init.InitExecutor;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sentinel dashboard application.
|
|
||||||
*
|
|
||||||
* @author Carpenter Lee
|
|
||||||
*/
|
|
||||||
@SpringBootApplication
|
|
||||||
public class DashboardApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
triggerSentinelInit();
|
|
||||||
SpringApplication.run(DashboardApplication.class, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void triggerSentinelInit() {
|
|
||||||
new Thread(() -> InitExecutor.doInit()).start();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,63 +0,0 @@
|
|||||||
package com.alibaba.csp.sentinel.dashboard.filter;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.Base64;
|
|
||||||
|
|
||||||
public class ActuatorAuthFilter implements Filter {
|
|
||||||
|
|
||||||
private final String username;
|
|
||||||
private final String password;
|
|
||||||
|
|
||||||
public ActuatorAuthFilter(String username, String password) {
|
|
||||||
this.username = username;
|
|
||||||
this.password = password;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
|
||||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
|
||||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
|
||||||
|
|
||||||
// 获取 Authorization 头
|
|
||||||
String authHeader = request.getHeader("Authorization");
|
|
||||||
|
|
||||||
if (authHeader == null || !authHeader.startsWith("Basic ")) {
|
|
||||||
// 如果没有提供 Authorization 或者格式不对,则返回 401
|
|
||||||
response.setHeader("WWW-Authenticate", "Basic realm=\"realm\"");
|
|
||||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解码 Base64 编码的用户名和密码
|
|
||||||
String base64Credentials = authHeader.substring("Basic ".length());
|
|
||||||
byte[] credDecoded = Base64.getDecoder().decode(base64Credentials);
|
|
||||||
String credentials = new String(credDecoded, StandardCharsets.UTF_8);
|
|
||||||
String[] split = credentials.split(":");
|
|
||||||
if (split.length != 2) {
|
|
||||||
response.setHeader("WWW-Authenticate", "Basic realm=\"realm\"");
|
|
||||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 验证用户名和密码
|
|
||||||
if (!username.equals(split[0]) || !password.equals(split[1])) {
|
|
||||||
response.setHeader("WWW-Authenticate", "Basic realm=\"realm\"");
|
|
||||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 如果认证成功,继续处理请求
|
|
||||||
filterChain.doFilter(request, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(FilterConfig filterConfig) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void destroy() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,29 +0,0 @@
|
|||||||
package com.alibaba.csp.sentinel.dashboard.filter;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权限安全配置
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class SecurityConfig {
|
|
||||||
|
|
||||||
@Value("${spring.cloud.nacos.discovery.metadata.username}")
|
|
||||||
private String username;
|
|
||||||
@Value("${spring.cloud.nacos.discovery.metadata.userpassword}")
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public FilterRegistrationBean<ActuatorAuthFilter> actuatorFilterRegistrationBean() {
|
|
||||||
FilterRegistrationBean<ActuatorAuthFilter> registrationBean = new FilterRegistrationBean<>();
|
|
||||||
registrationBean.setFilter(new ActuatorAuthFilter(username, password));
|
|
||||||
registrationBean.addUrlPatterns("/actuator", "/actuator/*");
|
|
||||||
return registrationBean;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1 +0,0 @@
|
|||||||
# 覆盖sentinel内置配置 不可删除
|
|
@@ -1,37 +0,0 @@
|
|||||||
# Tomcat
|
|
||||||
server:
|
|
||||||
port: 8718
|
|
||||||
|
|
||||||
# Spring
|
|
||||||
spring:
|
|
||||||
application:
|
|
||||||
# 应用名称
|
|
||||||
name: ruoyi-sentinel-dashboard
|
|
||||||
profiles:
|
|
||||||
# 环境配置
|
|
||||||
active: @profiles.active@
|
|
||||||
|
|
||||||
sentinel:
|
|
||||||
dashboard:
|
|
||||||
version: @sentinel.version@
|
|
||||||
|
|
||||||
--- # nacos 配置
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# nacos 服务地址
|
|
||||||
server-addr: @nacos.server@
|
|
||||||
username: @nacos.username@
|
|
||||||
password: @nacos.password@
|
|
||||||
discovery:
|
|
||||||
# 注册组
|
|
||||||
group: @nacos.discovery.group@
|
|
||||||
namespace: ${spring.profiles.active}
|
|
||||||
config:
|
|
||||||
# 配置组
|
|
||||||
group: @nacos.config.group@
|
|
||||||
namespace: ${spring.profiles.active}
|
|
||||||
config:
|
|
||||||
import:
|
|
||||||
- optional:nacos:application-common.yml
|
|
||||||
- optional:nacos:${spring.application.name}.yml
|
|
@@ -1,8 +0,0 @@
|
|||||||
Spring Boot Version: ${spring-boot.version}
|
|
||||||
Spring Application Name: ${spring.application.name}
|
|
||||||
_ _ _ _ _ _ _
|
|
||||||
| | (_) | | | | | | | | | |
|
|
||||||
___ ___ _ __ | |_ _ _ __ ___| |______ __| | __ _ ___| |__ | |__ ___ __ _ _ __ __| |
|
|
||||||
/ __|/ _ \ '_ \| __| | '_ \ / _ \ |______/ _` |/ _` / __| '_ \| '_ \ / _ \ / _` | '__/ _` |
|
|
||||||
\__ \ __/ | | | |_| | | | | __/ | | (_| | (_| \__ \ | | | |_) | (_) | (_| | | | (_| |
|
|
||||||
|___/\___|_| |_|\__|_|_| |_|\___|_| \__,_|\__,_|___/_| |_|_.__/ \___/ \__,_|_| \__,_|
|
|
Binary file not shown.
@@ -1,97 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<included>
|
|
||||||
|
|
||||||
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/console.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/console.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大 1天 -->
|
|
||||||
<maxHistory>1</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
<charset>utf-8</charset>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- info异步输出 -->
|
|
||||||
<appender name="async_info" class="ch.qos.logback.classic.AsyncAppender">
|
|
||||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
|
||||||
<discardingThreshold>0</discardingThreshold>
|
|
||||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
|
||||||
<queueSize>512</queueSize>
|
|
||||||
<!-- 添加附加的appender,最多只能添加一个 -->
|
|
||||||
<appender-ref ref="file_info"/>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- error异步输出 -->
|
|
||||||
<appender name="async_error" class="ch.qos.logback.classic.AsyncAppender">
|
|
||||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
|
||||||
<discardingThreshold>0</discardingThreshold>
|
|
||||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
|
||||||
<queueSize>512</queueSize>
|
|
||||||
<!-- 添加附加的appender,最多只能添加一个 -->
|
|
||||||
<appender-ref ref="file_error"/>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="async_info"/>
|
|
||||||
<appender-ref ref="async_error"/>
|
|
||||||
<appender-ref ref="file_console"/>
|
|
||||||
</root>
|
|
||||||
</included>
|
|
@@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/${project.artifactId}"/>
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="console.log.pattern"
|
|
||||||
value="%cyan(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${console.log.pattern}</pattern>
|
|
||||||
<charset>utf-8</charset>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<include resource="logback-common.xml" />
|
|
||||||
|
|
||||||
<include resource="logback-logstash.xml" />
|
|
||||||
|
|
||||||
<!-- 开启 skywalking 日志收集 -->
|
|
||||||
<include resource="logback-skylog.xml" />
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
@@ -83,19 +83,6 @@ spring:
|
|||||||
# admin 监控账号密码
|
# admin 监控账号密码
|
||||||
username: ruoyi
|
username: ruoyi
|
||||||
userpassword: 123456
|
userpassword: 123456
|
||||||
# sentinel 配置
|
|
||||||
sentinel:
|
|
||||||
# sentinel 开关
|
|
||||||
enabled: false
|
|
||||||
transport:
|
|
||||||
# dashboard控制台服务名 用于服务发现
|
|
||||||
# 如无此配置将默认使用下方 dashboard 配置直接注册
|
|
||||||
server-name: ruoyi-sentinel-dashboard
|
|
||||||
# 客户端指定注册的ip 用于多网卡ip不稳点使用
|
|
||||||
# client-ip:
|
|
||||||
# 控制台地址 从1.3.0开始使用 server-name 注册
|
|
||||||
# dashboard: localhost:8718
|
|
||||||
|
|
||||||
bus:
|
bus:
|
||||||
id: ${spring.application.name}
|
id: ${spring.application.name}
|
||||||
base-packages: org.dromara.**.event
|
base-packages: org.dromara.**.event
|
||||||
@@ -166,7 +153,6 @@ logging:
|
|||||||
org.springframework: warn
|
org.springframework: warn
|
||||||
org.apache.dubbo: warn
|
org.apache.dubbo: warn
|
||||||
com.alibaba.nacos: warn
|
com.alibaba.nacos: warn
|
||||||
com.alibaba.cloud.sentinel: warn
|
|
||||||
org.mybatis.spring.mapper: error
|
org.mybatis.spring.mapper: error
|
||||||
org.apache.dubbo.config: error
|
org.apache.dubbo.config: error
|
||||||
org.apache.fury: warn
|
org.apache.fury: warn
|
||||||
|
@@ -81,20 +81,3 @@ spring:
|
|||||||
- Path=/test-mq/**
|
- Path=/test-mq/**
|
||||||
filters:
|
filters:
|
||||||
- StripPrefix=1
|
- StripPrefix=1
|
||||||
|
|
||||||
# sentinel 配置
|
|
||||||
sentinel:
|
|
||||||
filter:
|
|
||||||
enabled: false
|
|
||||||
# nacos配置持久化
|
|
||||||
datasource:
|
|
||||||
ds1:
|
|
||||||
nacos:
|
|
||||||
server-addr: ${spring.cloud.nacos.server-addr}
|
|
||||||
dataId: sentinel-${spring.application.name}.json
|
|
||||||
groupId: ${spring.cloud.nacos.config.group}
|
|
||||||
username: ${spring.cloud.nacos.username}
|
|
||||||
password: ${spring.cloud.nacos.password}
|
|
||||||
namespace: ${spring.profiles.active}
|
|
||||||
data-type: json
|
|
||||||
rule-type: gw-flow
|
|
||||||
|
@@ -1,27 +0,0 @@
|
|||||||
spring:
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
# 修复 sentinel 控制台未适配 springboot 2.6 新路由方式
|
|
||||||
matching-strategy: ANT_PATH_MATCHER
|
|
||||||
|
|
||||||
server:
|
|
||||||
servlet:
|
|
||||||
encoding:
|
|
||||||
force: true
|
|
||||||
charset: UTF-8
|
|
||||||
enabled: true
|
|
||||||
session:
|
|
||||||
cookie:
|
|
||||||
name: sentinel_dashboard_cookie
|
|
||||||
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
org.springframework.web: INFO
|
|
||||||
|
|
||||||
auth:
|
|
||||||
enabled: true
|
|
||||||
filter:
|
|
||||||
exclude-urls: /,/auth/login,/auth/logout,/registry/machine,/version,/actuator,/actuator/**
|
|
||||||
exclude-url-suffixes: htm,html,js,css,map,ico,ttf,woff,png
|
|
||||||
username: sentinel
|
|
||||||
password: sentinel
|
|
@@ -1,26 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"resource": "ruoyi-auth",
|
|
||||||
"count": 500,
|
|
||||||
"grade": 1,
|
|
||||||
"limitApp": "default",
|
|
||||||
"strategy": 0,
|
|
||||||
"controlBehavior": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resource": "ruoyi-system",
|
|
||||||
"count": 1000,
|
|
||||||
"grade": 1,
|
|
||||||
"limitApp": "default",
|
|
||||||
"strategy": 0,
|
|
||||||
"controlBehavior": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resource": "ruoyi-resource",
|
|
||||||
"count": 500,
|
|
||||||
"grade": 1,
|
|
||||||
"limitApp": "default",
|
|
||||||
"strategy": 0,
|
|
||||||
"controlBehavior": 0
|
|
||||||
}
|
|
||||||
]
|
|
@@ -133,21 +133,6 @@ services:
|
|||||||
privileged: true
|
privileged: true
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
|
|
||||||
sentinel:
|
|
||||||
image: ruoyi/ruoyi-sentinel-dashboard:2.4.1
|
|
||||||
container_name: sentinel
|
|
||||||
environment:
|
|
||||||
TZ: Asia/Shanghai
|
|
||||||
ports:
|
|
||||||
- "8718:8718"
|
|
||||||
volumes:
|
|
||||||
# 配置文件
|
|
||||||
- /docker/ruoyi-sentinel-dashboard/logs/:/ruoyi/sentinel-dashboard/logs
|
|
||||||
# skywalking 探针
|
|
||||||
- /docker/skywalking/agent/:/ruoyi/skywalking/agent
|
|
||||||
restart: always
|
|
||||||
network_mode: "host"
|
|
||||||
|
|
||||||
ruoyi-monitor:
|
ruoyi-monitor:
|
||||||
image: ruoyi/ruoyi-monitor:2.4.1
|
image: ruoyi/ruoyi-monitor:2.4.1
|
||||||
container_name: ruoyi-monitor
|
container_name: ruoyi-monitor
|
||||||
|
@@ -445,7 +445,6 @@ insert into sys_menu values('108', '日志管理', '1', '9', 'log',
|
|||||||
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate, null, null, '在线用户菜单');
|
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate, null, null, '在线用户菜单');
|
||||||
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate, null, null, '缓存监控');
|
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate, null, null, '缓存监控');
|
||||||
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate, null, null, '定时任务菜单');
|
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate, null, null, '定时任务菜单');
|
||||||
insert into sys_menu values('111', 'Sentinel控制台','2', '3', 'http://localhost:8718', '', '', 0, 0, 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 103, 1, sysdate, null, null, '流量控制菜单');
|
|
||||||
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, sysdate, null, null, '服务治理菜单');
|
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, sysdate, null, null, '服务治理菜单');
|
||||||
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, sysdate, null, null, '服务监控菜单');
|
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, sysdate, null, null, '服务监控菜单');
|
||||||
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate, null, null, '代码生成菜单');
|
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate, null, null, '代码生成菜单');
|
||||||
|
@@ -447,7 +447,6 @@ insert into sys_menu values('108', '日志管理', '1', '9', 'log',
|
|||||||
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', '1', '0', 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, now(), null, null, '在线用户菜单');
|
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', '1', '0', 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, now(), null, null, '在线用户菜单');
|
||||||
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, now(), null, null, '缓存监控');
|
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, now(), null, null, '缓存监控');
|
||||||
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', '0', '0', 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, now(), null, null, 'SJ定时任务菜单');
|
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', '0', '0', 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, now(), null, null, 'SJ定时任务菜单');
|
||||||
insert into sys_menu values('111', 'Sentinel控制台','2', '3', 'http://localhost:8718', '', '', '0', '0', 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 103, 1, now(), null, null, '流量控制菜单');
|
|
||||||
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', '0', '0', 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, now(), null, null, '服务治理菜单');
|
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', '0', '0', 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, now(), null, null, '服务治理菜单');
|
||||||
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', '0', '0', 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, now(), null, null, '服务监控菜单');
|
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', '0', '0', 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, now(), null, null, '服务监控菜单');
|
||||||
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', '1', '0', 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, now(), null, null, '代码生成菜单');
|
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', '1', '0', 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, now(), null, null, '代码生成菜单');
|
||||||
|
@@ -281,7 +281,6 @@ insert into sys_menu values('108', '日志管理', '1', '9', 'log',
|
|||||||
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate(), null, null, '在线用户菜单');
|
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate(), null, null, '在线用户菜单');
|
||||||
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate(), null, null, '缓存监控');
|
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate(), null, null, '缓存监控');
|
||||||
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate(), null, null, 'SJ定时任务菜单');
|
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate(), null, null, 'SJ定时任务菜单');
|
||||||
insert into sys_menu values('111', 'Sentinel控制台','2', '3', 'http://localhost:8718', '', '', 0, 0, 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 103, 1, sysdate(), null, null, '流量控制菜单');
|
|
||||||
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, sysdate(), null, null, '服务治理菜单');
|
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, sysdate(), null, null, '服务治理菜单');
|
||||||
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, sysdate(), null, null, '服务监控菜单');
|
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, sysdate(), null, null, '服务监控菜单');
|
||||||
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate(), null, null, '代码生成菜单');
|
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate(), null, null, '代码生成菜单');
|
||||||
|
@@ -35,9 +35,7 @@ insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_mod
|
|||||||
(8, 'ruoyi-job.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:20:18', '2022-01-09 15:21:36', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '定时任务', NULL, NULL, 'yaml', NULL, ''),
|
(8, 'ruoyi-job.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:20:18', '2022-01-09 15:21:36', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '定时任务', NULL, NULL, 'yaml', NULL, ''),
|
||||||
(9, 'ruoyi-resource.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:20:35', '2022-01-09 15:21:21', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '文件服务', NULL, NULL, 'yaml', NULL, ''),
|
(9, 'ruoyi-resource.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:20:35', '2022-01-09 15:21:21', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '文件服务', NULL, NULL, 'yaml', NULL, ''),
|
||||||
(10, 'ruoyi-workflow.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:20:35', '2022-01-09 15:21:21', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '工作流服务', NULL, NULL, 'yaml', NULL, ''),
|
(10, 'ruoyi-workflow.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:20:35', '2022-01-09 15:21:21', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '工作流服务', NULL, NULL, 'yaml', NULL, ''),
|
||||||
(11, 'sentinel-ruoyi-gateway.json', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '限流策略', NULL, NULL, 'json', NULL, ''),
|
|
||||||
(12, 'seata-server.properties', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'seata配置文件', NULL, NULL, 'properties', NULL, ''),
|
(12, 'seata-server.properties', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'seata配置文件', NULL, NULL, 'properties', NULL, ''),
|
||||||
(13, 'ruoyi-sentinel-dashboard.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'sentinel控制台配置文件', NULL, NULL, 'yaml', NULL, ''),
|
|
||||||
(14, 'ruoyi-snailjob-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'SJ定时任务控制台', NULL, NULL, 'yaml', NULL, ''),
|
(14, 'ruoyi-snailjob-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'SJ定时任务控制台', NULL, NULL, 'yaml', NULL, ''),
|
||||||
|
|
||||||
(101, 'application-common.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '通用配置基础配置', NULL, NULL, 'yaml', NULL, ''),
|
(101, 'application-common.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '通用配置基础配置', NULL, NULL, 'yaml', NULL, ''),
|
||||||
@@ -50,9 +48,7 @@ insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_mod
|
|||||||
(108, 'ruoyi-job.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '定时任务', NULL, NULL, 'yaml', NULL, ''),
|
(108, 'ruoyi-job.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '定时任务', NULL, NULL, 'yaml', NULL, ''),
|
||||||
(109, 'ruoyi-resource.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '文件服务', NULL, NULL, 'yaml', NULL, ''),
|
(109, 'ruoyi-resource.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '文件服务', NULL, NULL, 'yaml', NULL, ''),
|
||||||
(110, 'ruoyi-workflow.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '工作流服务', NULL, NULL, 'yaml', NULL, ''),
|
(110, 'ruoyi-workflow.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '工作流服务', NULL, NULL, 'yaml', NULL, ''),
|
||||||
(111, 'sentinel-ruoyi-gateway.json', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '限流策略', NULL, NULL, 'json', NULL, ''),
|
|
||||||
(112, 'seata-server.properties', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'seata配置文件', NULL, NULL, 'properties', NULL, ''),
|
(112, 'seata-server.properties', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'seata配置文件', NULL, NULL, 'properties', NULL, ''),
|
||||||
(113, 'ruoyi-sentinel-dashboard.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'sentinel控制台配置文件', NULL, NULL, 'yaml', NULL, ''),
|
|
||||||
(114, 'ruoyi-snailjob-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'SJ定时任务控制台', NULL, NULL, 'yaml', NULL, '');
|
(114, 'ruoyi-snailjob-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'SJ定时任务控制台', NULL, NULL, 'yaml', NULL, '');
|
||||||
|
|
||||||
/******************************************/
|
/******************************************/
|
||||||
|
Reference in New Issue
Block a user