📖 Learning By Doing🌿 브랜치: main-0.7.0HandlerInterceptor, preHandle(), postHandle(), afterCompletion(), @Component📁 프로젝트 구조project-root/
│
├── 📁 src/
│ └── 📁 main/
│ ├── 📁 java/
│ │ └── 📁 com/ibks/project/
│ │ ├── 📁 cmmn/ ← 공통 모듈
│ │ │ └── 📁 ctl/
│ │ │ ├── ☕ MarkdownCtl.java
│ │ │ ├── ☕ IndexCtl.java
│ │ │ └── ☕ RestCtl.java
│ │ │
│ │ ├── 📁 framework/ ← Spring 프레임워크 설정
│ │ │ ├── ☕ WebAppInitializer.java ← ⭐ Spring 시작점, web.xml 대체 (DispatcherServlet 등록)
│ │ │ ├── ☕ ServletConfig.java ← ⭐ Servlet 설정 관련 클래스 로더
│ │ │ ├── ☕ RootConfig.java ← ⭐ Dao, Aop 등 설정 관련 클래스 로더
│ │ │ ├── 📁 config/
│ │ │ │ ├── ☕ ConfigFilter.java ← Spring Filter 설정
│ │ │ │ ├── ☕ ConfigInterceptor.java 🆕 ← Spring Interceptor 설정
│ │ │ │ ├── ☕ ConfigMessage.java ← 사용자 메시지 관리
│ │ │ │ ├── ☕ ConfigMvc.java ← MVC 설정 (ViewResolver, @EnableWebMvc 등)
│ │ │ │ ├── ☕ ConfigMysqlDatabase.java ← Database 커넥션 및 세션 관리
│ │ │ │ └── ☕ ConfigMysqlTransaction.java ← Database 트랜잭션 관리
│ │ │ ├── 📁 exception/
│ │ │ │ ├── ☕ GlobalExceptionHandler.java
│ │ │ │ └── ☕ RestExceptionHandler.java
│ │ │ ├── 📁 filter/
│ │ │ │ ├── ☕ AuthFilter.java
│ │ │ │ ├── ☕ CorsFilter.java
│ │ │ │ ├── ☕ RequestFilter.java
│ │ │ │ ├── ☕ SanitizationFilter.java
│ │ │ │ └── ☕ XssHeaderFilter.java
│ │ │ └── 📁 interceptor/
│ │ │ └── ☕ LoggingInterceptor.java 🆕
│ │ │
│ │ ├── 📁 main/ ← Main 페이지 모듈
│ │ │ ├── 📁 ctl/
│ │ │ │ ├── ☕ Main0010Ctl.java
│ │ │ │ ├── ☕ Main0020Ctl.java
│ │ │ │ ├── ☕ Main0030Ctl.java
│ │ │ │ ├── ☕ Main0040Ctl.java
│ │ │ │ ├── ☕ Main0050Ctl.java
│ │ │ │ ├── ☕ Main0060Ctl.java
│ │ │ │ └── ☕ Main0070Ctl.java
│ │ │ ├── 📁 dao/
│ │ │ │ └── ☕ Main0030Dao.java
│ │ │ └── 📁 svc/
│ │ │ ├── 📁 impl/
│ │ │ │ └── ☕ Main0030Impl.java
│ │ │ └── ☕ Main0030Svc.java
│ │ │
│ │ └── 📁 rest/ ← REST API 모듈
│ │ ├── 📁 ctl/
│ │ │ └── ☕ Rest0010Ctl.java
│ │ ├── 📁 dao/
│ │ │ └── ☕ Rest0010Dao.java
│ │ └── 📁 svc/
│ │ ├── 📁 impl/
│ │ │ └── ☕ Rest0010Impl.java
│ │ └── ☕ Rest0010Svc.java
│ │
│ ├── 📁 resources/ ← 설정파일 및 리소스
│ │ ├── 📁 mapper/ ← Mybatis XML 매퍼
│ │ │ ├── 📁 main/
│ │ │ │ └── 🗺️ Main0030Sql.xml
│ │ │ └── 📁 rest/
│ │ │ └── 🗺️ Rest0010Sql.xml
│ │ │
│ │ ├── 📁 markdown/ ← 마크다운 문서
│ │ │ ├── 📝 main-0.1.0.md
│ │ │ ├── 📝 main-0.2.0.md
│ │ │ ├── 📝 main-0.3.0.md
│ │ │ ├── 📝 main-0.4.0.md
│ │ │ ├── 📝 main-0.5.0.md
│ │ │ ├── 📝 main-0.6.0.md
│ │ │ └── 📝 main-0.7.0.md
│ │ │
│ │ ├── 📁 message/ ← 다국어 메시지
│ │ │ ├── 📜 messages_fr.properties
│ │ │ └── 📜 messages_ko.properties
│ │ │
│ │ ├── 📁 properties/ ← 설정 파일
│ │ │ └── 📜 application.properties
│ │ │
│ │ └── 📜 log4j2.xml ← 로깅 설정
│ │
│ └── 📁 webapp/ ← 웹 리소스
│ ├── 📁 static/
│ │ ├── 📁 img/
│ │ │ └── 🖼️ wave.png
│ │ └── 🖼️ favicon.ico
│ ├── 📁 WEB-INF/
│ │ ├── 📁 jsp/
│ │ │ ├── 📁 docs/
│ │ │ │ └── 🌐 markdown.jsp
│ │ │ ├── 📁 error/
│ │ │ │ ├── 🌐 400.jsp
│ │ │ │ ├── 🌐 403.jsp
│ │ │ │ ├── 🌐 404.jsp
│ │ │ │ └── 🌐 500.jsp
│ │ │ ├── 📁 main/
│ │ │ │ ├── 🌐 main0010.jsp
│ │ │ │ ├── 🌐 main0020.jsp
│ │ │ │ ├── 🌐 main0030.jsp
│ │ │ │ ├── 🌐 main0040.jsp
│ │ │ │ ├── 🌐 main0050.jsp
│ │ │ │ ├── 🌐 main0060.jsp
│ │ │ │ └── 🌐 main0070.jsp
│ │ │ └── 🌐 index.jsp
│ │ │
│ │ ├── 📁 classes/ ← 컴파일된 클래스
│ │ │ │ ├── 📁 framework/
│ │ │ │ │ ├── 📁 config/
│ │ │ │ │ │ ├── ⚙️ ConfigFilter.class
│ │ │ │ │ │ ├── ⚙️ ConfigInterceptor.class
│ │ │ │ │ │ ├── ⚙️ ConfigMessage.class
│ │ │ │ │ │ ├── ⚙️ ConfigMvc.class
│ │ │ │ │ │ ├── ⚙️ ConfigMysqlDatabase.class
│ │ │ │ │ │ └── ⚙️ ConfigMysqlTransaction.class
│ │ │ │ │ ├── 📁 exception/
│ │ │ │ │ │ ├── ⚙️ GlobalExceptionHandler.class
│ │ │ │ │ │ └── ⚙️ RestExceptionHandler.class
│ │ │ │ │ ├── 📁 filter/
│ │ │ │ │ │ ├── ⚙️ AuthFilter.class
│ │ │ │ │ │ ├── ⚙️ CorsFilter.class
│ │ │ │ │ │ ├── ⚙️ RequestFilter.class
│ │ │ │ │ │ ├── ⚙️ SanitizationFilter$1.class
│ │ │ │ │ │ ├── ⚙️ SanitizationFilter.class
│ │ │ │ │ │ └── ⚙️ XssHeaderFilter.class
│ │ │ │ │ ├── 📁 interceptor/
│ │ │ │ │ │ └── ⚙️ LoggingInterceptor.class
│ │ │ │ │ ├── ⚙️ RootConfig.class
│ │ │ │ │ ├── ⚙️ ServletConfig.class
│ │ │ │ │ └── ⚙️ WebAppInitializer.class
│ │ │ │ ├── 📁 cmmn/
│ │ │ │ │ └── 📁 ctl/
│ │ │ │ │ ├── ⚙️ IndexCtl.class
│ │ │ │ │ ├── ⚙️ MarkdownCtl.class
│ │ │ │ │ └── ⚙️ RestCtl.class
│ │ │ │ ├── 📁 main/
│ │ │ │ │ ├── 📁 ctl/
│ │ │ │ │ │ ├── ⚙️ Main0010Ctl.class
│ │ │ │ │ │ ├── ⚙️ Main0020Ctl.class
│ │ │ │ │ │ ├── ⚙️ Main0030Ctl.class
│ │ │ │ │ │ ├── ⚙️ Main0040Ctl.class
│ │ │ │ │ │ ├── ⚙️ Main0050Ctl.class
│ │ │ │ │ │ ├── ⚙️ Main0060Ctl.class
│ │ │ │ │ │ └── ⚙️ Main0070Ctl.class
│ │ │ │ │ ├── 📁 dao/
│ │ │ │ │ │ ├── ⚙️ Main0030Dao.class
│ │ │ │ │ └── 📁 svc/
│ │ │ │ │ ├── 📁 impl/
│ │ │ │ │ │ └── ⚙️ Main0030Impl.class
│ │ │ │ │ └── ⚙️ Main0030Svc.class
│ │ │ │ └── 📁 rest/
│ │ │ │ ├── 📁 ctl/
│ │ │ │ │ └── ⚙️ Rest0010Ctl.class
│ │ │ │ ├── 📁 dao/
│ │ │ │ │ ├── ⚙️ Rest0010Dao.class
│ │ │ │ └── 📁 svc/
│ │ │ │ ├── 📁 impl/
│ │ │ │ │ └── ⚙️ Rest0010Impl.class
│ │ │ │ └── ⚙️ Rest0010Svc.class
│ │ │ ├── 📁 mapper/
│ │ │ │ ├── 📁 main/
│ │ │ │ │ └── 🗺️ Main0030Sql.xml
│ │ │ │ └── 📁 rest/
│ │ │ │ └── 🗺️ Rest0010Sql.xml
│ │ │ ├── 📁 markdown/
│ │ │ │ ├── 📝 main-0.1.0.md
│ │ │ │ ├── 📝 main-0.2.0.md
│ │ │ │ ├── 📝 main-0.3.0.md
│ │ │ │ ├── 📝 main-0.4.0.md
│ │ │ │ ├── 📝 main-0.5.0.md
│ │ │ │ ├── 📝 main-0.6.0.md
│ │ │ │ └── 📝 main-0.7.0.md
│ │ │ ├── 📁 message/
│ │ │ │ ├── 📜 messages_fr.properties
│ │ │ │ └── 📜 messages_ko.properties
│ │ │ ├── 📁 properties/
│ │ │ │ └── 📜 application.properties
│ │ │ └── 📜 log4j2.xml
│ │ │
│ │ └── 📁 lib/ ← 라이브러리 JAR 파일
│ │ ├── 📦 aspectjweaver-1.9.22.jar
│ │ ├── 📦 commonmark-0.21.0.jar
│ │ ├── 📦 commonmark-ext-gfm-strikethrough-0.21.0.jar
│ │ ├── 📦 commonmark-ext-gfm-tables-0.21.0.jar
│ │ ├── 📦 commons-dbcp2-2.9.0.jar
│ │ ├── 📦 commons-logging-1.2.jar
│ │ ├── 📦 commons-pool2-2.10.0.jar
│ │ ├── 📦 jackson-annotations-2.15.2.jar
│ │ ├── 📦 jackson-core-2.15.2.jar
│ │ ├── 📦 jackson-databind-2.15.2.jar
│ │ ├── 📦 jstl-1.2.jar
│ │ ├── 📦 log4j-api-2.21.0.jar
│ │ ├── 📦 log4j-core-2.21.0.jar
│ │ ├── 📦 log4j-slf4j-impl-2.21.0.jar
│ │ ├── 📦 mybatis-3.5.15.jar
│ │ ├── 📦 mybatis-spring-2.1.2.jar
│ │ ├── 📦 mysql-connector-j-8.0.33.jar
│ │ ├── 📦 protobuf-java-3.21.9.jar
│ │ ├── 📦 slf4j-api-1.7.25.jar
│ │ ├── 📦 spring-aop-5.3.39.jar
│ │ ├── 📦 spring-beans-5.3.39.jar
│ │ ├── 📦 spring-context-5.3.39.jar
│ │ ├── 📦 spring-core-5.3.39.jar
│ │ ├── 📦 spring-expression-5.3.39.jar
│ │ ├── 📦 spring-jcl-5.3.39.jar
│ │ ├── 📦 spring-jdbc-5.3.39.jar
│ │ ├── 📦 spring-tx-5.3.39.jar
│ │ ├── 📦 spring-web-5.3.39.jar
│ │ └── 📦 spring-webmvc-5.3.39.jar
│ └── 📄 welcome.html
└── ⚙️ pom.xml
📚 Branch Learning Roadmap| 브랜치 | 교육 내용 | 주요 어노테이션 / 키워드 | 핵심 기능 |
|---|---|---|---|
| main-0.1.0 | 프로젝트 초기 설정, JVM, Spring, WAS | index.html |
welcome-file 띄우기, 프로젝트 기본 구조, Tomcat 배포 |
| main-0.2.0 | Maven, Spring 설정 | @Configuration, @EnableWebMvc, @ComponentScan, @Controller, @RequestMapping |
Spring MVC 아키텍처, DispatcherServlet 설정, 기본 컨트롤러 작성 |
| main-0.3.0 | MySQL 및 MyBatis 설정 | @MapperScan, @Mapper, @Service, @Bean, @Repository, @Transactional |
DB 연결 설정, DataSource/Connection Pool, Service-DAO 계층 분리, SQL 매핑 |
| main-0.4.0 | Rest API 활용 및 로깅 | @RequestParam, @RequestBody, @ResponseBody, @PathVariable, Log4j2, SLF4J |
REST 요청/응답 처리, JSON 파싱, 로그 레벨 관리, 파일 기반 로깅 |
| main-0.5.0 | 에러 처리 | @ControllerAdvice, @RestControllerAdvice, @ExceptionHandler, @ResponseStatus, HttpStatus |
전역 예외 처리, 커스텀 에러 페이지, 상태 코드 매핑 |
| main-0.6.0 | 필터(Filter) 적용 | @WebFilter, @Order, @Component, ServletFilter |
XSS 방지, CORS 정책 관리, 요청/응답 전처리, 보안 헤더 추가 |
| main-0.7.0 | 인터셉터(Interceptor) 적용 | HandlerInterceptor, preHandle(), postHandle(), afterCompletion(), @Component |
요청 전후 처리, 세션 정보 수집, HTTP 로그 기록, 성능 모니터링 |
| main-0.8.0 | AOP(Aspect Oriented Programming) | @EnableAspectJAutoProxy, @Aspect, @Around, @Before, @After, @AfterReturning, @AfterThrowing, ProceedingJoinPoint |
횡단 관심사 분리, 메서드 실행 시간 측정, 트랜잭션 관리, 공통 로직 재사용 |
| main-0.9.0 | SQL 로깅 및 암호화 처리 | P6Spy, Jasypt, Slow Query, 커스텀 어노테이션, @CtlDescription |
동적 SQL 쿼리 로깅, Slow Query 분석, application.properties 암호화, 민감 정보 보호 |
| main-1.0.0 | 업무 화면 구축 및 캐싱 | EhCache, @EnableCaching, @Cacheable, @CacheEvict, Bootstrap |
JSP 뷰 렌더링, 캐시 전략 수립, 성능 최적화, 자주 조회되는 데이터 캐싱 |
| main-1.1.0 | 사용자 인증 및 세션 관리 | Spring Security, @EnableWebSecurity, @Configuration, @Bean, HttpSession, SessionListener |
로그인/로그아웃, 비밀번호 인코딩, 세션 타임아웃 설정, 사용자 정보 보안 관리 |
| main-1.2.0 | 파일 업로드/다운로드 및 Excel 처리 | Apache POI, @EnableCaching, MultipartFile, File I/O |
파일 유효성 검증, 대용량 파일 처리, Excel/Word 생성 및 다운로드, 마임타입 감지 |
| main-1.3.0 | 컨트롤러 정보 수집 및 접근 제어 | @CtlDescription, @Target, @Retention, Reflection API, HandlerInterceptor |
커스텀 어노테이션 정의, 컨트롤러 메타데이터 자동 수집, Interceptor 기반 동적 접근 제어 |
| main-1.4.0 | 동적 권한 제어 및 메뉴 관리 | @PreAuthorize, @PostAuthorize, SpEL |
컨트롤러 메타데이터 수집, 역할 기반 접근 제어(RBAC), 사용자 그룹 관리, 메뉴별 권한 매핑 |
| main-1.5.0 | 고급 스케줄링 및 세션제어 | @Scheduled, @Async, TaskScheduler, Spring Batch |
다중 파일 처리, 비동기 작업, 정기적 데이터 검증, 배치 작업 모니터링, 세션 접근 관리 |
🛠 Development Evironment| 항목(Item) | 버전(version) | 비고(Notes) |
|---|---|---|
| Eclipse IDE | 2025-09 (4.37.0) | Latest stable Eclipse IDE optimized for Java, Spring, and web development. Supports diverse plugins and tools for efficient coding. Download link |
| Java | 17.0.12 | LTS version offering enhanced stability, performance, and long-term support. Suitable for enterprise-grade and personal projects. |
| Tomcat | 9.0.109 | Reliable Servlet/JSP container supporting Servlet 4.0, HTTP/2, and improved security. Ideal for deploying Java-based web applications. |
| Spring Framework | 5.3.39 | Long-term supported version with robust compatibility. Offers DI, AOP, MVC, and other core features. Initial release: Oct 2022; End of support: Jun 2029. |
| Servlet | 4.0.1 | Standard dynamic web module version with asynchronous processing and HTTP/2 support for modern web applications. Reliable and industry-standard. |
| MySQL | 8.0.43 | GPL-licensed Community Edition with high performance, scalability, and strong security features. Supports InnoDB storage engine, replication, and clustering. |
Java 설치 → Eclipse 설치 → Tomcat 설치 → Eclipse 실행 → File > New > Project > Git > Projects from Git → Clone URI(https://github.com/jinkyu-ju/com.ibks.project.git) → main 브랜치 선택 → workspace/com.ibks.project 지정 → Import as General Project → 프로젝트 이름: com.ibks.project
📦 Maven Dependencies(library)| NO | Library 파일명 | 버전 | 설명 | @Since |
|---|---|---|---|---|
| 1 | spring-webmvc | 5.3.39 | Spring MVC 웹 프레임워크 (DispatcherServlet) | main-0.2.0 |
| 2 | spring-web | 5.3.39 | Web 관련 클래스 (Filter, Http 등) | spring-webmvc |
| 3 | spring-context | 5.3.39 | ApplicationContext, @Autowired 지원 | spring-webmvc |
| 4 | spring-beans | 5.3.39 | Bean 생성/주입 핵심 | spring-webmvc |
| 5 | spring-core | 5.3.39 | Core 유틸 및 공통 지원 | spring-webmvc |
| 6 | spring-aop | 5.3.39 | AOP(트랜잭션, 프록시 등) | spring-webmvc, aspectjweaver |
| 7 | spring-expression | 5.3.39 | SpEL(Spring Expression Language) | spring-context |
| 8 | spring-jcl | 5.3.39 | 로그 브릿지 (Commons Logging 대체) | spring-core |
| 9 | jstl | 1.2 | JSP용 JSTL 태그 (<c:forEach> 등) |
main-0.2.0 |
| 10 | log4j-core | 2.21.0 | Log4j2 Core 로깅 엔진 | main-0.2.0 |
| 11 | log4j-api | 2.21.0 | Log4j2 API | main-0.2.0 |
| 12 | log4j-slf4j-impl | 2.21.0 | SLF4J(LoggerFactory) 브릿지 | main-0.2.0 |
| 13 | slf4j-api | 1.7.25 | SLF4J API | log4j-slf4j-impl |
| 14 | commons-logging | 1.2 | 로깅 퍼사드 (DBCP2 지원) | commons-dbcp2, spring-core |
| 15 | spring-jdbc | 5.3.39 | JDBC 접근 지원 (JdbcTemplate, DataSource) | main-0.3.0 |
| 16 | spring-tx | 5.3.39 | @Transactional 지원 (트랜잭션 관리) | spring-jdbc |
| 17 | commons-dbcp2 | 2.9.0 | Connection Pool (DB 커넥션 풀) | main-0.3.0 |
| 18 | commons-pool2 | 2.10.0 | DBCP2 커넥션 풀 구현 | commons-dbcp2 |
| 19 | mysql-connector-j | 8.0.33 | MySQL JDBC 드라이버 | main-0.3.0 |
| 20 | protobuf-java | 3.21.9 | MySQL X DevAPI 프로토콜 지원 | mysql-connector-j |
| 21 | mybatis | 3.5.15 | SQL Mapper, JDBC 단순화, 객체 매핑 | main-0.3.0 |
| 22 | mybatis-spring | 2.1.2 | Spring 통합용 (SqlSessionFactory, @Transactional) | main-0.3.0 |
| 23 | aspectjweaver | 1.9.22 | Database Transaction 관리 (AOP 위빙) | main-0.3.0 |
| 24 | jackson-databind | 2.15.2 | Java 객체 ↔ JSON 자동 변환 | main-0.4.0 |
| 25 | jackson-core | 2.15.2 | JSON 파서 엔진 | jackson-databind |
| 26 | jackson-annotations | 2.15.2 | JSON 어노테이션 지원 | jackson-databind |
| 27 | spring-security-core | 5.3.13 | 스프링시큐리티 Salt 암호화(단방향) | main-0.9.0 |
| 28 | jasypt | 1.9.3 | 프로퍼티 파일 암호화(양방향) | main-0.9.0 |
| 29 | javax.annotation-api | 1.3.2 | @CtlDescription 어노테이션 생성 | main-0.9.0 |
| 30 | p6spy | 3.9.1 | SQL 모니터링 | main-1.0.0 |
| 31 | ehcache | 3.10.8 | Ehcache 캐시 관리 | main-1.0.0 |
| 32 | spring-context-support | 5.3.39 | Ehcache, 캐시 등 지원 | main-1.0.0 |
| 33 | cache-api | 1.1.0 | JCache 표준 API | ehcache |
| 34 | jaxb-api | 2.3.1 | XML 객체 변환 (Ehcache 지원) | main-1.0.0 |
| 35 | jaxb-impl | 2.3.3 | XML 객체 변환 구현체 (Ehcache 지원) | main-1.0.0 |
| 36 | jaxb-runtime | 2.3.3 | JAXB 런타임 지원 | jaxb-impl |
| 37 | jakarta.xml.bind-api | 2.3.3 | Jakarta XML Binding API | jaxb-runtime |
| 38 | jakarta.activation | 1.2.2 | Jakarta Activation API (javax.activation 대체) | jaxb-runtime |
| 39 | javax.activation-api | 1.2.0 | Java Activation Framework | jaxb-api |
| 40 | istack-commons-runtime | 3.0.11 | JAXB 등 XML 지원 라이브러리 | jaxb-runtime |
| 41 | txw2 | 2.3.3 | XML Writer 지원 | jaxb-runtime |
| 42 | commons-fileupload | 1.6.0 | 파일 업로드 처리 | main-1.1.0 |
| 43 | commons-io | 2.15.1 | IO 유틸 | main-1.1.0 |
| 44 | tika-core | 2.9.2 | 문서 파싱 (MIME 타입 감지) | main-1.1.0 |
| 45 | commons-codec | 1.18.0 | 인코딩/디코딩 유틸 | commons-fileupload, poi-ooxml |
| 46 | commons-compress | 1.27.1 | 압축 파일 처리 | tika-core, poi-ooxml |
| 47 | poi | 5.4.1 | Excel/Word 처리 | poi-ooxml |
| 48 | poi-ooxml | 5.4.1 | OOXML Excel/Word 처리 | main-1.2.0 |
| 49 | poi-ooxml-lite | 5.4.1 | POI OOXML 경량 버전 | poi-ooxml |
| 50 | xmlbeans | 5.3.0 | XML 객체 변환 | poi-ooxml-lite |
| 51 | commons-collections4 | 4.4 | 컬렉션 유틸 | poi-ooxml |
| 52 | commons-math3 | 3.6.1 | 수학/통계 라이브러리 | poi-ooxml |
| 53 | curvesapi | 1.08 | ECC 암호 지원 | poi-ooxml |
| 54 | SparseBitSet | 1.3 | 비트셋 라이브러리 | ehcache |
| 55 | commons-lang3 | 3.16.0 | 문자열/객체/날짜 유틸 | poi-ooxml |
| 56 | commonmark | 0.21.0 | Markdown 파서 | markdown 서비스 |
| 57 | commonmark-ext-gfm-strikethrough | 0.21.0 | Markdown GFM 취소선 확장 | markdown 서비스 |
| 58 | commonmark-ext-gfm-tables | 0.21.0 | Markdown GFM 테이블 확장 | markdown 서비스 |