웹프로그래밍 무작정따라하기/JAVA_Spring

[Spring] 프레임워크 - 디렉터리 구조 파악하기

RIMD 2020. 12. 15. 04:16

:-)

src/main/java

자바 코드(Controller, Model, Service)


src/main/resources

자바 코드에서 참조하는 리소스 파일들

ex) jdbc.properties, mybatis의 mapper ..


 

src/test/java

테스트 관련 코드


src/test/resources

테스트 코드에서 참조하는 리소스 파일들


src/main/webapp

웹 서비스 루트 디렉토리(외부에서 접근 가능)


src/main/webapp/resources

js,css,image등의 웹 리소스 파일


src/main/webapp/WEB-INF/views

html, jsp페이지


src/main/webapp/WEB-INF/
외부에서 접근 불가능(보안을 위해서)
컨트롤러를 경유해서 접근 가능


src/main/webapp/WEB-INF/classes  

컴파일된 클래스


src/main/webapp/WEB-INF/spring

스프링의 환경설정 파일

 

src/main/webapp/WEB-INF/spring/root-context.xml

서블릿과 관련되지 않은 모든 리소스에 대한 설정


src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml

서블릿과 관련된 모든 리소스에 대한 설정


pom.xml

메이븐에서 참조하는 설정 파일 jar

 

 

참고사이트 : www.youtube.com/watch?v=RZZ5DQ1wwgU