resources > res.txt 파일을 읽기 위해서 아래와 같이 ResourceLoader를 이용하여 classpath에 있는 파일을 읽을 수 있습니다. package com.example.logbacksample; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.core.io.ResourceLoader; import org.springframe..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/sKx5K/btrm7Mtpo7O/60aeh1Bk0MMA90F77YlqoK/img.png)
ResourceLoader는 Spring Boot에서 resources 폴더 아래에 있는 리소스 파일을 읽어오기 위해 사용하는 클래스 입니다. 아래와 같이 classpath:로 경로를 입력하면 해당 경로에 있는 리소스를 읽어오고 Resource 객체로 full path까지 가져올 수 있습니다. ResourceLoader resourceLoader; Resource resource = resourceLoader.getResource("classpath:" + schemaFilePath); resource.getURI().getPath(); 여기서 classpath: 는 target의 classes를 root로 하는 경로 입니다. chemaFilePath는 schema/ParquetSchema 값을 넣어주면..
- Total
- Today
- Yesterday
- Size
- Postman
- Spark
- JPA
- Container
- install
- intellij
- logstash
- Kibana
- apm
- JSON
- tomcat
- Log
- Java
- plugin
- scala
- docker
- mac
- Git
- gradle
- error
- Linux
- maven
- spring boot
- AWS
- spring
- elasticsearch
- Filter
- SpringBoot
- Index
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |