@@ -0,0 +1,2441 @@
+package com.zsx.core.aspect;%0A%0Aimport org.aspectj.lang.JoinPoint;%0Aimport org.aspectj.lang.ProceedingJoinPoint;%0Aimport org.aspectj.lang.annotation.*;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.stereotype.Component;%0A%0A@Component%0A@Aspect%0Apublic class ExceptionAspect %7B%0A%0A    private final Logger logger = LoggerFactory.getLogger(getClass());%0A%0A    public ExceptionAspect() %7B%0A    %7D%0A%0A    @Pointcut(value = %22execution(* com.weshop..*.*(..))%22)%0A    private void point() %7B%0A    %7D%0A%0A    @Before(%22point()%22)%0A    public void logBefore(JoinPoint joinPoint) %7B%0A        System.out.println(%22%E5%89%8D%E7%BD%AE%E9%80%9A%E7%9F%A5%22);%0A        String className = joinPoint.getTarget().getClass().getName();%0A        String methodName = joinPoint.getSignature().getName();%0A//        logger.debug(className + %22%E7%9A%84%22 + methodName + %22%E6%89%A7%E8%A1%8C%E4%BA%86%22);%0A        System.out.println(className + %22%E7%9A%84%22 + methodName + %22%E6%89%A7%E8%A1%8C%E4%BA%86%22);%0A        Object%5B%5D args = joinPoint.getArgs();%0A        StringBuilder log = new StringBuilder(%22%E5%85%A5%E5%8F%82%E4%B8%BA%22);%0A        for (Object arg : args) %7B%0A            log.append(arg + %22 %22);%0A        %7D%0A//        logger.debug(log.toString());%0A        System.out.println(log.toString());%0A    %7D%0A%0A    /**%0A     *  %E5%A3%B0%E6%98%8E%E5%90%8E%E7%BD%AE%E9%80%9A%E7%9F%A5%0A     * @param result%0A     */%0A    @AfterReturning(pointcut = %22point()%22, returning = %22result%22)%0A    public void doAfterReturning(String result) %7B%0A        System.out.println(%22%E5%90%8E%E7%BD%AE%E9%80%9A%E7%9F%A5%22);%0A    %7D%0A%0A    /**%0A     *  %E5%A3%B0%E6%98%8E%E4%BE%8B%E5%A4%96%E9%80%9A%E7%9F%A5%0A     */%0A    @AfterThrowing(pointcut = %22point()%22, throwing = %22e%22)%0A    public void doAfterThrowing(Exception e) %7B%0A        System.out.println(%22%E4%BE%8B%E5%A4%96%E9%80%9A%E7%9F%A5%22);%0A    %7D%0A%0A    /**%0A     *  %E5%A3%B0%E6%98%8E%E6%9C%80%E7%BB%88%E9%80%9A%E7%9F%A5%0A     */%0A    @After(%22point()%22)%0A    public void doAfter() %7B%0A        System.out.println(%22%E6%9C%80%E7%BB%88%E9%80%9A%E7%9F%A5%22);%0A    %7D%0A%0A    /**%0A     * %E7%8E%AF%E7%BB%95%E9%80%9A%E7%9F%A5%0A     * @param joinPoint%0A     * @return%0A     * @throws Throwable%0A     */%0A    @Around(%22point()%22)%0A    public Object around(ProceedingJoinPoint joinPoint) throws Throwable %7B%0A        Object%5B%5D args = null;%0A        try %7B%0A            args = joinPoint.getArgs();%0A            Object o = joinPoint.proceed();%0A            return o;%0A        %7D catch (Throwable e) %7B%0A            String lineBreak = System.getProperty(%22line.separator%22);%0A            StringBuilder sb2 = new StringBuilder();%0A            StackTraceElement%5B%5D stackTraces = e.getStackTrace();%0A            for (StackTraceElement stack : stackTraces) %7B%0A                sb2.append(stack.toString()).append(lineBreak);%0A            %7D%0A            System.out.println(sb2.toString());%0A            throw e;%0A        %7D%0A    %7D%0A%7D%0A

add code