mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
调整启动的扫描路径,去除重复注册。
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
需要执行`sop-upgrade-4.1.0.sql`
|
需要执行`sop-upgrade-4.1.0.sql`
|
||||||
|
|
||||||
- 重构路由监控功能
|
- 重构路由监控功能
|
||||||
|
- 升级SpringBoot,SpringCloud,SpringCloudAlibaba版本
|
||||||
|
|
||||||
## 4.0.3
|
## 4.0.3
|
||||||
|
|
||||||
|
5
pom.xml
5
pom.xml
@@ -46,7 +46,6 @@
|
|||||||
|
|
||||||
<!-- Logging -->
|
<!-- Logging -->
|
||||||
<logback.version>1.2.3</logback.version>
|
<logback.version>1.2.3</logback.version>
|
||||||
<!-- <slf4j.version>1.7.5</slf4j.version>-->
|
|
||||||
|
|
||||||
<!-- Test -->
|
<!-- Test -->
|
||||||
<junit.version>4.11</junit.version>
|
<junit.version>4.11</junit.version>
|
||||||
@@ -58,8 +57,8 @@
|
|||||||
<commons-lang3.version>3.8.1</commons-lang3.version>
|
<commons-lang3.version>3.8.1</commons-lang3.version>
|
||||||
<commons-codec.version>1.11</commons-codec.version>
|
<commons-codec.version>1.11</commons-codec.version>
|
||||||
<commons-logging.version>1.2</commons-logging.version>
|
<commons-logging.version>1.2</commons-logging.version>
|
||||||
<!-- <validation-api.version>2.0.1.Final</validation-api.version>-->
|
<validation-api.version>2.0.1.Final</validation-api.version>
|
||||||
<!-- <hibernate-validator.version>6.0.13.Final</hibernate-validator.version>-->
|
<hibernate-validator.version>6.0.13.Final</hibernate-validator.version>
|
||||||
<fastmybatis.version>1.9.1</fastmybatis.version>
|
<fastmybatis.version>1.9.1</fastmybatis.version>
|
||||||
<spring-data-redis.version>2.3.0.RELEASE</spring-data-redis.version>
|
<spring-data-redis.version>2.3.0.RELEASE</spring-data-redis.version>
|
||||||
<guava.version>29.0-jre</guava.version>
|
<guava.version>29.0-jre</guava.version>
|
||||||
|
@@ -29,8 +29,11 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author tanghc
|
* @author tanghc
|
||||||
|
* @deprecated use com.gitee.sop.adminserver.api.service.MonitorNewApi
|
||||||
|
* @see MonitorNewApi
|
||||||
*/
|
*/
|
||||||
@ApiService
|
@Deprecated
|
||||||
|
//@ApiService
|
||||||
@ApiDoc("服务管理-监控")
|
@ApiDoc("服务管理-监控")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class MonitorApi {
|
public class MonitorApi {
|
||||||
|
@@ -25,6 +25,7 @@ import java.util.Map;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 路由监控
|
||||||
* @author tanghc
|
* @author tanghc
|
||||||
*/
|
*/
|
||||||
@ApiService
|
@ApiService
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
package com.gitee.sop.gatewaycommon.gateway.configuration;
|
package com.gitee.sop.gatewaycommon.gateway.configuration;
|
||||||
|
|
||||||
import com.gitee.sop.gatewaycommon.bean.ApiConfig;
|
import com.gitee.sop.gatewaycommon.bean.ApiConfig;
|
||||||
import com.gitee.sop.gatewaycommon.gateway.controller.ConfigChannelController;
|
|
||||||
import com.gitee.sop.gatewaycommon.gateway.controller.ErrorLogController;
|
|
||||||
import com.gitee.sop.gatewaycommon.gateway.controller.GatewayController;
|
|
||||||
import com.gitee.sop.gatewaycommon.gateway.controller.GatewayMonitorController;
|
|
||||||
import com.gitee.sop.gatewaycommon.gateway.filter.GatewayModifyResponseGatewayFilter;
|
import com.gitee.sop.gatewaycommon.gateway.filter.GatewayModifyResponseGatewayFilter;
|
||||||
import com.gitee.sop.gatewaycommon.gateway.filter.IndexFilter;
|
import com.gitee.sop.gatewaycommon.gateway.filter.IndexFilter;
|
||||||
import com.gitee.sop.gatewaycommon.gateway.filter.LimitFilter;
|
import com.gitee.sop.gatewaycommon.gateway.filter.LimitFilter;
|
||||||
@@ -50,26 +46,6 @@ public class BaseGatewayConfiguration extends AbstractConfiguration {
|
|||||||
return new IndexFilter();
|
return new IndexFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GatewayController gatewayErrorController() {
|
|
||||||
return new GatewayController();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public ConfigChannelController configChannelController() {
|
|
||||||
return new ConfigChannelController();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public ErrorLogController errorLogController() {
|
|
||||||
return new ErrorLogController();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GatewayMonitorController gatewayMonitorController() {
|
|
||||||
return new GatewayMonitorController();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义异常处理[@@]注册Bean时依赖的Bean,会从容器中直接获取,所以直接注入即可
|
* 自定义异常处理[@@]注册Bean时依赖的Bean,会从容器中直接获取,所以直接注入即可
|
||||||
*
|
*
|
||||||
|
@@ -1,21 +0,0 @@
|
|||||||
package com.gitee.sop.gatewaycommon.gateway.controller;
|
|
||||||
|
|
||||||
import com.gitee.sop.gatewaycommon.bean.BaseErrorLogController;
|
|
||||||
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.server.ServerWebExchange;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author tanghc
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class ErrorLogController extends BaseErrorLogController<ServerWebExchange> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ApiParam getApiParam(ServerWebExchange request) {
|
|
||||||
Map<String, String> params = request.getRequest().getQueryParams().toSingleValueMap();
|
|
||||||
return ApiParam.build(params);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
package com.gitee.sop.gatewaycommon.gateway.controller;
|
|
||||||
|
|
||||||
import com.gitee.sop.gatewaycommon.support.BaseMonitorController;
|
|
||||||
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.server.ServerWebExchange;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author tanghc
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class GatewayMonitorController extends BaseMonitorController<ServerWebExchange> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ApiParam getApiParam(ServerWebExchange request) {
|
|
||||||
Map<String, String> params = request.getRequest().getQueryParams().toSingleValueMap();
|
|
||||||
return ApiParam.build(params);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,8 +0,0 @@
|
|||||||
package com.gitee.sop.gatewaycommon.loadbalancer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author tanghc
|
|
||||||
*/
|
|
||||||
public class LoadBalanceConfig {
|
|
||||||
|
|
||||||
}
|
|
@@ -8,8 +8,6 @@ import com.gitee.sop.gatewaycommon.loadbalancer.ServiceGrayConfig;
|
|||||||
*/
|
*/
|
||||||
public interface EnvGrayManager extends BeanInitializer {
|
public interface EnvGrayManager extends BeanInitializer {
|
||||||
|
|
||||||
String ENV_GRAY = "sop.env-gray";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存灰度配置
|
* 保存灰度配置
|
||||||
* @param serviceGrayConfig 灰度配置
|
* @param serviceGrayConfig 灰度配置
|
||||||
|
@@ -65,7 +65,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-webmvc</artifactId>
|
<artifactId>spring-webmvc</artifactId>
|
||||||
<version>5.1.4.RELEASE</version>
|
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@@ -40,16 +40,6 @@
|
|||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--
|
|
||||||
修复:Spring Cloud Hoxton.SR1 gateway 与reactor-netty 0.9.3.RELEASE不兼容问题
|
|
||||||
https://blog.csdn.net/sun800711/article/details/104061049
|
|
||||||
-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.projectreactor.netty</groupId>
|
|
||||||
<artifactId>reactor-netty</artifactId>
|
|
||||||
<version>0.9.4.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.oschina.durcframework</groupId>
|
<groupId>net.oschina.durcframework</groupId>
|
||||||
<artifactId>fastmybatis-spring-boot-starter</artifactId>
|
<artifactId>fastmybatis-spring-boot-starter</artifactId>
|
||||||
|
@@ -3,7 +3,7 @@ package com.gitee.sop.gateway;
|
|||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication(scanBasePackages = "com.gitee.sop")
|
||||||
public class SopGatewayApplication {
|
public class SopGatewayApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
Reference in New Issue
Block a user