Spring IoC tutorial – part 2 – 2

[....]
public static void main(String[] args) throws Exception {
    
    //when configuration file is In root directory where the class creating the context is executed
    ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext("application-context-ioc-constructor.xml"); 
    Reservation myReservation=ctx.getBean("reservation", Reservation.class);
[....]