Java tutorial
package Spring; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author stdeceiver */ public class Principal { public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); Horario horario = (Horario) context.getBean("figura1"); System.out.println("Hora de inicio " + horario.getInicio()); System.out.println("Hora de fin " + horario.getFin()); } }