All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gu.sql2java.excel.aspect.ExccelHelperDefaultAround Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
package gu.sql2java.excel.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import gu.sql2java.excel.aspect.spring.ExcelHelperAround;
/**
 * ExccelHelper 切入点默认实现
 * @author guyadong
 *
 */
@Component
@Aspect
public class ExccelHelperDefaultAround {
	@Autowired
	private ExcelHelperAround excelHelperAop;
	/**
	 * @see ExcelHelperAround#excelAround(ProceedingJoinPoint)
	 */
	@Around("excelSheetAnnotation() && excelRestControllerAspect()")
	public Object excelAroundDefault(ProceedingJoinPoint joinPoint) throws Throwable {
		return excelHelperAop.excelAround(joinPoint);
	}
	/**
	 * 定义切入点为有{@code gu.sql2java.excel.annotations.ExcelSheet}注解的所有函数
	 */
	@Pointcut("@annotation(gu.sql2java.excel.annotations.ExcelSheet)")
	public void excelSheetAnnotation() {
	}
	/**
	 * 定义切入点为有注解{@code org.springframework.web.bind.annotation.RestController}下的所有类
	 */
	@Pointcut("@within(org.springframework.web.bind.annotation.RestController)")
	public void excelRestControllerAspect() {
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy