Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GenericBeanDefinition bd = new GenericBeanDefinition();
- bd.setBeanClass(MyClass.class);
- beanFactory.registerSingleton("myBean", bd);
- ConfigurableListableBeanFactory beanFactory = ((ConfigurableApplicationContext) ctx).getBeanFactory();
- beanFactory.createBean(MyClass.class);
Add Comment
Please, Sign In to add comment