/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hibernatespringtest;

import java.util.List;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author dhaval
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("/hibernatespringtest/spring.xml");
        EmployeeDao empDao = (EmployeeDao) ctx.getBean("employeeHibernateDao");
        List<EmployeeInfo> employees = empDao.getAll();
        System.out.println(employees.size() + " employees loaded from the database");
    }

}
