Spring Framework BeanNameAutoProxyCreator - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework BeanNameAutoProxyCreator class.

This code example shows how to use the following methods:setBeanNames
 
	@Configuration 
	static class APC_Config { 
		@Bean 
		public BeanNameAutoProxyCreator apc() {
			BeanNameAutoProxyCreator apc = new BeanNameAutoProxyCreator();
			apc.setBeanNames(new String[] { "foo", "bar" });
			return apc;
		} 
	} 
 
	private static Object unwrapAopProxyIfNecessary(Object bean) {
		if (AopUtils.isAopProxy(bean)) {
			try { 
				return ((Advised)bean).getTargetSource().getTarget();
			} catch (Exception ex) {
				throw new IllegalStateException("AOP proxy target cannot be resolved", ex);
			} 
		} 
		return bean;
5
CodeRank
See Code Examples for Spring Framework BeanNameAutoProxyCreator Methods: