public String getPet() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
        Pet pet = (Pet) applicationContext.getBean("cat");
        return pet.getName();
    }
                     
                     Last modification:July 15, 2021
                 
© Allow specification reprint