package org.academiadecodigo.bootcamp.helloworldspring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public class App {
    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("context-config.xml");

        HelloWorld hello = context.getBean("hello", HelloWorld.class);

        hello.sayHelloAdelle();
        hello.sayHelloDisturbed();

        HelloWorld world = context.getBean("world", HelloWorld.class);

        world.sayHelloAdelle();
        world.sayHelloDisturbed();
    }
}
