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..
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
- JSON
- Postman
- error
- Linux
- gradle
- intellij
- scala
- spring boot
- apm
- logstash
- Container
- plugin
- install
- docker
- JPA
- Java
- elasticsearch
- maven
- Log
- SpringBoot
- mac
- tomcat
- spring
- Size
- Spark
- Git
- AWS
- Kibana
- Filter
- 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 | 29 | 30 | 31 |