Java/Spring Spring 에서 classpath: 경로 위치 - 반응형 Spring 에서 설정파일을 보면 classpath:/templates/ 처럼 classpath: 를 경로에 사용하는걸 볼 수 있다. 위 예시는 application.yml 파일이고 Spring Boot 에서 thymeleaf 를 설정하는 소스이다. prefix 인 .html 파일의 경로를 설정하는데 classpath 를 사용했다. 이렇게 경로를 설정할때 사용하는 classpath 의 경로위치는 어디인지 알아보자. 프로젝트 > 마우스 오른쪽 클릭 > Build Path > Configure Build Path > Java Build Path > Source 탭 클릭 아래 이미지처럼 Source filders on build path: 에 나오는 폴더들이 classpath 경로 위치에 해당한다. thymeleaf 의 설정에서 classpath:/templates 를 prefix 로 설정하게 되면 /src/main/resources 하위에 있는 templates 폴더에 html 파일들을 넣어놓으면 된다. 반응형 공유하기 URL 복사카카오톡 공유페이스북 공유엑스 공유 게시글 관리 구독하기중꺾마 Contents 당신이 좋아할만한 콘텐츠 Spring Container, BeanFactory, ApplicationContext 2024.11.05 org.springframeworkbeans.factory.NoSuchBeanDefinitionException (Bean 을 찾을 수 없는 에러) 2024.10.28 DataSoruce TransactionManager 설정(commit, rollback) 2024.09.12 Spring Security SessionManagementFilter, ConcurrentSessionFilter(동시세션제어) 2024.09.06 댓글 0 + 이전 댓글 더보기