사용자 도구

사이트 도구


springframework:springboot

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판 양쪽 다음 판
springframework:springboot [2019/04/22 14:21]
kwon37xi [Server / Tomcat 설정]
springframework:springboot [2019/07/10 14:11]
kwon37xi
줄 45: 줄 45:
 ===== SpringBoot WebMVC 정적 리소스(static resource) ===== ===== SpringBoot WebMVC 정적 리소스(static resource) =====
 ==== static resource 서빙 경로 ==== ==== static resource 서빙 경로 ====
- +  * ''spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/'' 이 프라퍼티에 의해 결정됨. 기본값 참고.
-  * ''/src/main/META-INF/resources''+
   * jar 애플리케이션을 실행한 디렉토리 하위의 ''public/'' 디렉토리   * jar 애플리케이션을 실행한 디렉토리 하위의 ''public/'' 디렉토리
   * ''WebMvcConfigurerAdapter.addResourceHandlers'' 오버라이드하여 직접 지정<code java>   * ''WebMvcConfigurerAdapter.addResourceHandlers'' 오버라이드하여 직접 지정<code java>
줄 58: 줄 57:
 } }
 </code> </code>
 +
 ==== static resource 관련 프라퍼티 ==== ==== static resource 관련 프라퍼티 ====
 +  * [[https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html|Appendix A. Common application properties]] 에서 ''spring.mvc.*'' 와 ''spring.resources.*'' 참조
 <code> <code>
 +spring.mvc.static-path-pattern=/** # 정적 resource url 패턴
 +
 server.compression.enabled=true server.compression.enabled=true
 spring.resources.chain.cache=true spring.resources.chain.cache=true
springframework/springboot.txt · 마지막으로 수정됨: 2022/10/26 10:14 저자 kwon37xi