mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
优化性能
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -73,6 +73,11 @@
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.projectreactor.netty</groupId>
|
||||
<artifactId>reactor-netty</artifactId>
|
||||
<version>0.8.19.RELEASE</version>
|
||||
</dependency>
|
||||
<!-- 加了这个就不需要加版本号了 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@@ -152,7 +152,7 @@ public class Example1001_BaseController {
|
||||
// 忽略验证
|
||||
@ApiOperation(value = "忽略签名验证", notes = "忽略签名验证")
|
||||
@Open(value = "story.get.ignore", ignoreValidate = true)
|
||||
@PostMapping(value = "/get/ignore/v1")
|
||||
@RequestMapping(value = "/get/ignore/v1")
|
||||
public StoryResult getStory21(@RequestBody StoryParam story) {
|
||||
StoryResult result = new StoryResult();
|
||||
result.setId((long) story.getId());
|
||||
|
@@ -5,6 +5,9 @@ import com.gitee.sop.gatewaycommon.interceptor.RouteInterceptorContext;
|
||||
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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
|
||||
public void preRoute(RouteInterceptorContext context) {
|
||||
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.fetchRequestId(),
|
||||
apiParam.fetchAppKey(),
|
||||
|
@@ -102,7 +102,7 @@ public class AllInOneTest extends TestBase {
|
||||
.version("1.0")
|
||||
.ignoreSign(true)
|
||||
.bizContent(new BizContent().add("id", "222").add("name", "忽略222"))
|
||||
.httpMethod(HttpTool.HTTPMethod.POST);
|
||||
.httpMethod(HttpTool.HTTPMethod.GET);
|
||||
|
||||
client.execute(requestBuilder);
|
||||
}
|
||||
|
Reference in New Issue
Block a user