-2
도와주세요.보고되지 않은 IOException
Error unreported exception java.io.IOException; must be caught or declared to be thrown
라인에서 나는를 만들 : 그것은 나에게 오류를 보여줍니다 그러나
try {
ObjectMapper mapper2 = new ObjectMapper();
File file2 = new File("Lessons.json");
List<Lesson> lessonList = Arrays.asList(mapper2.readValue(file2, Lesson[].class));
}catch (Exception e) {
e.printStackTrace();
}
: 나는 JSON 파일에서 데이터를 읽고 자바 objects.Here에 저장하려고하면 코드 개체 목록입니다.
게시 한 코드 블록이 해당 오류를 생성 할 수없는 것으로 보입니다. 질문을 편집하여 오류 및 정확한 오류를 생성하는 완전한 컴파일 가능한 코드 예제를 보여주십시오. – Kenster
봄을 사용합니까? – Salman
아니, 아니야 ... – user8928579