加上response

This commit is contained in:
xudawei 2024-05-16 11:31:23 +08:00
parent e1723c511b
commit 2e17494bb8
2 changed files with 8 additions and 2 deletions

View File

@ -46,6 +46,11 @@
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.util.StopWatch;
import org.springframework.web.bind.annotation.RestController;
@ -26,9 +27,9 @@ public class RequestLog {
final String checkDeath = "checkDeath";
@Around("@within(restController)||@annotation(restController)")
@Around("@within(restController)||@annotation(restController)||@within(feignClient)")
@SneakyThrows
public Object request(ProceedingJoinPoint joinPoint, RestController restController) {
public Object request(ProceedingJoinPoint joinPoint, RestController restController, FeignClient feignClient) {
HttpServletRequest request = RequestUtil.getRequest();