You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/08/20 13:46:39 UTC

[GitHub] [skywalking] whfjam commented on issue #5359: when i use @Aspect Annotation in a spring cloud app it has some infos

whfjam commented on issue #5359:
URL: https://github.com/apache/skywalking/issues/5359#issuecomment-677674238


   > 
   > 
   > Are you using agent to instrument that class and method as well? Please provide the full error stack.
   
   yes i did, it seemed like just an info log not an error
   i had a controller like below
   ---------------------------------
   @Controller
   public class TestController {
   
   
       @RequestMapping(path = "v2/test2/{fileId}",method = RequestMethod.GET)
       public String getMsg(@PathVariable String fileId){
           new RuntimeException().printStackTrace();
           return "1TT-"+fileId;
       }
   }
   --------------------------------
   then i had a aop like below
   --------------------------------
   @Aspect
   @Component
   public class ParamValiAspect {
   
       @Pointcut("execution (* com.timevale.skwka.service.*.*(..))")
       public void doAspect() {
   
       }
   
       @Around("doAspect()")
       public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
           Object[] args = joinPoint.getArgs();
           for(Object arg: args){
               if(arg == null) {
                   continue;
               }
              System.out.println("arg:"+arg);
           }
   
           return joinPoint.proceed();
       }
   }
   --------------------------------------
   
   in the startup logs i found this :
   
   INFO  org.springframework.aop.framework.CglibAopProxy - Unable to proxy method [final java.lang.String com.timevale.skwka.service.TestController.getMsg$original$btT8GaHU$accessor$vhlk7XnS(java.lang.String)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
   
   
   if without skywalkingagent it would not happen


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org