Skip to content

Commit

Permalink
services updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 13, 2024
2 parents 728a9b5 + bd3d21a commit eded600
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/main/java/com/spacecraft/services/EventService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.spacecraft.dtos.EventDTO;
import com.spacecraft.dtos.LongitudeDTO;
import jakarta.annotation.PostConstruct;
import lombok.Getter;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
import org.springframework.core.io.ClassPathResource;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;

@Service
Expand All @@ -26,8 +23,12 @@ public void loadData() throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
ClassPathResource resource = new ClassPathResource("persistence/events.json");

<<<<<<< HEAD
events = objectMapper.readValue(resource.getInputStream(), new TypeReference<List<EventDTO>>() {});

=======
events = objectMapper.readValue(resource.getInputStream(), new TypeReference<List<EventDTO>>() {});
>>>>>>> bd3d21a54cffe516cfd463f05ce7ebf842f2e754
for (EventDTO event : events) {
System.out.println(event);
}
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/spacecraft/services/LatitudeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.spacecraft.dtos.EventDTO;
import com.spacecraft.dtos.LatitudeDTO;
import jakarta.annotation.PostConstruct;
import lombok.Getter;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
import org.springframework.core.io.ClassPathResource;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;

@Service
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/spacecraft/services/LongitudeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.spacecraft.dtos.EventDTO;
import com.spacecraft.dtos.LongitudeDTO;
import jakarta.annotation.PostConstruct;
import lombok.Getter;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
import org.springframework.core.io.ClassPathResource;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;

@Service
Expand Down

0 comments on commit eded600

Please sign in to comment.