목차 1. readAllBytes() inputstream의 readAllBytes()는 JAVA9 버전부터 이용이 가능합니다. package com.example.logbacksample; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.core.io.ResourceLoader; ..
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..
목차 객체 업로드 S3에 객체를 업로드하는 코드 입니다. 업로드할 버킷의 지역, 버킷명, 객체명(파일명) 그리고 파일의 데이터를 byte로 하여 S3Client의 putObject함수를 이용하여 업로드 할 수 있습니다. Region region = Region.AP_NORTHEAST_2; S3Client s3 = S3Client.builder().region(region).build(); String bucketName = "bucket"; String objectKey = "test.csv"; putS3Object(s3, bucketName, objectKey, getObjectFile("path/of/file")); private String putS3Object(S3Client s3, String ..
- Total
- Today
- Yesterday
- Filter
- SpringBoot
- spring boot
- JSON
- plugin
- install
- elasticsearch
- Size
- AWS
- Linux
- scala
- Java
- error
- Container
- docker
- apm
- maven
- Postman
- Kibana
- intellij
- Index
- Git
- spring
- Spark
- JPA
- logstash
- Log
- tomcat
- gradle
- mac
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |