c 네임스페이스

    스프링 XML 정리 - 네임스페이스(c, p), 의존성 주입

    - 실제 인스턴스가 아닌 proxy 객체 주입 - 해당 클래스의 메서드를 호출할 때마다 객체 생성 - 매개변수가 있는 생성자를 호출하여 초기화 constructor-arg 태그를 이용한 필드 초기화 public class UserServiceImpl2 implements UserService { private String name; private String tel; private int age; public UserServiceImpl2(String name, String tel, int age) { this.name = name; this.tel = tel; this.age = age; } } constructor-arg 태그를 이용한 의존성 주입 ​ public class User { private..