Annotation (1) 썸네일형 리스트형 [Servlet] annotation, service method 이전 게시글에서 xml 매핑에 대해서 알아봤다. 더 편하고 간단한 annotation 매핑에 대해서 알아보자. public class LifeCycleTestServlet extends HttpServlet { // 메소드 호출 횟수를 카운트하기 위한 용도의 필드 private int initCount = 1; private int serviceCount = 1; private int destroyCount = 1; // 서블릿의 요청이 최초인 경우 한 번 동작하는 메소드 @Override public void init(ServletConfig config) throws ServletException { System.out.println("annotation 매핑 init() 메소드 호출 : " + in.. 이전 1 다음