为Spring Boot应用程序提取方面的响应主体

问题描述

我想在Spring Boot应用程序中用方面记录响应正文。截至目前,我正在执行以下操作:

let storyboard = UIStoryboard.init(name: "Main",bundle: nil)
let homeVC = storyboard.instantiateInitialViewController()
self.window?.rootViewController = homeVC
self.window?.makeKeyAndVisible()

但是在这里,我对Http状态代码和其他元数据的响应如下:

 @pointcut("within(com.web.rest.*)")
  public void applicationResourcepointcut() {
  }

 
  @AfterReturning(value = ("applicationResourcepointcut()"),returning = "returnValue")
  public void endpointAfterReturning(JoinPoint joinPoint,Object returnValue)  throws Throwable {
    
    try {
      System.out.println("RESPONSE OBJECT = " + mapper.writeValueAsstring(returnValue)); 
    } catch (JsonProcessingException e) {
      System.out.println(e.getMessage());
    }
  }

在这里,我只想捕获响应正文。我不明白如何从响应中提取身体。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)