hi,
i try to convert spring xml beans to javaConfig, but had encounter an issue. I couldn't find any documentation about MethodInvokingFactoryBean for javaConfig.
my code like this
however, it throw exceptionCode:@Bean public MethodInvokingFactoryBean ehCacheMBeanRegistration() { MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean(); bean.setStaticMethod("net.sf.ehcache.management.ManagementService.registerMBeans"); bean.setArguments(new Object[]{cacheManager(), mbeanServer(), true, true, true, true}); return bean; }
any idea ?Code:org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'ehCacheMBeanRegistration': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:297) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:216) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) .......
kiwi
----
happy hacking !


