Java Code Examples for

Following code examples demonstrate how to use spring-framework. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use various code implementation of this class.

    public static void main(String[] args) {
        DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();

        BeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
        MessageRenderer renderer = (MessageRenderer) beanFactory.getBean("renderer");

    public static void main(String[] args) {
        ClassPathXmlApplicationContext c;
        BeanDefinition b;
        ApplicationContext ac;
        BeanDefinitionReader a;
        ThreadPoolExecutor tpe;

    protected BeanDefinitionReader createBeanDefinitionReader(
            GenericApplicationContext context) {
        return new GroovyBeanDefinitionReader(context);

Simple interface for bean definition readers. Specifies load methods with Resource and String locati

on parameters.

Concrete bean definition readers can of course add additional load and register methods for bean definitions, specific to their bean definition format.

Note that a bean definition reader does not have to implement this interface. It only serves as suggestion for bean definition readers that want to follow standard naming conventions. @author Juergen Hoeller @since 1.1 @see

Read More