Example usage for org.springframework.aop.aspectj.annotation AspectJProxyFactory addAdvice

List of usage examples for org.springframework.aop.aspectj.annotation AspectJProxyFactory addAdvice

Introduction

In this page you can find the example usage for org.springframework.aop.aspectj.annotation AspectJProxyFactory addAdvice.

Prototype

@Override
    public void addAdvice(Advice advice) throws AopConfigException 

Source Link

Usage

From source file:org.dspace.app.cris.discovery.CrisSearchService.java

@Override
protected void buildDocument(Context context, Item item) throws SQLException, IOException {
    AspectJProxyFactory pf = new AspectJProxyFactory(item);
    pf.setProxyTargetClass(true);//w w w. j  a  v a  2 s. c  o  m
    pf.addAdvice(new CrisItemWrapper());
    // ProxyFactory pf = new ProxyFactory(item);
    super.buildDocument(context, (Item) pf.getProxy());
}