mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
优化性能
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -73,6 +73,11 @@
|
|||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.projectreactor.netty</groupId>
|
||||||
|
<artifactId>reactor-netty</artifactId>
|
||||||
|
<version>0.8.19.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
<!-- 加了这个就不需要加版本号了 -->
|
<!-- 加了这个就不需要加版本号了 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
@@ -152,7 +152,7 @@ public class Example1001_BaseController {
|
|||||||
// 忽略验证
|
// 忽略验证
|
||||||
@ApiOperation(value = "忽略签名验证", notes = "忽略签名验证")
|
@ApiOperation(value = "忽略签名验证", notes = "忽略签名验证")
|
||||||
@Open(value = "story.get.ignore", ignoreValidate = true)
|
@Open(value = "story.get.ignore", ignoreValidate = true)
|
||||||
@PostMapping(value = "/get/ignore/v1")
|
@RequestMapping(value = "/get/ignore/v1")
|
||||||
public StoryResult getStory21(@RequestBody StoryParam story) {
|
public StoryResult getStory21(@RequestBody StoryParam story) {
|
||||||
StoryResult result = new StoryResult();
|
StoryResult result = new StoryResult();
|
||||||
result.setId((long) story.getId());
|
result.setId((long) story.getId());
|
||||||
|
@@ -5,6 +5,9 @@ import com.gitee.sop.gatewaycommon.interceptor.RouteInterceptorContext;
|
|||||||
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.server.ServerWebExchange;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 演示拦截器
|
* 演示拦截器
|
||||||
@@ -18,7 +21,10 @@ public class MyRouteInterceptor implements RouteInterceptor {
|
|||||||
@Override
|
@Override
|
||||||
public void preRoute(RouteInterceptorContext context) {
|
public void preRoute(RouteInterceptorContext context) {
|
||||||
ApiParam apiParam = context.getApiParam();
|
ApiParam apiParam = context.getApiParam();
|
||||||
log.info("请求接口:{}, request_id:{}, app_id:{}, ip:{}",
|
ServerWebExchange exchange = (ServerWebExchange) context.getRequestContext();
|
||||||
|
URI uri = exchange.getRequest().getURI();
|
||||||
|
log.info("请求URL:{}, 请求接口:{}, request_id:{}, app_id:{}, ip:{}",
|
||||||
|
uri,
|
||||||
apiParam.fetchNameVersion(),
|
apiParam.fetchNameVersion(),
|
||||||
apiParam.fetchRequestId(),
|
apiParam.fetchRequestId(),
|
||||||
apiParam.fetchAppKey(),
|
apiParam.fetchAppKey(),
|
||||||
|
@@ -102,7 +102,7 @@ public class AllInOneTest extends TestBase {
|
|||||||
.version("1.0")
|
.version("1.0")
|
||||||
.ignoreSign(true)
|
.ignoreSign(true)
|
||||||
.bizContent(new BizContent().add("id", "222").add("name", "忽略222"))
|
.bizContent(new BizContent().add("id", "222").add("name", "忽略222"))
|
||||||
.httpMethod(HttpTool.HTTPMethod.POST);
|
.httpMethod(HttpTool.HTTPMethod.GET);
|
||||||
|
|
||||||
client.execute(requestBuilder);
|
client.execute(requestBuilder);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user