Skip to content

Commit

Permalink
hotfix: resources로 데이터 위치 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jongmee committed Aug 16, 2024
1 parent 8b005f2 commit ce9a128
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand All @@ -24,8 +26,8 @@ public class DataInitializer implements ApplicationRunner {

@Override
public void run(ApplicationArguments args) {
String weatherFilePath = System.getProperty("user.dir") + "/" + "src/main/java/com/pokerogue/helper/battle/data/weather.txt";
try (BufferedReader br = new BufferedReader(new FileReader(weatherFilePath))) {
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream("weather.txt");
BufferedReader br = new BufferedReader(new InputStreamReader(inputStream))) {
int lineCount = 0;
String line;
while ((line = br.readLine()) != null) {
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion backend/pokerogue/src/main/resources

0 comments on commit ce9a128

Please sign in to comment.