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

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

Introduction

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

Prototype

public void setProxyTargetClass(boolean proxyTargetClass) 

Source Link

Document

Set whether to proxy the target class directly, instead of just proxying specific interfaces.

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);
    pf.addAdvice(new CrisItemWrapper());
    // ProxyFactory pf = new ProxyFactory(item);
    super.buildDocument(context, (Item) pf.getProxy());
}