spring2
bean 경로 error로 설정시 깔끔하게 나옴 ApplicationContext ctx = new GenericXmlApplicationContext("file:\\c:\\upload\\person.xml"); ApplicationContext ctx = new GenericXmlApplicationContext("classpath:stu.xml"); Student s1 = ctx.getBean("xxx", Student.class); System.out.println(s1); Student s2 = (Student)ctx.getBean("xxx"); s2.setAge(20); s2.setName("이순신"); System.out.println(s2.toString()); Student [name=홍길..
2024.02.05