下面列出了org.aspectj.lang.annotation.AfterReturning#org.aspectj.lang.annotation.Pointcut 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Pointcut that matches all Spring beans in the application's main packages.
*/
@Pointcut("within(com.okta.developer.blog.repository..*)"+
" || within(com.okta.developer.blog.service..*)"+
" || within(com.okta.developer.blog.web.rest..*)")
public void applicationPackagePointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
private List<Method> getAdvisorMethods(Class<?> aspectClass) {
final List<Method> methods = new ArrayList<>();
ReflectionUtils.doWithMethods(aspectClass, method -> {
// Exclude pointcuts
if (AnnotationUtils.getAnnotation(method, Pointcut.class) == null) {
methods.add(method);
}
}, ReflectionUtils.USER_DECLARED_METHODS);
methods.sort(METHOD_COMPARATOR);
return methods;
}
/**
* Pointcut that matches all Spring beans in the application's main packages.
*/
@Pointcut("within(com.wyy.repository..*)"+
" || within(com.wyy.service..*)"+
" || within(com.wyy.web.rest..*)")
public void applicationPackagePointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Pointcut that matches all Spring beans in the application's main packages.
*/
@Pointcut("within(com.okta.developer.store.repository..*)"+
" || within(com.okta.developer.store.service..*)"+
" || within(com.okta.developer.store.web.rest..*)")
public void applicationPackagePointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
private List<Method> getAdvisorMethods(Class<?> aspectClass) {
final List<Method> methods = new ArrayList<>();
ReflectionUtils.doWithMethods(aspectClass, method -> {
// Exclude pointcuts
if (AnnotationUtils.getAnnotation(method, Pointcut.class) == null) {
methods.add(method);
}
});
methods.sort(METHOD_COMPARATOR);
return methods;
}
/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut("within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController *)")
public void springBeanPointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
@Pointcut("@annotation(com.easy.mybatis.multidatasource.annotation.Master) " +
"|| execution(* com.easy.mybatis.multidatasource.service..*.insert*(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service..*.add*(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service..*.update*(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service..*.edit*(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service..*.delete*(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service..*.remove*(..))")
public void writePointcut() {
}
/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut("within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController *)")
public void springBeanPointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut("within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController *)")
public void springBeanPointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
@Pointcut(value="args(a)", argNames="a")
public void setAge(int a) {}
@Pointcut("execution(* com.louis.kitty.*.dao.*.update*(..))")
public void daoUpdate() {
}
@Pointcut("@annotation(com.ruoyi.common.annotation.DataScope)")
public void dataScopePointCut()
{
}
@Pointcut("@annotation(IsTryAgain)")
public void retryOnOptFailure() {
// pointcut mark
}
@Pointcut("execution(public * org.jeecg.modules..*.*Controller.*(..))")
public void excudeService() {
}
/**
* 切入点
* 排除login方法
*/
//@Pointcut("execution (* com.codeway.*.controller..*.*(..)) && !execution(* com.codeway.*.controller.UserController.login(..)) && !execution(* com.codeway.*.controller.UserController.logout(..))")
@Pointcut(value="@annotation(com.codeway.annotation.OptLog)")
public void controllerAspect() {
}
@Pointcut("@annotation(com.webank.cmdb.config.log.OperationLogPointcut)")
public void operationLogPointcut() {
}
@Pointcut("execution(public * com.webank.wedatasphere.qualitis.project.dao.ProjectDao.*(..))")
public void projectAspect(){
}
@Pointcut("execution(public * com.macro.mall.controller.*.*(..))")
public void BindingResult() {
}
@Pointcut("execution(public * com.webank.wedatasphere.qualitis.rule.dao.repository.TemplateStatisticsInputMetaRepository.findById(..))")
public void templateStatisticsInputMetaAspect(){
}
@Pointcut("@annotation(com.pepper.metrics.integration.custom.Profile)")
public void pointcut(){}
@Pointcut("execution(public * com.webank.wedatasphere.qualitis.rule.dao.impl.RuleDaoImpl.*(..))")
public void ruleAspect(){
}
@Pointcut("execution(String cn.lastwhisper..*.*(..)) && within(cn.lastwhisper..*)")
public void matchReturn() {
}
@Pointcut("execution(public * org.jeecg.modules.*.*.*Controller.*(..))")
public void excudeService() {
}
/**
* 配置切入点
*/
@Pointcut("@annotation(co.yixiang.logging.aop.log.Log)")
public void logPointcut() {
// 该方法无方法体,主要为了让同类中其他方法使用此切入点
}
@Pointcut(ServletUtils.POINTCUT)
public void pointcut() {}
@Pointcut("execution(** com.lzc.aop.Performance.perform(..))")
public void watch() {}
@Pointcut("execution(public * com.neu.his.api.controller.*.*(..))")
public void BindingResult() {
}
/**
* Controller层切点,注解方式
*/
//@Pointcut("execution(* *..controller..*Controller*.*(..))")
@Pointcut("@annotation(com.liuyanzhao.sens.config.annotation.SystemLog)")
public void controllerAspect() {
}
@Pointcut("@annotation(happy.validation.Validation)")
public void validation() {
}
@Pointcut("execution(public * com.platform.controller.*.*(..))")
public void BindingResult() {
}