기술과 산업/언어 및 프레임워크
[Java] spring boot jar_cached tmp 파일이 계속 증가할 때
B컷개발자
2020. 5. 6. 19:39
728x90
1. 문제 상황
리본 클라이언트로 핑(Ping)을 swagger-ui.html 주소로 보낼 때 호출 될 때마다 약 2MB짜리 jar_cached 임시 파일을 생성함.
2. Spring boot, properties
기본 값은 classpath:/META-INF/resources/,classpath:/resources/, classpath:/static/,classpath:/public/ 순서로 되어있다.
3. 해결
아래 내용에서 처럼 순서를 변경해주거나 별도의 ping-pong 컨트롤러를 하나 만들어 주면된다.
spring:
resources:
static-locations:
- classpath:/resources/,classpath:/META-INF/resources/,classpath:/static/,classpath:/public/
728x90