강의

멘토링

로드맵

Inflearn コミュニティ Q&A

mins1996001780 のプロフィール画像
mins1996001780

投稿した質問数

Spring Boot Web開発入門 - フォローして学習

Transactional から Exception (Checked vs Unchecked)

File imprt 어떤거 해야하죠?

作成

·

124

0

  File file = new File("not existing file.txt"); FileInputStream = new FileInputStream(file);
이 코드를 복붙을 했는데

FileInputStream = new FileInputStream(file);
이부분에서 FileInputStream 부분이 빨간줄이 뜹니다

 

import java.io.File;
import java.io.FileInputStream;

임포트는 이걸 했구요
Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system. A new FileDescriptor object is created to represent this file connection.

First, if there is a security manager, its checkRead method is called with the path represented by the file argument as its argument.

If the named file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading then a FileNotFoundException is thrown.
이런 오류가 있는데 어떻게 해결해요?

springmvcspring-boot

回答 1

0

itpaul님의 프로필 이미지
itpaul
インストラクター

안녕하세요.
전체 소스를 봐야지 어떤 문제가 있는지 확인이 가능할것 같습니다.
프로젝트를 압축해서 메일로 보내주시면 확인하도록 하겠습니다.
good.dhkim@gmail.com 입니다.

mins1996001780 のプロフィール画像
mins1996001780

投稿した質問数

質問する