* STS에서 Spring Legacy Project 생성하기


세번째 작성하는 프로젝트명을 contextPath로 하는 프로젝트 생성됨
< Spring framework 디렉토리 구조 (directory structure) >
- Spring Legacy Project 생성 시, Spring에 맞는 폴더 구조를 생성함
- Maven 사용을 사용을 기준으로 정리함
── pom.xml
└── src
├── main
│ ├── java
│ │ └── com
│ │ └── companyname : 회사명
│ │ └── projectname : 프로젝트명
│ │ └── directory : 하위 패키지명
│ │ ├── controller
│ │ │ └── controller.java
│ │ └── model
│ │ ├── dao
│ │ ├── service
│ │ └── vo
│ ├── resources : MyBatis관련 설정, mapper파일 등
│ │ ├── mappers : SQL문 작성할 xml파일 담는 폴더
│ │ ├── META-INF
│ │ ├── log4j.xml
│ │ └── mybatis-config.xml : MyBatis 환경설정 파일
│ └── webapp : 클라이언트에 배포되는 폴더
│ ├── resources : 이미지, css파일 등 이용할 자원을 담는 폴더
│ │ ├── css
│ │ ├── images
│ │ └── uploadFiles : 첨부파일 담을 폴더
│ ├── WEB-INF
│ │ ├── classes
│ │ ├── [lib] : 직접 등록할 라이브러리 담는 폴더
│ │ ├── spring : 스프링 관련 파일 담는 폴더
│ │ │ ├── appServlet
│ │ │ │ └── servlet-context.xml : 요청 시 호출할 servlet 관련 정보 파일
│ │ │ ├── root-context.xml : DB정보, 트랜잭션처리, 내외부모듈연결 정보 파일
│ │ │ └── spring-security.xml : Spring security관련 bean등록 파일
│ │ ├── views : 화면을 담는 폴더
│ │ │ └── directory : 세부 폴더
│ │ │ ├── list.jsp
│ │ │ ├── enroll.jsp
│ │ │ └── update.jsp
│ │ └── web.xml : 배포서술자
│ └── index.jsp : welcomePage
└── test
'개발 > Framework' 카테고리의 다른 글
[Spring] 스프링에서 AJAX 응답데이터 보내기 (JSON, GSON 사용) / @ResponseBody (0) | 2022.12.27 |
---|---|
[Spring] Spring - 스프링에서 파일 첨부하기 (0) | 2022.12.26 |
[Spring] 메이븐(Maven) 개념 / 사용법 (1) | 2022.12.25 |
[MyBatis] MyBatis 동적 SQL 처리 (0) | 2022.12.19 |
[Mybatis] Mybatis 페이징처리 / RowBounds 사용 (0) | 2022.12.19 |