0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

インポートされたjavax.servletは見つかりませんというエラー

Posted at

EclipseでSpringBootでjavaファイルに以下をインポートしようとしてもうまくいきません

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

gradle.buildに、以下を追記して

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    // javax.servletの依存関係を追加
    providedCompile 'javax.servlet:javax.servlet-api:4.0.1'
}

以下のコマンドで、gradleをリフレッシュしても解決しません

./gradlew build --refresh-dependencies

どのようにすればインポートできますか

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?