애너테이션 방식
public class NetworkClient {
private String url;
public NetworkClient() {
System.out.println("생성자 호출, url = " + url);
}
...
@PostConstruct
public void init() throws Exception {
connect();
call("초기화 연결 메시지");
}
@PreDestroy
public void close() throws Exception {
disconnect();
}
}특징
단점
Last updated