사용자 도구

사이트 도구


springframework:springboot

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
springframework:springboot [2019/04/05 15:33]
kwon37xi [SpringBoot WebMVC 정적 리소스(static resource)]
springframework:springboot [2022/10/26 10:14] (현재)
kwon37xi
줄 13: 줄 13:
   * [[springframework:springboot:test|SpringBoot Test]]   * [[springframework:springboot:test|SpringBoot Test]]
   * [[springframework:springboot:springboot_cli|SpringBoot CLI]]   * [[springframework:springboot:springboot_cli|SpringBoot CLI]]
 +  * [[springframework:springboot:startup|SpringBoot startup 최적화 / optimization]]
 +  * [[https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-dependency-versions.html|Dependency versions]] 여기서 의존 라이브러리 버전과 프라퍼티명 확인
  
 ===== @EnableAutoConfiguration ===== ===== @EnableAutoConfiguration =====
줄 45: 줄 47:
 ===== 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: 줄 59:
 } }
 </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
줄 66: 줄 71:
 spring.resources.cache-period=3600 spring.resources.cache-period=3600
 </code> </code>
 +
 +
 ===== 참고 ===== ===== 참고 =====
   * [[http://andromedarabbit.net/wp/spring-boot%ec%97%90%ec%84%9c-spring-framework-%eb%b2%84%ec%a0%84-%ec%a7%80%ec%a0%95%ed%95%98%ea%b8%b0/|Spring Boot에서 Spring Framework 버전 지정하기]]   * [[http://andromedarabbit.net/wp/spring-boot%ec%97%90%ec%84%9c-spring-framework-%eb%b2%84%ec%a0%84-%ec%a7%80%ec%a0%95%ed%95%98%ea%b8%b0/|Spring Boot에서 Spring Framework 버전 지정하기]]
줄 75: 줄 82:
   * [[http://www.baeldung.com/spring-boot-thin-jar|Thin JARs with Spring Boot | Baeldung]]   * [[http://www.baeldung.com/spring-boot-thin-jar|Thin JARs with Spring Boot | Baeldung]]
   * [[https://dzone.com/articles/graceful-shutdown-spring-boot-applications|Graceful Shutdown Spring Boot Applications - DZone Java]]   * [[https://dzone.com/articles/graceful-shutdown-spring-boot-applications|Graceful Shutdown Spring Boot Applications - DZone Java]]
 +  * [[https://www.sourcecodeexamples.net/p/free-spring-boot-projects.html|무료 SpringBoot 예제 모음]] 
 +  * [[https://www.javaguides.net/p/spring-boot-tutorial.html|Spring Boot Tutorial]]
springframework/springboot.1554446039.txt.gz · 마지막으로 수정됨: 2019/04/05 15:33 저자 kwon37xi