package com.silentgo.web.controller;

import com.silentgo.core.action.ActionParam;
import com.silentgo.core.aop.AOPPoint;
import com.silentgo.core.aop.annotation.Around;
import com.silentgo.core.aop.annotation.Aspect;
import com.silentgo.core.aop.aspect.support.AspectChain;
import com.silentgo.kit.logger.Logger;
import com.silentgo.kit.logger.LoggerFactory;

/**
 * Project : silentgo
 * com.silentgo.web.controller
 *
 * @author <a href="mailto:teddyzhu15@gmail.com" target="_blank">teddyzhu</a>
 *         <p>
 *         Created by teddyzhu on 16/8/22.
 */
@Aspect
public class Intercept {

    public static final Logger LOGGER = LoggerFactory.getLog(Intercept.class);


    @Around("com.silentgo.web.controller.index.testRegex")
    public void intercept(AspectChain aspectChain) throws Throwable {
        LOGGER.debug("testRegex all start");
        aspectChain.invoke();
        LOGGER.debug("testRegex all end");
    }

    @Around(value = "com.silentgo.web.controller.index.*", regex = true)
    public void intercept2(AspectChain aspectChain) throws Throwable {
        LOGGER.debug("testRegex regex start");
        aspectChain.invoke();
        LOGGER.debug("testRegex regex end");
    }
}

@@ -731,36 +731,38 @@
 ex%22)%0A    public 
-void
+Object
  intercept(Aspec
@@ -844,32 +844,45 @@
 start%22);%0A       
+ Object ret =
  aspectChain.inv
@@ -927,24 +927,44 @@
  all end%22);%0A
+        return ret;%0A
     %7D%0A%0A    @
@@ -1046,12 +1046,14 @@
 lic 
-void
+Object
  int
@@ -1158,16 +1158,29 @@
 %0A       
+ Object ret =
  aspectC
@@ -1235,20 +1235,40 @@
 egex end%22);%0A
+        return ret;%0A
     %7D%0A%7D%0A

add lost return value when aspect intercept