Spring 빈 라이프 사이클
DL
클래스 찾기
생성과 동시에 필요한 데이터 가 있는 경우
스프링에서 생명주기 관련 인터페이스
InitializingBean : 초기화
DisposableBean : 소멸
GenericXmlApplicationContext -> XML 파싱
GenericApplicationContext -> XML 파싱기능이 없다 ( 어노테이션 용도)
AOP
AOP 는 사용자정의가 거의 없다 ,, aop 는 자동 호출
Transaction, 보안
public void allData()
{
try
{
conn.set
Aspect
1. Before
2. After
3.After-Throwing
4.After-Returing
5.Around
------------------ 호출 가능한 위치 // 호출 위치를 잡아주는 친구들( JoinPoint)
적용되는 메소드 설정 -> PointCut
-------------------------------------------------------------------------Advice 공통실행 되는 부분이 Aspect
-> Proxy 패턴 -> 대신호출해준다
class A
{
public void display()
{
System.out.println("display()");
}
}
// 라이브러리로 제작
class Proxy
{
public void display( A a )
{
System.ou.tprinltn("Before");
a.display();
System.out.println("After");
}
}
A a=new A( );
a.display( ); -> X
Proxy p=new Proxy( );
p.display(a); -> O