주석 구성과 어셈블리 스캔 간의 차이점
주석 구성과 어셈블리 스캔 간의 차이점
주석 구성과 어셈블리 스캔은 Spring Core의 중요한 기본 개념입니다.
이 강좌는 그것들과 그것들 사이의 차이를 어떻게 사용하는지 이해하는 데 도움을 줍니다.
개술
둘사용법
이제 애플리케이션에서 만들고자 하는 계층 구조에서 시작합니다.
-|콩 이름
-|Bean 주소
-|두객
콩 이름 주입
------|Bean 주소 주입
1. XML의 전체 bean
Bean의 자바 클래스는 다음과 같습니다.
public class Name{ //... }
public class Address{ //... }
public class Customer {
private Name name;
private Address address;
public Customer() //...
public void setName(Name name) //setter injection...
public void setAddress(Address address) //setter injection...
}
자세한 내용은 다음을 참조하십시오.https://grokonez.com/spring-framework/difference-between-annotation-config-and-component-scan
주석 구성과 어셈블리 스캔 간의 차이점
Reference
이 문제에 관하여(주석 구성과 어셈블리 스캔 간의 차이점), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/loizenai/difference-between-annotation-config-and-component-scan-39j8텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)