Example usage for org.springframework.aop.framework.autoproxy BeanNameAutoProxyCreator setBeanNames

List of usage examples for org.springframework.aop.framework.autoproxy BeanNameAutoProxyCreator setBeanNames

Introduction

In this page you can find the example usage for org.springframework.aop.framework.autoproxy BeanNameAutoProxyCreator setBeanNames.

Prototype

public void setBeanNames(String... beanNames) 

Source Link

Document

Set the names of the beans that should automatically get wrapped with proxies.

Usage

From source file:com.apress.prospringintegration.monitoring.MonitoringConfiguration.java

@Bean
public BeanNameAutoProxyCreator autoProxyCreator() {
    BeanNameAutoProxyCreator proxyCreator = new BeanNameAutoProxyCreator();
    proxyCreator.setBeanNames(new String[] { "processMessage" });
    proxyCreator.setInterceptorNames(new String[] { "jamon" });
    return proxyCreator;
}

From source file:se.ivankrizsan.messagecowboy.integrationtest.taskexecutionstatuscleanup.TaskExecutionStatusCleanupTestConfiguration.java

/**
 * Creates a proxy for the task execution status service that logs method invocation on the service.
 *
 * @return Task execution status service proxy creator.
 *//*from  w ww . jav  a 2s. c  om*/
@Bean
public BeanNameAutoProxyCreator taskExecutionStatusServiceProxyCreator() {
    final BeanNameAutoProxyCreator theProxyCreator = new BeanNameAutoProxyCreator();
    final String[] theProxiedBeanNames = new String[1];
    theProxiedBeanNames[0] = "taskExecutionStatusService";
    theProxyCreator.setBeanNames(theProxiedBeanNames);

    final String[] theInterceptorNames = new String[1];
    theInterceptorNames[0] = "invocationLoggerInterceptor";
    theProxyCreator.setInterceptorNames(theInterceptorNames);

    return theProxyCreator;
}